|The Inverse Square Law and Cinema 4D||Previous Page|
|The equation that expresses the Inverse Square Law is as follows: y=1/x^2. Thanks to Mikael Sterner for providing that equation. The jpeg below shows this expression graphed in the Mac's Graphing Calculator. Try it yourself so you can zoom in and have a better look.|
|To find the light's power at any particular point, all you have to do is enter a value for x in the equation 1/x^2. As seen below, entering 1 for x returns the value of 1, which represents 100 brightness. Enter 2 for x and you get .25, or 25%. Just as expected, the light is one quarter the strength at 2 than it was at 1, because 2 is twice the distance of 1. Enter 4 for x and you get .0625. This again is as expected, one quarter the value at the strength of the light at 2.|
|The equation on the left proves that the light's value is four times greater at the halfway mark to one.
You can enter any value for x to determine what the light's relative strength would be at that point.
|The main problem with Cinema's inverse square falloff is that the falloff is clipped at the beginning and at the end. Let's use a Christmas tree light as an example. If you set falloff at 400 inches, (33.3 feet) so that the light from the tree will just barely reach the far corners of a room, the first 60 inches or so of the light, due to the clipping, will have no falloff whatsoever, that is, everything within 60 inches of the light will be illuminated by the exact same amount. This of course will result in a very unrealistic tree illumination, as you would expect a branch with needles that is 60 inches away from the light to be illuminated less strongly than needles that are an inch away from the light.|
|Another example. Let's say you have a car with lights driving at night and you set the lights to throw 80 feet. Using Cinema's Inverse Square light falloff, all objects with 12 feet of the light will be illuminated by exactly the same amount. A person standing a foot away from the car will be illuminated the same as a person standing 12 feet from the car.|
|The movie below shows the difference between Cinema's light falloff and real falloff (each frame based upon calculated values). In the middle is the falloff I achieved with a combination light. 100 inches is the point at which there is 100% illumination|
|InverseSquareLightFile: I made my own light that well approximates true inverse square lighting, as shown above. Here is the file you can download this light. Currently this file is set to work in a situation where the light source is 100 units from the object to be illuminated, and that object is illuminate at 100%. But the light will work correctly in any size file as long as you scale the light with the model tool (don't use the object tool) so that the light's (also represented by a non rendering sphere) boundary just touches the main object to be illuminated. The light consists of three lights, and if you want it to shadow you will have to change the option on all three lights. My hope is that this can be made into an expression or plugin that will offer a more elegant interface. I offer this up as a guideline for whoever wishes to tackle the job.|