How can I get more power from Torque?
by DME · in General Discussion · 06/24/2005 (4:52 pm) · 48 replies
I'm having some issues with performance, I'm using LOD, Null textures, shorter visable area, fog, LOD and mostly 256 X 256 texture sizes. A central part of our game is the underground city of Neltec. Below is some concept art that shows how the city should look.



When we first started out we added caves and made it look great, then we couldn't export anything. All the maps were too complex, the ones we did export caused insane FPS slow down. So then I got rid of the caves and created a hall way system that connected all the buildings. Now unfortunately I couldn't connect all the buildings together because it would just crash the exported, so I chopped it into 4 maps, they all export fine. But then a new issue came up, we could'nt have 2 separate zoned buildings close together.
So I spread out the buildings and put in a teleporting system. All the objects are Zoned, null textured and have LOD but it doesn't matter. It takes forever to load, 30 seconds to a minute, and its like the load bar goes all the way across in a normal amount of time then just freezes there for 40 seconds.
The map has slow fps around 30-40 most the time but dipping down to 10-15 for no reason, the map really doesn't have that many polys. Our models are around 3,500 polys with 7 LOD and I can't have more than 3 - 4 on the screen with out FPS dropping drastically. Plus I can be running around and it freezes for a second and my fps drop to 1 or 2, it stutters for a second then the fps go back up. If I go back over that same area there is no performance hit at all, its like it needed to stop and load more information. I'm really not sure what we are doing wrong. Tribes 2 models are around 2,000 polys plus 500 poly per gun and you can have 32 players at once, that's 80,000 polys with just characters. We are having difficulty getting 1 eighth that amount to work. Any more than 4 characters in one of our interiors kills our fps. Below is a couple pictures of our interiors. I basically just want to have a normal load time, a constant 30-60 second FPS and no stuttering. I need to make this feel like a large vibrant city but I just can't seem to get what I need to pull it off. If you have any suggestions let me know.
Thank you for your time
Brice Johnson
bricejohnson@projectraven.com






When we first started out we added caves and made it look great, then we couldn't export anything. All the maps were too complex, the ones we did export caused insane FPS slow down. So then I got rid of the caves and created a hall way system that connected all the buildings. Now unfortunately I couldn't connect all the buildings together because it would just crash the exported, so I chopped it into 4 maps, they all export fine. But then a new issue came up, we could'nt have 2 separate zoned buildings close together.
So I spread out the buildings and put in a teleporting system. All the objects are Zoned, null textured and have LOD but it doesn't matter. It takes forever to load, 30 seconds to a minute, and its like the load bar goes all the way across in a normal amount of time then just freezes there for 40 seconds.
The map has slow fps around 30-40 most the time but dipping down to 10-15 for no reason, the map really doesn't have that many polys. Our models are around 3,500 polys with 7 LOD and I can't have more than 3 - 4 on the screen with out FPS dropping drastically. Plus I can be running around and it freezes for a second and my fps drop to 1 or 2, it stutters for a second then the fps go back up. If I go back over that same area there is no performance hit at all, its like it needed to stop and load more information. I'm really not sure what we are doing wrong. Tribes 2 models are around 2,000 polys plus 500 poly per gun and you can have 32 players at once, that's 80,000 polys with just characters. We are having difficulty getting 1 eighth that amount to work. Any more than 4 characters in one of our interiors kills our fps. Below is a couple pictures of our interiors. I basically just want to have a normal load time, a constant 30-60 second FPS and no stuttering. I need to make this feel like a large vibrant city but I just can't seem to get what I need to pull it off. If you have any suggestions let me know.
Thank you for your time
Brice Johnson
bricejohnson@projectraven.com



#42
The game performance seems limited by Torque's polygon throughput, which isn't designed to handle large amounts of geometry.
From the shots posted above I can make an educated guess at the rendered poly count for those visible interior zones. I'd say about 2000 - 3000 in this shot (just for the interior - thats based on what an average video card might handle using Torque):

Interior rendering is a little inefficient (though still faster than ignoring the portals and rendering all of the geometry) and chews up the rendering time. Using highly detail interiors exaggerates this problem, and adding high poly models into that mix can drop the frame rate considerably.
There are a few ways to handle this; you can cut back the geometry in both the interiors and models, or re-factor the rendering pipeline to better manage the polygon throughput.
Let me know if this helps at all,
-John
02/27/2006 (6:24 pm)
Hi Brice,The game performance seems limited by Torque's polygon throughput, which isn't designed to handle large amounts of geometry.
From the shots posted above I can make an educated guess at the rendered poly count for those visible interior zones. I'd say about 2000 - 3000 in this shot (just for the interior - thats based on what an average video card might handle using Torque):

Interior rendering is a little inefficient (though still faster than ignoring the portals and rendering all of the geometry) and chews up the rendering time. Using highly detail interiors exaggerates this problem, and adding high poly models into that mix can drop the frame rate considerably.
There are a few ways to handle this; you can cut back the geometry in both the interiors and models, or re-factor the rendering pipeline to better manage the polygon throughput.
Let me know if this helps at all,
-John
#43
While it won't give you the code, it does talk about good areas to research for fine tuning Torque rendering.
02/27/2006 (9:48 pm)
Eric Preisz (one of the best Torque Developers, and general developers I know) pointed out some thoughts on rendering optimization in his latest .plan which is well worth reading.While it won't give you the code, it does talk about good areas to research for fine tuning Torque rendering.
#44
Great read, thanks for pointing that out.
Eric definitely hit on a few good points there - vertex buffers do provide a boost, but don't always help much and need to be weighed against flexibility, dynamic data, and memory usage (assuming he meant vbo or cva over vertex arrays).
We have a ton of in-house performance systems designed for various Torque games and projects, most of which are based on managing resources and data between the cpu and gpu. This alone provides a serious boost in not only the frame rate, but also the available throughput to the video card - allowing for significantly more geometry to be used in-game. Coupling this with vertex arrays and vbo is just awesome. :)
As always some of the best performance tweaks that you can make are game specific - basically removing things you don't need and reorganizing data to do only what you need and in the most efficient way. We've achieved some major performance increases by doing this.
02/27/2006 (10:55 pm)
Hi Stephen,Great read, thanks for pointing that out.
Eric definitely hit on a few good points there - vertex buffers do provide a boost, but don't always help much and need to be weighed against flexibility, dynamic data, and memory usage (assuming he meant vbo or cva over vertex arrays).
We have a ton of in-house performance systems designed for various Torque games and projects, most of which are based on managing resources and data between the cpu and gpu. This alone provides a serious boost in not only the frame rate, but also the available throughput to the video card - allowing for significantly more geometry to be used in-game. Coupling this with vertex arrays and vbo is just awesome. :)
As always some of the best performance tweaks that you can make are game specific - basically removing things you don't need and reorganizing data to do only what you need and in the most efficient way. We've achieved some major performance increases by doing this.
#45
Since two years ago, I've made advances in the exporters for Maya and Max and got it to a point where I'm able to generate a single stripped mesh for all DTS objects. This seems to increase performance on skinned models. Don't ask me for empirical data as I didn't do any scientific data gathering:) My observation is strictly based on the frame rate shown on my playGUI -- about 15%-20% increase (maybe). If you're interested in the exporter that I have, I can email it -- cullum_a at inoculousgames dot com.
edit - specific problem that I saw using TGE 1.2
Having this skinned model in rendering view, my frame rate would drop from 90 to 8.
edit2 - correction: frame rate increase is shown for all DTS objects
edit3 - Oops - GG has made advances to the exporter, and I just modified it a bit:)
03/04/2006 (8:01 am)
This siginificant frame rate loss when having a particular skinned DTS object is all too familiar. I had a similar problem using TGE 1.2 back almost two years ago, but the problem seemed to disappeared after TGE1.3. My skinned model was ~800 poly and had a single ambient animation sequence. I couldn't tell you if the problem existed in TGE or the exporter. I was using maya2dts exporter, but it could have been same using Max exporter. Since two years ago, I've made advances in the exporters for Maya and Max and got it to a point where I'm able to generate a single stripped mesh for all DTS objects. This seems to increase performance on skinned models. Don't ask me for empirical data as I didn't do any scientific data gathering:) My observation is strictly based on the frame rate shown on my playGUI -- about 15%-20% increase (maybe). If you're interested in the exporter that I have, I can email it -- cullum_a at inoculousgames dot com.
edit - specific problem that I saw using TGE 1.2
Having this skinned model in rendering view, my frame rate would drop from 90 to 8.
edit2 - correction: frame rate increase is shown for all DTS objects
edit3 - Oops - GG has made advances to the exporter, and I just modified it a bit:)
#46
03/04/2006 (9:51 am)
Also make sure you don't compile with debug version of DirectX DLL's. The work looks sweet so far! This is a great thread full of good info.
#47
I recently created and loaded up my first attempt at a player model... about 3000 polygons and it crawled pretty bad. The blender exporter has a "triangle strip" feature I enabled and it made a TON of difference... a TON.
03/06/2006 (9:28 am)
Very good thread. Not sure how this might apply to this situation, since I assume your models aren't made in Blender, howerever --I recently created and loaded up my first attempt at a player model... about 3000 polygons and it crawled pretty bad. The blender exporter has a "triangle strip" feature I enabled and it made a TON of difference... a TON.
#48
03/16/2006 (12:39 am)
Blender models need to be converted from a Tstrip that way you can combine the same shades in a larger texture file. I got TSE to materialize the Idv. surface this way by mapping a large texture w/ just the shinney parts and then had a normal texture for the norms and a dull noise for the bump. at 2700 polys it worked perfect on a X700 and it was sufficiant on a PCI 9250. If you want to see a example I can email one. I had trouble figuring it out but once you get one made you can make any anim model with it. I also have a script mod so you can use hot keys to alter the enviroment map
Torque Owner Clint S. Brewer