|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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).
You can express any 3D function as a pattern and then chuck that pattern in
a deinsity{} section in a media{} block.
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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).
This is a trick that I use fairly often to create media lighting effects.
There is, however, one crucial difference: the lack of shadows. Not just
shadows of objects, but self-shadowing of the media. In a dense scattering
media, you'll notice that parts farther away from the light are darker
because they are shadowed by the media closer to the light. That effect
doesn't happen with emitting media. If you're willing to live with this (and
often that's not a problem for me), then the shortcut is fine.
This is probably the biggest reason for the slowness of scattering media;
each sample (and there are many samples for each ray), requires a shadow ray
which also takes a number of samples.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Slime" <fak### [at] emailaddress> wrote:
> ... you'll notice that parts farther away from the light are darker
> because they are shadowed by the media closer to the light. That effect
> doesn't happen with emitting media. If you're willing to live with this (and
> often that's not a problem for me), then the shortcut is fine.
Yes, I don't believe I care about that and I think the use of "extinction 0"
in the scattering section turns that wonderful feature off anyway...?
> This is a trick that I use fairly often to create media lighting effects.
That sounds great!!!!
Now how would you go about doing that? I want the emitting media to look
exacly like a spotlight would in scattering media and I would even like to
have parameters like "radius", "falloff", and "tightness".
I would love to hear any suggestions on how to make this happen!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |