Level building: suggestions on optimization & improving performance
by 000 · in Torque 3D Beginner · 08/01/2010 (6:33 pm) · 7 replies
I wanted to hear if you guys have had any suggestions for performance improvements or if the only option I have is greatly controlling LODs.
#2
Try taking castShadows off textures of lower LODs (by giving them a new material) or reducing the shadow range considerably so it doesn't interact with anythign in the distance.
[edit]world's slowest typer here - lol! What Tom said
08/01/2010 (7:48 pm)
Whilst 1.1's instancing should help quite a bit, it's important to remember that every texture on an object adds to the drawcalls, so if you have an object with 10 textures - that object is the equivalent of 10 objects with a single texture -- now have 10 of the first object and you've got the equivelent of 100 objects. I wrote a couple of really boring blogs on redesigning my art assets to significantly improve performance (if you're that desperate, look for the word drawcall in the title!).Try taking castShadows off textures of lower LODs (by giving them a new material) or reducing the shadow range considerably so it doesn't interact with anythign in the distance.
[edit]world's slowest typer here - lol! What Tom said
#3
08/01/2010 (9:04 pm)
scattersky is also known for bogging down performance.
#4
08/01/2010 (10:02 pm)
It really makes me wonder why performance is bogged so bad in this engine. I can get 30 FPS in 1080p crysis with fairly close to maxed settings yet with T3D maxed on an empty terrain I get 30 FPS. I don't understand why it is so poorly optimized or if I am missing something.
#5
Basic Lighting:
FPS: 140fps
Draw Calls: 170
Polycount: 28,000
Advanced Lighting:
FPS: 20fps
Draw Calls: 1450
Polycount: 2m
Only the foreground elements have diffuse+normal, everything else is just diffuse. No specular maps.
1.1 Mesh instancing will help me greatly, I can't wait for us Binaries to get it. I am wondering if I may be forced to work within Basic Lighting with a light map bake for the environment and forgo my precious normal maps to stay within my system requirements.
08/01/2010 (11:00 pm)
Thanks for the suggestions guys! Here's my stats based on the scene I posted above:Basic Lighting:
FPS: 140fps
Draw Calls: 170
Polycount: 28,000
Advanced Lighting:
FPS: 20fps
Draw Calls: 1450
Polycount: 2m
Only the foreground elements have diffuse+normal, everything else is just diffuse. No specular maps.
1.1 Mesh instancing will help me greatly, I can't wait for us Binaries to get it. I am wondering if I may be forced to work within Basic Lighting with a light map bake for the environment and forgo my precious normal maps to stay within my system requirements.
#6
I've run the scene on 3 different machines now, my primary work machine the performance has tripled. On my 2 year old gaming notebook I'm sitting at 40fps. On my dual core, 2gb, 2600pro machine I'm at 40fps as well. I ran the tests at 16x12 rez on my primary machine and notebook (prior tests were 1280x1024) and 1280x1024 on my old machine.
The draw calls and polycount are about half of what they were before.
What I'm running into now is sudden drops in fps by 20 or even 30 frames at a time. I'm not entirely sure what it is. I haven't optimized my foreground building textures yet. I'm going to try and identify which areas have the issues and see what's up.
08/03/2010 (4:13 pm)
I dropped the normal maps, decreased the shadow range, decreased the shadow size, increased the soft shadowing.I've run the scene on 3 different machines now, my primary work machine the performance has tripled. On my 2 year old gaming notebook I'm sitting at 40fps. On my dual core, 2gb, 2600pro machine I'm at 40fps as well. I ran the tests at 16x12 rez on my primary machine and notebook (prior tests were 1280x1024) and 1280x1024 on my old machine.
The draw calls and polycount are about half of what they were before.
What I'm running into now is sudden drops in fps by 20 or even 30 frames at a time. I'm not entirely sure what it is. I haven't optimized my foreground building textures yet. I'm going to try and identify which areas have the issues and see what's up.
#7
Neill, it's Torque, it cost you $1k..it's not going to save the Earth or defend the Milky Way against the Borg. If you can license Crytek tech for $1k, let me know.
08/03/2010 (6:06 pm)
Mack, Texture Atlases come in good use.Neill, it's Torque, it cost you $1k..it's not going to save the Earth or defend the Milky Way against the Borg. If you can license Crytek tech for $1k, let me know.
Associate Tom Spilman
Sickhead Games
metrics( "fps gfx" );
... into the console. The key numbers to look at there are your frame rate and number of draw calls. If your draw calls should usually be around 2000 or so... much more and you will start to really hurt performance. Of course the lower the better.
The key to getting less draw calls is having LODs that reduce the number of materials a model uses. Also adding "null LODs" by adding a final detail node into your model that doesn't contain a mesh lets you completely disable a mesh when its gotten small on screen.
Other than that 1.1 final has hardware mesh instancing which will significatly reduce your draw calls in scenes with lots of instanced meshes. That plus other improvements in 1.1 should help you alot.