view distance, poly management and power saving
by Jonas · in Torque 3D Professional · 08/03/2010 (12:42 pm) · 7 replies
Hi community!
I have been working on a set amount of game levels for the past month now and im finally at the "Optimize" step!
Ideas i have in mind for keeping up the poly management and save power:
1 Removing lights:
In my scenes i have very much light both in doors and out doors so my idea was to have them removed and added
onEnter trigger command (or hide) im not a 100% sure how to do this in a efficient way, i would also like to be able to use turn on and of shadows this way.
2 Removing meshes:
My scenes are built in a way that supports total removal of some objects to be added via a onEnter trigger to save power, same as removing light i am not a 100% sure how to go about doing this.
NOTE: im trying to keep all my scenes below 2000 draw commands at anytime.
Best regards
I have been working on a set amount of game levels for the past month now and im finally at the "Optimize" step!
Ideas i have in mind for keeping up the poly management and save power:
1 Removing lights:
In my scenes i have very much light both in doors and out doors so my idea was to have them removed and added
onEnter trigger command (or hide) im not a 100% sure how to do this in a efficient way, i would also like to be able to use turn on and of shadows this way.
2 Removing meshes:
My scenes are built in a way that supports total removal of some objects to be added via a onEnter trigger to save power, same as removing light i am not a 100% sure how to go about doing this.
NOTE: im trying to keep all my scenes below 2000 draw commands at anytime.
Best regards
About the author
Freelance 3D artist at day scripter/coder on Enduring Life at night. Lover of all things TorqueScript.
#2
Also regarding LOD, i want it in my final version but i am not sure how to use that i mean i know the meaning and what it is supposed to do but i don't know how to do it.
Since im a C++ programmer at heart all this game programming is new to me 3d modeling as well.
08/03/2010 (1:16 pm)
Thank you i will try this and give feed back.Also regarding LOD, i want it in my final version but i am not sure how to use that i mean i know the meaning and what it is supposed to do but i don't know how to do it.
Since im a C++ programmer at heart all this game programming is new to me 3d modeling as well.
#3
LOD will save a huge amount of performance. As each texture on an object creates a drawcall, reducing texture numbers on LODs as well as polys, until the last mesh LOD has only 1 texture. Also it's a good idea to make your final LOD "empty" to force it to display nothing. This is more useful on small objects than bigger ones, as you might want to be able to see a building 2 kilometres away ... but you don't want a chair rendering at that distance, so you'd set you final LOD higher so that it would stop rendering quicker.
08/03/2010 (2:22 pm)
As for putting in LOD, there are some docs in the support/documentation/artists section that cover various apps like Max/maya/etc, and I think that there's some info in the T3D docs on setting up collada.LOD will save a huge amount of performance. As each texture on an object creates a drawcall, reducing texture numbers on LODs as well as polys, until the last mesh LOD has only 1 texture. Also it's a good idea to make your final LOD "empty" to force it to display nothing. This is more useful on small objects than bigger ones, as you might want to be able to see a building 2 kilometres away ... but you don't want a chair rendering at that distance, so you'd set you final LOD higher so that it would stop rendering quicker.
#4
Back in TGE days I worked on a game where we implemented something similar to the current prefabs and used it in an adventure game to layer different sets of triggers, spawnpoints, objects and camera paths over the same mission depending on the current game objective.
08/03/2010 (6:01 pm)
You can also "group" the objects you want to load/unload in prefabs. This makes it easy to stream rooms' contents.Back in TGE days I worked on a game where we implemented something similar to the current prefabs and used it in an adventure game to layer different sets of triggers, spawnpoints, objects and camera paths over the same mission depending on the current game objective.
#6
but back to the task at hand for a second this is what i have so far:
function BigTownRemoveTrigger::onEnterTrigger( %this, %trigger )
{
echo("Entered Trigger");
if(phh06.isrenderenabled)
Triggertime(phh06);
phh06.isrenderenabled = false;
echo("Entered Trigger");
}
am i missing something? or am i just really slow today?
Note: all the echo commands show up in console.
best regards
08/05/2010 (12:21 pm)
thanks for all the great responses!but back to the task at hand for a second this is what i have so far:
function BigTownRemoveTrigger::onEnterTrigger( %this, %trigger )
{
echo("Entered Trigger");
if(phh06.isrenderenabled)
Triggertime(phh06);
phh06.isrenderenabled = false;
echo("Entered Trigger");
}
am i missing something? or am i just really slow today?
Note: all the echo commands show up in console.
best regards
#7
isRenderEnabled is new in 1.1, it's not in 1.0.1.
But it'll be very useful when 1.1 finally gets released.
08/05/2010 (3:14 pm)
My bad!isRenderEnabled is new in 1.1, it's not in 1.0.1.
But it'll be very useful when 1.1 finally gets released.
Associate Steve Acaster
[YorkshireRifles.com]
Turning a TsStatic mesh on/off (as it were ...)
And yes, you do need
And it can be literally anything - and no, I'm not a programmer so don't ask why!
And I hope that you have LODed all of your meshes as well ...