ObjectLight
by Howard Dortch · in Torque Game Engine · 02/13/2006 (7:49 am) · 2 replies
Is there a way to light an object super bright? as in a player. Self illuminate setting or something ?
#2
The reason I wanted this is to simulate a night vision on the client only. I figured a dark scene would be brighter / green tint if I could bump the light for a client.
All the night vision resources I have seen dont work too well and thought this would be a quick and dirty "cheat" thoughts?
02/14/2006 (9:40 am)
I'm using 1.3 and dont see sgGlobalBlendColor in thereThe reason I wanted this is to simulate a night vision on the client only. I figured a dark scene would be brighter / green tint if I could bump the light for a client.
All the night vision resources I have seen dont work too well and thought this would be a quick and dirty "cheat" thoughts?
Torque Owner John Kabus (BobTheCBuilder)
You can blend color into any DTS object by setting the C++ lighting parameter 'sgLightManager::sgGlobalBlendColor', while rendering, right before the object makes its call to 'installLights'.
This color is modulated (multiplied) into the object's lighting, so setting the parameter to (1.0, 1.0, 1.0) keeps the lighting the same, where as (0.5, 0.5, 0.5) halves it. To double the lighting use (2.0, 2.0, 2.0)
You can also blend custom colors into the lighting, like blue (0.0, 0.0, 1.0).
-John