How to switch off DTS shadows
by Petteri Huttunen · in Torque Game Engine · 03/01/2007 (1:54 pm) · 6 replies
HI !
Just one stupid question:
How do I turn off dts shadow per object ?
I've made a scenery which includes small pile of rocks (static shapes, lot's of them)
and the shock was quite when I relit the scene.
So what I need is to just turn off the shadows for the rocks.
I just can't to find out how.
Of course disabling ALL the shadows helps, but I want to make some other DTS objects
that have to cast shadows.
Thanks in advance !
Just one stupid question:
How do I turn off dts shadow per object ?
I've made a scenery which includes small pile of rocks (static shapes, lot's of them)
and the shock was quite when I relit the scene.
So what I need is to just turn off the shadows for the rocks.
I just can't to find out how.
Of course disabling ALL the shadows helps, but I want to make some other DTS objects
that have to cast shadows.
Thanks in advance !
#2
If you are unsure: Go into World Editor Inspector, select one of the pile of rocks and in the right listing the highlighted list index is the currently selected object.
03/02/2007 (12:20 am)
Are they StaticShapes or TSStatics? If you are unsure: Go into World Editor Inspector, select one of the pile of rocks and in the right listing the highlighted list index is the currently selected object.
#4
Of course replace the path with your actually DTS location. The shadowEnable does just what it sounds like, enables/disables the shadow. Using StaticShapes, however, will provide you with better, more precise shadows that TSStatics, so this may solve your initial problem (bad lightmaps). These shadows are dynamic though and this is not recommended if you have a lot of these DTSs on screen, as dynamic shadows are fairly heavy to calculate.
The way you light the scene is entirely up to you and there is no right or wrong. The Light Editor is for mission lights that you place via the editor (much like your rocks). To learn about it, check out the Lighting section in TDN.
03/02/2007 (10:36 am)
Unfortunately, at this time there is no way to directly disable specific TSStatic shadows. You should probably use StaticShapes instead. These require a scripted datablock definition. You could use something like the following:datablock StaticShapeData(MyRocks)
{
shadowEnable = false;
category = "Rocks";
shapeFile = "~/data/shapes/rocks/rocks.dts";
};Of course replace the path with your actually DTS location. The shadowEnable does just what it sounds like, enables/disables the shadow. Using StaticShapes, however, will provide you with better, more precise shadows that TSStatics, so this may solve your initial problem (bad lightmaps). These shadows are dynamic though and this is not recommended if you have a lot of these DTSs on screen, as dynamic shadows are fairly heavy to calculate.
The way you light the scene is entirely up to you and there is no right or wrong. The Light Editor is for mission lights that you place via the editor (much like your rocks). To learn about it, check out the Lighting section in TDN.
#5
Just one more question:
Where do I add this datablock, and
is it possible to light the entire scene with a spotlight (not dynamic shadows), as I
did with Crytek's Sandbox editor?
That as I found out was one helluva solution which enabled selfshadowing w/minimal performance loss.
Takes a couple of minutes to calculate but it's cheap.
Best regards
03/05/2007 (12:33 am)
Thank You Ross !!Just one more question:
Where do I add this datablock, and
is it possible to light the entire scene with a spotlight (not dynamic shadows), as I
did with Crytek's Sandbox editor?
That as I found out was one helluva solution which enabled selfshadowing w/minimal performance loss.
Takes a couple of minutes to calculate but it's cheap.
Best regards
#6
Preferably, have the datablock in a file called rocks.cs, myobjects.cs, or something equally descriptive and have the file located in the same folder as the server's game.cs, which usually resides /yourgame/server or /yourgame/server/scripts. Then, in game.cs, inside the onServerCreated function, execute your script file similarly to the other execs.
I'm not familiar with Crytek's Sandbox, but it is possible to have both a static and dynamic spotlight with TSE/TGEA. It won't, however, produce very desirable results. Unless you have special circumstance, it would probably be best to stick with the sun light.
03/06/2007 (7:00 pm)
You can place the datablock in any executed script.Preferably, have the datablock in a file called rocks.cs, myobjects.cs, or something equally descriptive and have the file located in the same folder as the server's game.cs, which usually resides /yourgame/server or /yourgame/server/scripts. Then, in game.cs, inside the onServerCreated function, execute your script file similarly to the other execs.
I'm not familiar with Crytek's Sandbox, but it is possible to have both a static and dynamic spotlight with TSE/TGEA. It won't, however, produce very desirable results. Unless you have special circumstance, it would probably be best to stick with the sun light.
Torque Owner Petteri Huttunen
Default Studio Name
Weird.
PS. I'm making an outdoor scene and I'm not using anything else than the sunlight
to light up the scene. Should I be using some other lightning method ?
PS2. I'm using TSE, and I haven't found anywhere how to use this light editor.
is it for indoor use only, as whatever I change in it's setting doesn't do a thing in the scene ?