Game Development Community

Sun & Terrain

by AlexanderSLG · in Torque Game Engine · 06/13/2007 (8:06 am) · 2 replies

Is there a way of avoiding certain light sources to affect the terrain lighting? I'm trying with a second sun, but I can't find in the terrain lighting system how to filter it by name or whatever

Thanks

#1
06/13/2007 (9:07 am)
If you want the appearance of a second sun, but don't want light from it to affect shadows, you could just add a second fxSunLight object instead, decouple it from the Sun object, and put it where you want it to go, I'd think.
#2
06/13/2007 (9:36 am)
My problem is that I have some models that are supposed to blend into the terrain, but since the terrain lighting algorithms are quite exotic, and there's a huge amount of compression taking place in the lightmap calculations (at least I *think* this is the source of the problem), so the objects and the terrain are not illuminated uniformly, and the blending works in some cases and not in others. Particulary, it seems that when both color and ambient light are present, the balance breaks.

So one of the proposed solutions was to create separate light sources, one to illuminate the terrain and another one to illuminate the objects

Not having the terrain-sun illuminating the objects is easily achieved by setting lightGroupName to something specific (other than the primary sun) but having the object-sun not illuminate the terrain is giving me trouble