Looking up lighting info at arbitrary terrain point
by Andy Schatz · in Torque Game Engine · 08/16/2005 (4:20 pm) · 1 replies
How might I look up the non-dynamic lighting info at a particular point on the terrain? I'd like to base the lighting for individual foliage items on the lightmap information (at the initial ray-cast during foliage replication) so that my foliage items don't appear to glow during night or when they are in shadows.
Associate Matt Fairfax
PopCap
If you take a look at the implementation in sim/sceneObject.cc you'll see that it casts a ray straight down and then samples the lightmap information from the terrain object's lightmap or the interior's lightmap depending on what it hit.