TsStatic Shadows Confusion....
by Harvey Greensall · in Torque Game Engine Advanced · 09/04/2007 (6:02 am) · 4 replies
I know, I know..This should be so easy. I know I shouldn't be having a problem with this, but I've been going round in circles trying to fix this, I thought, once and for all, you guys could help me sort this out.....Here goes....Sorry for the large post but I'm trying to be pretty accurate with my explanation...
Before we ported to TGEA all our TsStatic's had this in the mission file:
new TSStatic(palm_stand) {
position = "-308.338 174.002 203.588";
rotation = "0 0 1 112.3";
scale = "1 1 1";
shapeName = "~/data/shapes/EXPORT/palm_stand_a.dts";
receiveSunLight = "1";
receiveLMLighting = "1";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "0 0 0 1";
disableDynamicShadows = "1";
disableDynamicShadowMove = "1";
disableDynamicShadowAnimate = "1";
This prevented them from casting and type of shadow on the terrain. As far as I know they didn't cast a 'lightmapped' shadow either from the object. Does anyone know how we have this same answer in TGEA? From reading various threads It looks like we need a TsStaticShapes Datablock, with this in:
// Object Shadow
shadowEnable = false;
shadowCanMove = false;
shadowCanAnimate = false;
shadowSelfShadow = false;
Does this mean I have to now have a datablock for all our TsStatic shapes to turn the shadows off? Obviously everything else in there like pickups and targets etc. that already have a datablock can have this added to their datablock but I'm not completely sure how I add this to our existing static objects.
Basically, all our object are behaving themselves OTHER than anything that was added as a Static shape, these project a dark large square onto the lightmap which needs to go...I presume from the bounds box. Looks terrible.
Cheers anyone for any help!!
Before we ported to TGEA all our TsStatic's had this in the mission file:
new TSStatic(palm_stand) {
position = "-308.338 174.002 203.588";
rotation = "0 0 1 112.3";
scale = "1 1 1";
shapeName = "~/data/shapes/EXPORT/palm_stand_a.dts";
receiveSunLight = "1";
receiveLMLighting = "1";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "0 0 0 1";
disableDynamicShadows = "1";
disableDynamicShadowMove = "1";
disableDynamicShadowAnimate = "1";
This prevented them from casting and type of shadow on the terrain. As far as I know they didn't cast a 'lightmapped' shadow either from the object. Does anyone know how we have this same answer in TGEA? From reading various threads It looks like we need a TsStaticShapes Datablock, with this in:
// Object Shadow
shadowEnable = false;
shadowCanMove = false;
shadowCanAnimate = false;
shadowSelfShadow = false;
Does this mean I have to now have a datablock for all our TsStatic shapes to turn the shadows off? Obviously everything else in there like pickups and targets etc. that already have a datablock can have this added to their datablock but I'm not completely sure how I add this to our existing static objects.
Basically, all our object are behaving themselves OTHER than anything that was added as a Static shape, these project a dark large square onto the lightmap which needs to go...I presume from the bounds box. Looks terrible.
Cheers anyone for any help!!
#2
On a similar note, when you position a DTS object over a lightmap shadow area on the terrain, or your character ( in our case big ships) passes over a shadow, the entire DTS darkens, great if you're a human size character running into shadow etc. but looks odd in our case so we need to switch this off too....any ideas of how or indeed if this can be done...?
Thanks again,
09/04/2007 (8:38 am)
Ahaar!! there lies my confusion I suppose. I'll set up a static object datablock instead of just dragging them in as TSStatics.....I'll do exactly that and see how I get on. Cheers!On a similar note, when you position a DTS object over a lightmap shadow area on the terrain, or your character ( in our case big ships) passes over a shadow, the entire DTS darkens, great if you're a human size character running into shadow etc. but looks odd in our case so we need to switch this off too....any ideas of how or indeed if this can be done...?
Thanks again,
#3
09/04/2007 (8:48 am)
This is controlled by SceneObject::getLightingAmbientColor(ColorF * col). So I'd add a flag to return false for your large DTS objects or something.
#4
So, I need to see if I can add a line to my Ship datablock? Is that correct? So literally:
SceneObject::getLightingAmbientColor(ColorF * col) = false
Don't laugh 8(, I'm no coder that's for sure. I don't want to bother our Code guy is all, he'll be well impressed....
09/04/2007 (9:01 am)
Fantastic! Thanks Brian, I'll look into that tomorrow too........hold on though....wait for the artist based question.....So, I need to see if I can add a line to my Ship datablock? Is that correct? So literally:
SceneObject::getLightingAmbientColor(ColorF * col) = false
Don't laugh 8(, I'm no coder that's for sure. I don't want to bother our Code guy is all, he'll be well impressed....
Torque 3D Owner Mark Dynna