hi, I’m trying to use a light source that follows the viewer around to simulate the viewer holding a torch or other light.
All I want to achieve is the effect of light being bright around the viewer and fading off to darkness fairly quickly. I’ve been playing with attenuation parameters, but whole scene always seems to be too light.
Hmmm… I’ve tried setting all ambient light to zero. I’ve also tried
GL_CONSTANT_ATTENUATION
GL_LINEAR_ATTENUATION
GL_QUADRATIC_ATTENUATION
each with values ranging from 0.0 to 1.0.
They do seem to affect the scene – with more higher values for attenuation, the scene gets darker, but the lighting does not seem to change with respect to distance from the light.
I’m using color tracking. Maybe that matters. And I haven’t set any parameters for the surfaces of objects…