I am interested in exactly how spotlights work.
If you chuck a spotlight through some scattering media you get a nice effect
but it takes ages.
What if I told you that the SAME EFFECT could be obtained by creating some
functions that *simulate* spotlight intensity at all points in it's cone
and then using those functions in some EMITTING media which can be maybe
100 times faster than scattering media in a slightly detailed image (no
joke).
For the following functions I assume the spotlight points up in the positive
y direction and starts as a point at the origin.
At this point, I need to know several functions:
* a 3D function to assign a value between 0 and 1 for all points in a
spotlight cone given these parameters: radius, falloff, tightness
* a light fading function. This is (i think) in the pov documentation so
that's not as important.
I am mainly interested in the first function. At all points in the radius
cone (where the angle between the point and the y axis is less than the
"radius") the light intensity multiplier is 1.
At all points in the falloff section the light intensity multiplier falls
off from 1 and reaches zero by the time the angle reaches "falloff"
degrees.
I am guessing that there is an exponential decay here (something like an
s-bend thing) but the documentation doesn't go into the actual formula.
I should like to know that formula.
If anyone could help (even dudes on the pov-team that made this stuff) I
would be very grateful.
Nathan Jolly (Captain Chemistry)
Post a reply to this message
|