Sign in to follow this  
cignox1

Lights falloff when dist 1

Recommended Posts

Hi all, I know this topic has been already discussed, but I cannot find an answer: In my raytracer the unit is (as default) interpreted as 1 meter. The 1/(dist*dist) euqation gives problems when dist < 1, so my question is (not really surprisingly): -Is there an equation that correctly models the falloff without leading to infinite with distance approaching to 0? -If not, wich are the alternatives used by raytracers (possibly physically plausible?) Thank you!

Share this post


Link to post
Share on other sites
It's normal for the light intensity to go to infinity: It's an unnatural byproduct of the unnatural situation of having a point light source. Usually, you can just accept it: After all, it's the most correct thing to do, and your ray tracer should work with floating point color internally anyway.

You may find another problem past a certain distance: At some distance, light is neglegible, but due to the quadratic fall-off you will still be processing every light for every point in your scene, no matter how small the light is, or how dim, or how far away. Therefore, you may opt for the less accurate but quite acceptable OpenGL illumination model, which does guarantee that a light goes to a zero contribution past a certain distance.

I used this in my Arauna real-time ray tracer to allow the artist to have unlimited light sources in a game level. More info in my RT07 paper: http://igad.nhtv.nl/~bikker , see downloads section.

Share this post


Link to post
Share on other sites
I already use a 'range' value to skip those lights that are too far to contribute to the scene.
As for the point light issue, I don't think it only concerns point lights: when I sample an area light, every sample I take will behave like a point light with 1/samplecounts power, so I get the same problem here. Am I missing something?

Let's change the question a little bit: if at 25 centimeters the light arriving to the point is 4 times more than the light at 1 meter, then how should I measure the power of the light?

Thank you!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this