Self shadowing
by Petteri Huttunen · in Torque Game Engine Advanced · 03/07/2007 (3:38 pm) · 13 replies
Hi !
I can enable dynamic shadows for DTS objects
when using them as StaticShapes, but I can't get the self shadowing to work ?
Here's the datablock:
datablock StaticShapeData(MyObject)
{
Category = "MyObject";
ShapeFile = "~/data/shapes/MyObject/MyObject.dts";
shadowEnable = true;
shadowSelfShadow = true;
shadowDTSShadow = true;
shadowSize = 256;
shadowSphereAdjust = 1.5;
shadowBias = 0.005;
shadowMaxVisibleDistance = 50;
shadowProjectionDistance = 150;
};
Thank You
I can enable dynamic shadows for DTS objects
when using them as StaticShapes, but I can't get the self shadowing to work ?
Here's the datablock:
datablock StaticShapeData(MyObject)
{
Category = "MyObject";
ShapeFile = "~/data/shapes/MyObject/MyObject.dts";
shadowEnable = true;
shadowSelfShadow = true;
shadowDTSShadow = true;
shadowSize = 256;
shadowSphereAdjust = 1.5;
shadowBias = 0.005;
shadowMaxVisibleDistance = 50;
shadowProjectionDistance = 150;
};
Thank You
#2
03/15/2007 (1:14 pm)
I'll try that, Thank You !!
#3
03/15/2007 (3:28 pm)
Sorry John, enabling the selfshadowing /adjusting the bias didn't do a thing :(
#4
03/15/2007 (3:51 pm)
Neither works the DTS Shadowing.
#5
EDITED out my error, sorry
03/16/2007 (8:39 am)
DTS Shadowing only works when self shadowing works.EDITED out my error, sorry
#6
In some other forum thread someone told to define an object as an Static Shape object which
enables it to selfshadow etc.
So if this isn't the case,
next question :
How do I make an ShapeBase derived object ?
Because I thought that these Static Shapes ARE ShapeBase derived; that's why they can cast dynamic shadows.
As I mentioned above they do cast dynamic shadows just fine, but do not not selfshadow/DTS Shadow each other.
Thank You in advance :)
03/16/2007 (9:04 am)
Ok. Thank you.In some other forum thread someone told to define an object as an Static Shape object which
enables it to selfshadow etc.
So if this isn't the case,
next question :
How do I make an ShapeBase derived object ?
Because I thought that these Static Shapes ARE ShapeBase derived; that's why they can cast dynamic shadows.
As I mentioned above they do cast dynamic shadows just fine, but do not not selfshadow/DTS Shadow each other.
Thank You in advance :)
#7
03/16/2007 (9:04 am)
StaticShapes (using the StaticShapeData datablock) are a ShapeBase derived object. Self shadowing should work for them. class StaticShape: public ShapeBaseWhen the documentation refers to "statics" they mean TSStatic objects. You appear to be doing everything correct Petteri, I'm interested to hear what John has to say.
#8
03/16/2007 (9:05 am)
Mark: exactly.
#9
03/23/2007 (1:33 pm)
Can someone send me a dts/datablock combo that's not working - I not seeing the problem here and have asked in several threads, but haven't received a response.
#10
03/23/2007 (6:16 pm)
Petteri, have you tried playing with your mission's Sun Azimuth and Elevation properties? See if that makes a difference.
#11
03/23/2007 (7:28 pm)
Yes, all kinds of settings and nothing helps.
#12
I received your email, thanks for sending over the test object.
I'm seeing the problem here too. With the test object I should be able to track down the problem and issue a fix.
03/26/2007 (10:28 am)
Petteri,I received your email, thanks for sending over the test object.
I'm seeing the problem here too. With the test object I should be able to track down the problem and issue a fix.
Torque Owner John Kabus (BobTheCBuilder)
As an example try setting the bias to 1.0 and then to 0.0, did one of those produce dark shading on the object? If so take the half way point between the two (0.5) and give it a try. Keep testing the midpoint between numbers that produce dark shading and no shadows. This will quickly zoom into the object's shadowBias value.
You can change the shadowBias in-game using the console: