What is the limit for how many faces a model should have?
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.
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.
-
- Posts: 97
- Joined: Sun Jul 27, 2014 10:25 am
What is the limit for how many faces a model should have?
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.
-
-
- Posts: 17481
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: What is the limit for how many faces a model should have
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.
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.
-
- Lead GZDoom+Raze Developer
- Posts: 49211
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: What is the limit for how many faces a model should have
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.
-
- Posts: 97
- Joined: Sun Jul 27, 2014 10:25 am
Re: What is the limit for how many faces a model should have
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.
Thank for the help.
-
-
- Posts: 4154
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
Re: What is the limit for how many faces a model should have
Play Enjay's Gene-Tech: Before the Storm to see how well your computer behaves with lots of 3D actors.
Spoiler:
-
- Lead GZDoom+Raze Developer
- Posts: 49211
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: What is the limit for how many faces a model should have
[youtube][/youtube]
With 2GB you'd have to be careful with big models. They can eat that amount of RAM easily.
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.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.
With 2GB you'd have to be careful with big models. They can eat that amount of RAM easily.