Jump to content

Optimisation suggestion: Stop rendering bullets inside rifles


Recommended Posts

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
Link to comment
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.

Link to comment
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?

Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
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.

 

Link to comment
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
Link to comment
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.

Link to comment
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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...