Game Development Community

Metrics and Profiling

by Joe Sulewski · in General Discussion · 02/02/2005 (10:07 am) · 29 replies

I'm having a hard time with DTS objects using up a lot of system resources. They are simple objects with no collision detection.

So to see what's happening I tried to enter GLEnableMetrics(1); into the console and it says the function is not found. How do I get this function to work so I can see what's happening?

I ran the profiler and it says that TSShapeInstanceRender is using 57% of the time. So what's the best way to help figure out why my DTS objects are using so much resources?

I tried metrics(video); but you have to have GLEnableMetrics to work in order see all the values.

My DTS objects are all inside of an interior object that is well portalized. Do portals effect the rendering efficiency of DTS objects?

When I remove the interior I'm still getting about 18fps which is what I get with the interior. Without the dts objects I get about 60fps. Are DTS objects that inefficient to use? As I said, they are very simple objects and there are about 60 of them with only a few containing collision detection.

Any help in profiling would be greatly appreciated.

I'm on a dual 1ghz mac G4 with an ATI 9000 pro and 64mb of video ram.

Thanks for any pointers,
Joe
Page «Previous 1 2
#1
02/02/2005 (10:25 am)
Have you tested your models for errors? Even the simplest meshes can have the types of errors that Torque hates. If you're using Max, I always run an STL check before I call it done. If its a Milkshape model, be sure to reweld all vertices (since you can't check for most other errors in it). Other model packages probably have similar checks, but I'm not familiar with them.
Sorry, I can't recall the metrics usage info.
#2
02/02/2005 (10:30 am)
I'm using Blender so i don't know if I can do that.
Would the show tool show you errors?
#3
02/02/2005 (11:39 am)
I just downloaded show tool pro and it reports that my most popular objects are using between 72 and 308 detail polys. I can't imagine 50 of these would bring Torque to a crawl.

So any hints on how to figure out why I'm getting such a huge frame drop?

GLEnableMetrics doesn't work and the profiler tells me where most of the time is waisted. Are there any hints on how to make DTS objects more efficient?
#4
02/02/2005 (11:49 am)
It's surely not the fault of 50+ @ 300 polys, its just _your_ instances. Problems I've found are things like unwelded vertices, dual edges on faces, duplicated faces, uncapped holes, etc. I'm not sure which are more important than others, I just fix any and all Max tells me about.
If you can get an example object into a format I can read, I'll be happy to see if I can find any trouble spots. I really don't know what blender supports, do you have at least .3ds or .obj support? My email is in my profile if you'de like me to try.
#5
02/02/2005 (12:07 pm)
Thank you Erik. I appreciate your help and confirming my thoughts that it should not be slowing down.
#6
02/02/2005 (12:29 pm)
I checked over the models, and its as I thought. Double edges galore.
Researching my favorite modifier, STL check, it turns out its meant for stereolithography models. STL is supposedly very particular about the quality of its models, and thus the tool was developed. Consider TGE the same, as that one check (and needed fixes) seems to repair any fps loss I've ever had with a model.
#7
02/02/2005 (12:39 pm)
@Joe

To use the video metrics first type metrics(video); into the console window (and press enter) and then type glenablemetrics(1); (and press enter)

You need to type metrics(video); first to get the other working.
#8
02/02/2005 (1:05 pm)
David,

I did what you mentioned and it says function glenablemetrics not found.

Is this a windows only method?
#9
02/02/2005 (3:06 pm)
This should work in the console of any app built with TGE on any platform as far as I am aware:

~ (to enter console)
metrics("video");
glenablemetrics(1);
~ (to leave console)

You should then have a line at the top of your screen giving a lot of information.
#10
02/02/2005 (7:06 pm)
Stephen,

I tried that just as you wrote and I get unable to find function glenablemetrics(1);

I get the metrics up but they don't report anything except for fps and mspf. The other fields just show zero because I can't enable call the function.

I'm pretty familiar with the console as I can do other thing in there just fine.

That's why I'm wondering if this call is not enabled by my gl driver.

Joe
#11
02/02/2005 (7:13 pm)
@Joe: It's possible it's case sensitive, but I don't remember that being the case. It is possible that you are right and it's your video card, but I don't really see any indications to indicate that.

It might be an idea to search in files on the source code (I don't have that on this laptop unfortunately), and see if you can find the console method in the source code that handles the call...really only thing I can suggest, sorry.
#12
02/02/2005 (7:15 pm)
I had my friend try it and he's on a Mac with an NVidea 6600 and he can't call it either. I'll check the source. I've tried every case combination that makes sense. :)

Thanks anyway.
Joe
#13
02/02/2005 (7:19 pm)
Hmm...this is a wild guess, but it's possible it requires a DEBUG build--something to try anyway if you can't figure it out otherwise.
#14
02/02/2005 (7:32 pm)
I'm almost positive that is the case and was going to suggest you do a debug build. Keep in mind that this could further hinder your performance if you ahve alot of bad objects or some other problem. Especially, lots of particles seem to hurt DEBUG performance.
#15
02/02/2005 (7:37 pm)
I just tried that again for good measure and I get the same response.
#16
02/02/2005 (7:52 pm)
I just tried it in a non-debug build and it works fine. Did you compile this yourself, and what version are you using? You might want to move this over to the developer's forums or contact someone on IRC.
Have you tried this on the demo, and a clean build?
#17
02/02/2005 (7:56 pm)
Good point about IRC or the developer forums. This was more or less to help me debug my dts objects.

I have tried it on the latest 1.3 download, not cvs, and the latest lighting pack.

Joe
#18
02/02/2005 (8:04 pm)
You've stumped me. : )
#19
02/02/2005 (8:57 pm)
I just tested my app by replacing my objects with the flag pole that comes with torque, figuring it's clean object, and I get the same performance.

I figured out that I have 70 objects that were replaced and so now I have 70 flagpoles, with 240 polys each as per show tool, from the demo and my frame rates are in the 19 range rather than the 60 range without them. I expect a drop but not by that much.

hmmm.
#20
02/03/2005 (11:10 am)
The function only appears in winGLSpecial.cc (engine/platformWin32/)


Edit - removed source from public forum (many apologies)..
Page «Previous 1 2