POV-Ray : Newsgroups : povray.advanced-users : No reflection for a specific object? : Re: No reflection for a specific object? Server Time
30 Jul 2024 04:11:12 EDT (-0400)
  Re: No reflection for a specific object?  
From: Warp
Date: 13 Nov 2000 09:52:17
Message: <3a100021@news.povray.org>
Chris Huff <chr### [at] maccom> 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

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