Light Radius

Started by
5 comments, last by zedzeek 18 years, 6 months ago
Does anyone know a good method of establishing the radius of the light source? There doesn't seem to be a function for it. I thought of using glScalef but the result's a bit funny. Any ideas? Thanks in advance!
Advertisement
Okay I know this might sound weird but I solved the problem! The light radius is made by how far away from 0 it is. I just have to translate it instead of giving it a world position! Okay maybe that doesn't sound weird but it did to me at first. Case closed! [smile]
I should probably make sure things work before I say I have them figured out. It seems translation doesn't work with glLightfv. Any suggestions? I'm beginning to think normals are the issue but that still wouldn't explain how a radius is done.
You need to to set the attenuation factors for the light. This will give it a radius (assuming it is a point light)
super genius
I guess this means that my normals are wrong. Thanks for the help.
But 1 last thing so I can stop making so many posts.[grin] Could I get a bit of help setting up an omni light? It seems that it must point 1 direction when it's away from the matrix and my normals are just outlandish. Is it even possible to do normals with quad planes?
due to the forumla used for light calculation (check the spec)
for all lights the radius is always infinite
ie a vertex far away from the light may get 0.0000001

This topic is closed to new replies.

Advertisement