Notes on Shadows

 

There are two main types of shadows in the Torque Game Engine: Dynamic shadows, and static shadows.

Dynamic shadows

Shadows of some object classes in TGE are based on the visible mesh(es) of the object.
Torque Game Engine Classes that generate Dynamic shadows by default are:

  • Player class (based on the visible mesh(es))
  • Vehicle class (based on the visible mesh(es))
  • Wheel class (based on the visible mesh(es))
  • StaticShape class (this is not the same as 'tsstatic', see the static shadows section below) (based on the visible mesh(es))
  • tsstatic with "polysoup" enabled (based on the visible mesh(es))

Notes:

  • There is a dynamic shadow bug in versions of TGE prior to 1.5.1 which causes shadows for meshes composed of triangle list primitives not to be drawn. A fix for this bug can be found here for people who are using an older version of TGE.

 

Static Shadows

Shadows on tsstatic class objects are generated using the object's collision mesh in TGE. These shadows are baked into terrain or interior lightmap textures and will only show up after relighting the mission when new objects are placed.