Near attenuation on spotlights
by John Doppler Schiff · in Torque Game Engine Advanced · 07/01/2008 (7:35 am) · 2 replies
Hi folks,
I've got a character with a dynamic spotlight mounted on her head. Works great, except when the player gets too close to a wall; then, rather than getting brighter as a real flashlight would, the lighting fades to zero.
I suspect there's some sort of near attenuation setting, but I can't seem to find it in the datablock.
Can anyone point me in the right direction?
Thanks,
-- JohnDopp
I've got a character with a dynamic spotlight mounted on her head. Works great, except when the player gets too close to a wall; then, rather than getting brighter as a real flashlight would, the lighting fades to zero.
I suspect there's some sort of near attenuation setting, but I can't seem to find it in the datablock.
Can anyone point me in the right direction?
Thanks,
-- JohnDopp
#2
Decreasing the radius and offsetting the source works great, as long as volume textures aren't enabled.
Thanks for the help!
07/02/2008 (3:50 pm)
That's spot on, Jeff! Er, no pun intended. =)Decreasing the radius and offsetting the source works great, as long as volume textures aren't enabled.
Thanks for the help!
Associate Jeff Faust
Faust Logic, Inc.
See the image below of a cross-section of the volume texture for the Original Advanced lighting model. Notice the row of black voxels to the right of the green dot which marks the origin of the light.
A quick fix for this might be to offset the spotlight backwards a bit from where it's attached to the player.