|
![](/i/fill.gif) |
On Fri, 11 Jun 1999 10:30:18 -0300, Robert Dawson wrote:
>
>Ron Parker <par### [at] fwi com> wrote
>
>> Anyway, there's an easier way to get that effect:
>>
>> #declare LightPos=<...>;
>> #declare ShadowOnlyObject=...
>>
>> light_source { LightPos rgb 1}
>> object { ShadowOnlyObject bounded_by {sphere { LightPos .001 }}}
>
> Cool. This doesn't look as if it *ought* to work, because POV-Ray has an
>absolute concept of "inside" - but it does. Clearly the shadow test uses ray
>intersections to determine whether a "legal" part of the object is blocking
>light, so is fooled if the lightsource is inside the bounding object.
The reason this works is that POV first checks for an intersection with
the bounding object before looking for intersections with the real object.
The only rays that intersect the bounding object are shadow rays, so they
are the only rays that are tested against the real object. Camera rays
and reflected rays don't hit the bounding object (usually) so POV assumes
that they also don't hit the real object.
You can also use this trick to make a vampire object (no reflection and
no shadow) by bounding with a small sphere around the camera.
Post a reply to this message
|
![](/i/fill.gif) |