- Home /
Draw calls versus triangle count, optimization issue
Hey guys,
I am working on a Doom-esque project and I have come to a point where I have a large level, built in a 3d package. This level currently has many objects which are not merged but utilize the same textures(Floor tiles, wall tiles etc). At this current set up I get around 40-60 fps running around the level. The draw call count is 6000-9000 on average and the triangle cound around 200k-300k with vertex count at half a mill or so.
After reading around the forums about optimization inside Unity, I came to the conclusion that it might be best to merge the objects that share the same texture, so I did just that and merged all 900 models(Around 5k tris, mostly planes) to about 16 models which share each of the 16 textures that are used in the level. Happy with my impovement I exported and jumped into Unity to see the glorious reduction in draw calls and blazing fast fps. Sufficed to say I was disappointed.
I hope you'll forgive me but I need to marinade you with some statistics :D
Before optimization(Merging), averages:
Draw calls - 4,000-8,000
Triangle count - 200k-300k
Vertex count - 400k-600k
FPS - 40-80
After optimization(Merging), averages:
Draw calls - 2,000-3,000
Triangle count - 1 million - 1.2 million
Vertex count - 1.2 million - 1.7 million
FPS - 40-80
As you can no doubt see the fps is nearly identical, but, the game feels much more sluggish in some areas with the optimization.
So after much writing my question boils down to this, what the heck is going on? Seriously though, if anyone could shed some light into this I would be grateful!
Answer by Waz · Jul 13, 2011 at 10:12 PM
Now no object culling can be done, so triangle count goes up. It's a balance. I suspect you'll get more improvement from Occlusion Culling than you will from mesh combining.
Ow, so this type of object culling is done independently of Umbra, based on distance from camera(Draw distance, I have that limited)?
Each Renderer has a bounds. That is checked against the Camera's frustrum (viewing volume). GPU is good at discarding all your extra triangles though, so FPS stays much the same.
Ow, so this works independently of Umbra, only based on distance from camera? If so, it does make sense since I have shortened the view distance and since my "optimizing" caused this culling to not occur... No wonder there was a steep rise in triangle count.
Your answer
Follow this Question
Related Questions
How to increase fps in my game? 2 Answers
Sprites performance issue 0 Answers
Vertex count and smoothing groups 2 Answers
Low frame rate with small amount of verts 0 Answers
Framerate drops and Camera.render is high -1 Answers