Jump to content
Bulletpoint

Optimisation suggestion: Stop rendering bullets inside rifles

Recommended Posts

Posted (edited)

The game seems to be rendering bullets and other details inside some of the weapons, especially rifles. This is a wasted effort, as the player will never see this detail, and I believe it slows the computer down despite not being visible.

To check it out for yourself, angle the camera very close to a soldier so half the model becomes invisible. You can now pan slowly left and right to do an "x-ray" and peek inside the model.

All K98 rifles seem to be affected.

The Garand has no hidden bullets in its normal version. But the rifle grenade version has.

 

Some other weapons that have invisible detail that is never shown:

M1911A1 pistol (handle shows detail under the wooden part)

M1919A6 LMG (it has bullets inside, plus there's a hidden interior barrel)

LMG42 (some bullets are outside the gun as a part of an ammo belt, but there are just as many bullets hidden away inside the gun)

This is just a quick check. There could be many other wasted polygons inside weapons in this game.

 

Other suggestions:

The M4A3(75)W Sherman (early) has a grill above the engine. This grill is made of a LOT of polygons. They are not completely wasted, because the detail is visible from the outside, but it could be an obvious way to save polygons if this grill were changed to a texture. At least when playing on less than max detail setting. The saved polygons could be used to make the hatch openings more circular instead of angled as they are now.

Also, a lot of the vehicles have hidden interior detail. While in some way this is kind of cool, removing this would also be an obvious way to save a lot of polygons.

Edited by Bulletpoint

Share this post


Link to post
Share on other sites

It really depends on how the model has been constructed. If the hidden part is just an extension of a seen part, no more polygons might be involved - a long, flat rectangle requires only the same number of triangles and vertices to render as a short rectangle.

Also, as I understand it, rendering performance in games is generally determined by the number of vertices on the UV layouts as seen on the texture sheets, so you would need to see these to really check if the models could be optimised. On the other hand, if parts are hidden inside each other, the engine might be having to calculate culling.

I am sure plenty of the models could probably be optimised, but in the end there would be no guarantee it would have much appreciable effect on performance.

Share this post


Link to post
Share on other sites
8 hours ago, Offshoot said:

am sure plenty of the models could probably be optimised, but in the end there would be no guarantee it would have much appreciable effect on performance.

I'm no computer wizard, so I can't say for certain.

I'm just thinking that if there are 200 Germans in a battle, each with a Kar98, and inside each rifle there are 6 bullets, each made of, say, 10 polygons, then that's 12,000 polygons that are not contributing anything at all. Seems needlessly wasteful, especially since it would just be a matter of changing one model (the Kar98 rifle) to save all these polygons.

Even if the graphics engine is clever enough to not bother actually rendering the unseen detail (culling), I still think the CPU somehow has to deal with each bullet, if only to decide that it will not be rendered.

But I'd be happy to be proven wrong.

The important bit for me is just to make sure people are aware of this. Maybe it's a complete non-issue, maybe it would be a 'quick win' to make the game run better. Who knows?

Share this post


Link to post
Share on other sites

Maybe it's part of the simulation and stuff need to be modeled (visible or not) for accurate damage model and stuff like that. Having it visible might be an added bonus and it's just to shuffle stuff over to the GPU to render and doesn't effect overall performance... maybe part of the 1:1 simulation :)

That's my assumption as I have no design experience at all, but if you don't want hit points system I guess you need to model everything and calculate bullets trajectory and see what it hits.

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, Bulletpoint said:

The important bit for me is just to make sure people are aware of this. Maybe it's a complete non-issue, maybe it would be a 'quick win' to make the game run better. Who knows?

Definitely, though without the ability for modders to export and alter models* it's up to BF to implement going forward, even just as good practice and if they don't already.

 

So the answer to "Who knows" would be BF if they wanted to look into it, though I highly doubt they would rework old models because of prior comments about not having the art budget of AAA titles and because the fix is unlikely to be all that quick. I don't think 12,000 polygons is that many for "modern" games and GPUs and how many of those polys would be onscreen at any one time, whether because they are off-screen or LOD culled? You'd probably need to do a comprehensive sweep of all the models with a few polys here and there for it to all add up.

 

I hadn't realised the individual bullets were modelled (I was thinking magazines), but that makes me wonder if they are there for animation purposes as cartridges are ejected if I recall correctly? I also wonder how bullets are tracked for determining impacts - do they need a polygon model to do this? Have you noticed any weapons without bullets?

 

Edit: trumped by ratdeath :)

 

*Edit 2: several years back sbobovyc had written an exporter for models but it didn't allow you to change the models and re-import them. This thread prompted me to look this up again and I see that he has since updated these tools, even with a script for Blender. So it is perhaps possible for modders to do this if they know/want to learn the tools.

 

Edited by Offshoot

Share this post


Link to post
Share on other sites
2 hours ago, ratdeath said:

maybe part of the 1:1 simulation :)

 

2 hours ago, Offshoot said:

Have you noticed any weapons without bullets?

 

The Kar98 has bullets inside. The Garand doesn't. The carbine doesn't. The MP40 doesn't. 

So I think it's safe to conclude that those graphical bullets are not necessary for anything.

 

Share this post


Link to post
Share on other sites
1 hour ago, DerKommissar said:

Are you sure the bullet is modeled as a 3d object, and not a 2d image? Tracers look like an OG 2.5d deal.

Yes. Talking about the bullets inside the magasine inside the gun. Would upload some screenshots it it weren't such a hassle...

Share this post


Link to post
Share on other sites

 

On 10/9/2018 at 9:45 AM, Bulletpoint said:

Would upload some screenshots it it weren't such a hassle...

Create screenshot, click on screenshot file icon, drag to reply window here. Not exactly difficult.

Share this post


Link to post
Share on other sites
1 hour ago, LukeFF said:
On 10/9/2018 at 6:45 PM, Bulletpoint said:

Would upload some screenshots it it weren't such a hassle...

Create screenshot, click on screenshot file icon, drag to reply window here. Not exactly difficult.

I wish. How many kB is is that we have for uploads here?

Edited by Bulletpoint

Share this post


Link to post
Share on other sites
2 minutes ago, Bulletpoint said:

I wish. How many kB is is that we have for uploads here?

kB? C'mon, join the rest of us in the 21st century.

Try it and see - other sites typically allow up to 10MB.

Share this post


Link to post
Share on other sites

Create screenshot, click on screenshot file icon, drag to reply window here. Not exactly difficult."

1137593695_ScreenShot2018-10-11at11_01_04.png.1d4d2856a68963b3467edf06b282bf52.png

Not exactly difficult, but not enough space....

Edited by Ales Dvorak

Share this post


Link to post
Share on other sites
17 minutes ago, BletchleyGeek said:

Looking at our profiles I only see one difference. Do we unlock the 1.74MB upload limit when over 1,000 posts?

And the second difference is the year of membership.😨

Share this post


Link to post
Share on other sites
28 minutes ago, Ales Dvorak said:

And the second difference is the year of membership.😨

Strange, I can upload larger files without problem. max file size is few hundred MB.

Edited by Lethaface

Share this post


Link to post
Share on other sites
3 hours ago, SgtHatred said:

Also, Combat Mission's bizarre performance issues don't have anything to do with model rendering.

It sounds like you know more than I do. I'd like to know more if you have the time to explain why not?

Share this post


Link to post
Share on other sites
21 minutes ago, Bulletpoint said:
4 hours ago, SgtHatred said:

Also, Combat Mission's bizarre performance issues don't have anything to do with model rendering.

It sounds like you know more than I do. I'd like to know more if you have the time to explain why not?

Just keep in mind he doesn't really have any clue - not really. Oh and BFC are well aware of the strengths and limitations of their engine.

Share this post


Link to post
Share on other sites
8 minutes ago, IanL said:

Just keep in mind he doesn't really have any clue - not really. Oh and BFC are well aware of the strengths and limitations of their engine.

Well, it's possible that I have given BFC too much credit, and that rendering their simple models is actually a weakness Combat Mission has, but I doubt it. They'd have to be spectacularly inept to suffer performance issues with their low poly counts on modern hardware. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×