Game Development Community

DTS Performance Issues

by Bryon Moirsette · in Torque Game Engine · 06/12/2004 (11:11 am) · 13 replies

Hello Everyone...


I've been doing some player modeling stuff for quake2 and quake3 over the years. And purchased torque to namely escape the legal hells of a large corporate software company. I'm good with models and modeling, but my C++ skills are at a very novice level

I'm taking my original source files in lightwave. re-keying the animation to match the default player.dts in the SDK FPS.Starter. until I noticed something rather... disturbing.

the models work. and much like when I was working in quake3... they're beautiful. but here's where the problems kicked in... the moment if put more then one model on the screen at the same time. my frame rate drops to around 20-25 fps...

Now I would understand this if I was running on the minimum system requirements for torque... but I'm not. and I'm at a loss as to why the FPS is draining so badly...

Just to make sure it wasn't something that Gnometechs lightwave to DTS exporter was doing. I took the default player DTS.... pasted about 10 times. and the frame rate was turning to garbage fast...

As I said before I've dealt with modeling for other games. and the models I have to admit are big models... but on my system with other engines (I.E. quake ) I've gotten 50+ of my own models on the screen before I started to feel any sort of frame loss..

Ohm Yeah. When I load up a mission, I can import some of my old quark map they come in great. I can increase the terrain visibility to max. and it doesn't slow down my system I must be getting 100+ fps from the feel of it. but the moment I move the camera to look at a DTS object (my player) that I placed into the scene of the mission editor. then it goes into terrible chop.


The custom player.dts I built has the following specs:

2003 polygons
104 bones
4 X 512x512 textures (I changed it to 256x256 8 bit .png maps but it doesn't affect performance)
four animations built into the DTS... object uses no DSQ files. (the basic walk, jump, back, and side...)
and the model uses no collision mesh.


AAAAND the system(s) that is taking such a serious frame loss is:

Athlon 3000+ XP shuttle PC
Windows 2003 Advanced Server/Redhat Enterprise Linux Taroone build (I've compiled for both but get the same end-result.)
ATI Radeon 9800XT w. Catalyst 4.6 drivers installed for XP (Proprietary driver from www.ati.com version 3.9.0 for linux)
1GB of ram..


And I have another system... same configs.. but with a 9700 all-in-wonder for a video card.

If there is something that needs to be tweaked right from the CVS which would get the speed of DTS files back up to speed? I'm worried that if I continue modeling the way I do that the game would be unplayable.

any help is definitely appreciated..

- Bryon

About the author

Recent Threads


#1
06/12/2004 (11:43 am)
Doesn't help your situation at all, but if you enter console mode (~ key), and then type metrics(fps);, and then leave console mode (~ again), you'll have a small window that gives you an fps count on the fly.

Might at least turn apparent fps to measureable fps for you.
#2
06/12/2004 (12:29 pm)
104 bones!? Oh my! I suspect that that has quite a bit to do with the performance issues.

As for why the game lags with about 10 default player models, well, dont look at me, I've always wondered that myself. :) Actually, I would be curious if anyone else has any ideas on that.

If you really want to figure out what is slowing down the game so much, enable the Torque "Profiler". Do a search through the resources for it, there's a guide to using it around here somewhere, and some posts on the forums about it. That's what I plan on doing in a few weeks to figure out why a few default player models are lagging the game down so much.
#3
06/12/2004 (1:05 pm)
...
#4
06/12/2004 (11:34 pm)
Okay, i did the metric(FPS) to get the absoulute frame rate.

With $pref::TS::UseTriangles = "0"; i was getting 75fps in a world scene with nothing but rolling hills in it.. and when i look at the torque default player.dts object in the mission scene.. it drops to around 40fps for just one guy...

With $pref::TS::UseTriangles = "1"; i'm now getting 200-215 fps.. and the default player.dts files only take away 8fps per object on the screen... which is much better then before.

When i inserted my custom model into the scene.. it goes from 200fps down to 40... insert another model.. and it drops to 20.. since the default .dts file which came with the SDK is working better it must be the way i built my custom player model and will try to re-build my model again..

I didn't have $pref::TS::UseTriangles = "1"; in my prefs.cs file initially until i added it.. is there other hidden options to improve DTS model performance? or is it now up to my modeling skills to reduce the polygons/bones?

With torque -show i could at least go through the animations.. but unfortunetly i couldn't find the option to tell me how many polys and bones is in the default model so i know where to stay for good game-play..

Once again.. Thank you all for the help..

- Bryon
#5
06/13/2004 (12:26 am)
That particular pref seems to compensate for weird driver issues. In other circumstances, I suppose it just slows you down.

The current player DTS has a few thousand polys at the highest detail level and a character studio Biped skeletal system. I'd guess it has bones in the 20-50 range, max.
#6
06/13/2004 (12:37 am)
Lots of bones is going to be a BAD thing in any engine. It wont affect you in Quake 2 or Quake 3 because they dont use bones (Quake 2 is entirely vertex animation and Quake 3 is segmented vertex animation I believe, with maybe a couple of bones to bend the torso).

Part of the issue of performance, at least on a lower end machine (like my test machine) is that it does some messing around with zone management during update. This can have a big impact on performance, from my profiling.

Try profiliing your own games using the built in profiler, its REALLY useful to learn.
#7
06/13/2004 (4:35 am)
Its not the bones, i can tell you that.. I have the exact same thing happening with a 3600 poly model, and it lagged before when there weren't even any bones in it to begin with. It now has around 44 bones, but i havent gotten around to testing that one in-game.

The more of these models i add, the more lag. I did a lil test, not by any numbers cause at the time i didint know about an fps counter, but i tested to see how many player models it would take to match the lag 3 of these custom models, and i made it to about 35 player models before it felt just as bad. So somethin isnt right there, and its not the bones. would LoD meshes have anything to do with this, cause my models DO lack that..
#8
06/13/2004 (5:02 am)
Jacob: How do you know that it's not the bones? They are frigging many for a model. I escaped one of our playermodels with 32 bones just fine and when there are 200+ of these models they DO affect performance, just not THAT much.

Now imagine 104 bones per object. Maybe your problem is not the same as his.

LOD shouldn't have anything to do with this. LOD is just measured on distance, not numbers, per default.
#9
06/13/2004 (6:48 am)
Well its just his problem sounds very much similar.. yes, i guess it could be the bones, butr still thats a very large drop in performance, even for that many bones, and its a drop much like im expeirienceing... I've also heard other people bring mention of this issue, still no fix tho.. Im just sayin, theres a good chance we are sharing the same problem.
#10
06/13/2004 (1:59 pm)
I think i figgured out where the DTS slow-downs are comming from.. it wasen't the bones at all. it was the materials on my model.. in quake i made three materials upper/torso/head materials.. well.. because of the way my model was mapped.. it took each surface in lightwave and defined it as a material.. which something tells me torque will load up the materials independantly. and i had a total of 9 512x512 UV's loaded instead of 3...

Anyhow i'm going to condense my mesh into one 512x512 surface and see how well it does.. while loading my 2000 polygon model into the mission editor with no materials or bones.. i could get about 20 of them before the engine began to go below 60fps.. which thats 'fair' performance. but it's certainly a lot better then loading up 2 or 3 and watching the whole engine crawl at 20-15fps..

In the mean time.. i'll learn how to use profiler ... and if there is a way to make the DTS's move faster. i'd be happy to hear it... as it stands right now.. i'm close to how many default player.dts files i can put up before a system slow-down... but not quiet there.. I have now shaved the model down to 1900 polys to keep it below the 2k mark..
#11
06/18/2004 (10:17 am)
Btw, just fonud out wot my problem was.. it WAS LoD's.. Me and my modeler finally figured it out, and we made 1 level, not even any different. I loaded the model ingame, was lag free. So jsut let this also be known to others, LoD's can be lagging ur models really badly too, make sure its there.. ;)
#12
06/18/2004 (1:23 pm)
Yeah, I've noticed that there can be problems if you dont have any detail levels. Like environment maps dont show up without at least one LOD.
#13
06/18/2004 (7:11 pm)
Ya, i had one LOD, but wasnte nuff.. needed two, and it magically fixed the lag.. Just a bit of info for anyone else with future probs.. :D