|
![](/i/fill.gif) |
Chris Huff <chr### [at] mac com> wrote:
: Bound it with a union of spheres or boxes, one around the camera and one
: around each light that you want it to interact with.
That has only one slight problem: Povray will test for that object in
every pixel. If it's a slow object, it will slow the rendering of the
whole image.
A more accurate bounding is possible by projecting the bounding box very
close to the camera/light source but still covering just the area which the
object takes.
This projection sounds quite complicated and mathematically challenging,
but it's surprisingly easy:
bounded_by
{ object
{ ... // your optimal bounding object around the object as usual
translate -Camera_Location
scale .001 // or whatever very small value; should be small enough
translate Camera_Location
}
}
I know that although it looks extremely simple, it's very hard to see
why this works. If you think about it long enough, you'll figure out why
it works.
For light_source bounding just put that one in a union and add the same
object but make the transformations with the light_source location.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |