What is the limit for how many faces a model should have?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
Mini--Joe
Posts: 96
Joined: Sun Jul 27, 2014 10:25 am

What is the limit for how many faces a model should have?

Post by Mini--Joe »

I'm asking because all the monsters in my mod are 3d models, and I am trying to optimize it as I make them. Don't wanna play doom with framedrops, that ain't fun.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: What is the limit for how many faces a model should have

Post by Nash »

GZDoom's model loaders do not enforce any kind of triangle limit. On the other hand, the exporters you use from your modeling program might cap them to follow the specs of whatever format you are trying to export... and that's beyond GZDoom developers' control (it would be the fault of the exporter/program you use).

As far as "how many triangles is too much", well that depends on the graphics card of the person running your mod. Modern GPUs are efficient at rendering triangles that it shouldn't really be that much of an issue. You will find that GZDoom barely hits the GPU most of the time, no matter how many polygons you throw at it; usually when a GZDoom mod starts to slow down, it's elsewhere that's causing it - mainly actor code and map rendering (from too many lines and sectors in the map geometry, things like that).

That said, being "old tech" I'd say try to keep your models between 1.5k - 3k triangles. Try mods like Hunter's Moon to see what performance is like for model-heavy assets.

Another thing to take note of is it's not just the triangle count that will be a resource hit - number of animation frames will also affect performance. Models in GZDoom use vertex animation, which isn't economical on VRAM usage. So the more frames a model has, the more VRAM it's going to eat out of your graphics card.

And lastly, texture size, too, will affect performance due to VRAM usage. High res model textures, on top of level textures, are going to eat up VRAM very quickly. And it gets worse when you enable the high quality resize modes in GZDoom.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: What is the limit for how many faces a model should have

Post by Graf Zahl »

The main problem with high model detail is not render performance but memory consumption. Modern graphics hardware is optimized to render large meshes of triangles with the same parameters - rendering a model doesn't cost much more than rendering a sprite. But if you use too many highly detailed models you'll eventually run out of memory.
User avatar
Mini--Joe
Posts: 96
Joined: Sun Jul 27, 2014 10:25 am

Re: What is the limit for how many faces a model should have

Post by Mini--Joe »

So I pretty much should be worrying about placing down too many enemies, then? Cool, we weren't planning on having that many monsters on the maps anyway, I prefer less monsters with more AI.

Thank for the help.
User avatar
Kappes Buur
 
 
Posts: 4120
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: What is the limit for how many faces a model should have

Post by Kappes Buur »

Play Enjay's Gene-Tech: Before the Storm to see how well your computer behaves with lots of 3D actors.
Spoiler:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: What is the limit for how many faces a model should have

Post by Graf Zahl »

[youtube][/youtube]
Mini--Joe wrote:So I pretty much should be worrying about placing down too many enemies, then? Cool, we weren't planning on having that many monsters on the maps anyway, I prefer less monsters with more AI.

Thank for the help.
No, you can place as many as you want - a single model being reused multiple times in the game is only loaded once. You'll only get problems if you load many high polygon models and even then you can load a lot of them on an 8GB machine with a 64 bit OS.
With 2GB you'd have to be careful with big models. They can eat that amount of RAM easily.
Post Reply

Return to “Assets (and other stuff)”