1)
When I set up a light with ISceneManager::addLightSceneNode() in OpenGL, no matter what radius I specify, it won't be taken into account. Even when I set the radius to 0, the light is still on for very far objects. This doesn't happen with Direct3D.
Is it a bug, or is it me?
2)
I don't fully understand how the attenuation factor works for a light.
Do I have to specify a value for constant, linear and quadratic or only one of them? Must the value be between 0 and 1? What does a value of 0 mean? What about 1?
Thanks!
[OpenGL] Light radius doesn't work, and attenuation factor?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
The radius feature is only supported for d3d, but you should instead use attenuation. The default attenuation in Irrlicht is (1,0,0), which means that the light strength does not decrease at all. So it's full bright everywhere on the scene. An attenuation of (0,1.f/radius,0) is the "radius effect" used in previous versions of Irrlicht. It doesn't really work exactly like the radius in d3d, but looks similar. You can play around with the values of attenuation to make the light act really different, so just test on your own.