POV-Ray : Newsgroups : povray.general : silly features : Re: silly features Server Time
11 Aug 2024 23:25:14 EDT (-0400)
  Re: silly features  
From: Ron Parker
Date: 11 Jun 1999 10:59:47
Message: <37612463@news.povray.org>
On Fri, 11 Jun 1999 10:30:18 -0300, Robert Dawson wrote:
>
>Ron Parker <par### [at] fwicom> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.