Game Development Community

T3D 1.1b3 multiple animated TSStatic kills FPS - NOT A BUG

by 000 · in Torque 3D Professional · 12/06/2010 (5:21 am) · 6 replies

Hey Guys,

I didn't have this issue in 1.0.1 (I'm binary) but I went to add a couple of animated TSStatics to a scene in 1.1b3 the FPS died when I hit (x3) unique models.

3 unique:
FPS: 6
Poly: 852,000
Drawcall: 495

2 unique:
FPS: 40
Poly: 830,000
Drawcall: 482

1 unique:
FPS: 47
Poly: 788,000
Drawcall: 473

They're simple models; around 3000 poly with a diffuse and glow map.

Any suggestions?

#1
12/06/2010 (7:21 am)
Mack,try to disable the mesh instancing:
in prefs.cs

$pref::Video::disableHardwareInstancing = "1";
#2
12/06/2010 (2:02 pm)
Hey Ivan, thanks for your quick reply. :)

In \game\scripts\client I opened the prefs.cs file, the line previously looked like this:

$pref::Video::disableHardwareInstancing = "";

I set it to this:

$pref::Video::disableHardwareInstancing = "1";

Saved the file, launched the engine, opened a scene and added (x3) unique animated TSStatic models.

No change unfortunately, same as the results in my original post.
#3
12/06/2010 (2:15 pm)
Similar scene in 1.0.1 Binary:

3 unique:
FPS: 57
Polycount: 1,110,000
Drawcall: 573

I notice that in 1.1b3 it'll do the same drop FPS if I have 2 unique and sometimes it won't drop at all with 3. Although it's more common that it'll drop than not.
#4
12/06/2010 (3:51 pm)
Hmm,this type of bugs are really deep.
I would suggest to track the differences in the code,especially in RenderMeshMgr,there could be possible problems in the mesh batching.

Currently you can test several things:
1. see if this happens to other objects (players,items,..)
2. disable shadows
3. see if it is bound to objects with the same materials
4. disable glow (this causes objects to be rendered 3 times)
#5
12/07/2010 (7:33 am)
I don't have any specific ideas about your issue that Ivan hasn't already suggested, however whenever things start to get slow you can often get some clues from the profiler.

So do whatever you have to in order to cause the framerate to drop, open the console, enter profilerEnable(1), wait a few seconds, go back to the console and enter profilerEnable(0), and finally enter profilerDump() to take a look at the results.

The output is basically a tree of engine functions and details about what % of the CPU time they were using between when you enabled and disabled the profiler. If it seems like a confusing mess you can post it here (it'll be in your console.log in the same folder as the EXE) and hopefully it'll reveal something useful.
#6
12/07/2010 (2:18 pm)
Thanks Henry :)