DTS and Static Shadows
by Thomas Bang · in Torque Game Engine · 09/30/2007 (3:15 am) · 7 replies
Hi
I wonder why i cant get Static Shadows on the Terrain from a Static Shape.
The Orc = dynamic Shadow
The Lattice = static Shadow???
( the Collision Mesh is set correctly !!! )
Here is a picture...

Thanks
Thomas Bang
I wonder why i cant get Static Shadows on the Terrain from a Static Shape.
The Orc = dynamic Shadow
The Lattice = static Shadow???
( the Collision Mesh is set correctly !!! )
Here is a picture...

Thanks
Thomas Bang
#2
10/01/2007 (5:30 am)
I got it. Thanks.
#3
10/04/2007 (7:01 pm)
I understand what Caylo is saying, but it makes no sense why the static class doesn't create a shadow.
#4
To get static shadows i wrote the following:
If you want to receive shadows on dts-objects you have to modify the engine-source-code.
Under TorqueDemo/Source Files/game you have to modify shadow.cc
Line 21:
U32 Shadow::smShadowMask = TerrainObjectType | InteriorObjectType;
Instead you have to write:
U32 Shadow::smShadowMask = TerrainObjectType | InteriorObjectType | StaticShapeObjectType | StaticObjectType;
Please note: Cast and receive shadows depends on the Collisionmesh.
10/05/2007 (1:43 am)
ITEM creates a dynamic shadow. To get static shadows i wrote the following:
datablock StaticShapeData(Shape_Gitter)
{
category = "test";
shapeFile = "~/data/shapes/gitter2/gitter2.dts";
shadowEnable = true;
}If you want to receive shadows on dts-objects you have to modify the engine-source-code.
Under TorqueDemo/Source Files/game you have to modify shadow.cc
Line 21:
U32 Shadow::smShadowMask = TerrainObjectType | InteriorObjectType;
Instead you have to write:
U32 Shadow::smShadowMask = TerrainObjectType | InteriorObjectType | StaticShapeObjectType | StaticObjectType;
Please note: Cast and receive shadows depends on the Collisionmesh.
#5
10/06/2007 (6:24 am)
That's odd. I can get static shadow from DTS opbject by unchecking every option other than the "RecieveSunlight: in Lighting category (though I don't get dynamic shadow from player model on the model itself for some reason). Also, anyone knows how to resize those columns to read what is written in the label fields?
#6
Nikhil: I don't think DTS shapes can recieve shadows, can they? Only DIFs, and they still don't self-shadow.
10/08/2007 (12:18 am)
Thomas, thanks for that!Nikhil: I don't think DTS shapes can recieve shadows, can they? Only DIFs, and they still don't self-shadow.
#7
10/09/2007 (7:48 am)
As far as I know Daniel, is right, DTS shadow over DIFs that's all.
Torque 3D Owner Caylo Gypsyblood