Game Development Community

No shadows and wrong shadows

by James Brad Barnette · in Torque Game Engine Advanced · 05/14/2007 (8:54 am) · 7 replies

I have imported my animated oil well.
www.pixollusion.com/tgea/dtsNeedShadows.jpgbut as you can see I have no shadows. I have no shadows on it and I have no shadows on the ground. I would think that I would have a animated shadow on the ground is there something that I'm missing?

Alos when I hit full relight in the editor I got that big dark square around the well tree model. it is huge and square. Is this a shadow from the bounding box and not the well tree?

#1
05/14/2007 (9:00 am)
AFAIK Torque shadows dont update dynamically except for the player/vehicle class.

have you tried resizing the bounding box on the well tree to test your theory?
#2
05/14/2007 (3:24 pm)
All objects that inherit from ShapeBase have dynamic shadows in TGEA. Do you have a StaticShape datablock for this object? You need to enable shadowing through fields on the datablock and set some properties.

Check out this TDN article for full info.
#3
05/14/2007 (4:20 pm)
Hmm ok this is what I have in the script for the pumpjack


datablock StaticShapeData(PumpJack)
{
category = "Oil Well";
shapeFile = "~/data/shapes/PumpWell/PumpJack_exp.dts";
};
function PumpJack::onAdd(%this,%obj)
{
%obj.playThread(0,"anim0"); // change idle to name of your animation
}


tried adding shadowEnable = "1";

just under :
shapeFile = "~/data/shapes/PumpWell/PumpJack_exp.dts";


did not make any difference.

good greif there what a pain there should be some global switch to turn on basic shadows. none thing in the level has shadows.
#4
05/14/2007 (8:56 pm)
Could someone show me an example or tell me what file I have to edit to enable shadows. I was all of my objects to have shadows even the static meshes. this page is just a bunch of code and I went to the faq and it explanes that the parameters are but I have know Idea where they go or as to the exact syntax.
#5
05/16/2007 (9:14 am)
The dark area in front of the object looks like the shadow - is the object a TSStatic or StaticShape?
#6
06/03/2007 (6:39 am)
Slightly old post, so im not sure if you already have it working?

In your PumpJack datablock add the following:

// Object Shadow
shadowEnable = true;
shadowCanMove = true;
shadowCanAnimate = true;
shadowSelfShadow = false;
shadowDTSShadow = false;
shadowSize = 512;
shadowAnimationFrameSkip = true;
shadowMaxVisibleDistance = 100;
shadowProjectionDistance = 50;
shadowSphereAdjust = 0.5; //Adjust this value to offset the shadow from bounding box root
#7
06/03/2007 (9:21 am)
Yeah that is pretty much that is pretty much what I have but thanks for the effort man.