# Lights falloff when dist 1

## Recommended Posts

cignox1    735
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 on other sites
phantomus    734
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 on other sites
cignox1    735
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!