POV-Ray : Newsgroups : povray.general : Graininess : Re: Graininess Server Time
31 Jul 2024 08:22:56 EDT (-0400)
  Re: Graininess  
From: Trevor G Quayle
Date: 12 Jan 2008 00:40:00
Message: <web.478851f522fbe8cf2ae8612c0@news.povray.org>
> This is because of bounding.  When you difference or intersect, the one object
> is turned inside-out, and has unlimited size, therefore POV is always looking
> for it, even where it is not needed.  As a rule, if possible, avoid
> difference/intersection if it can be done another way (like here), or try
> manually bounding (effect of this can vary).  Speaking of this, since you are
> subtracting it from a sphere, try manually bound the differencing object.  If
> the object fills the screen (as your camera setup is doing) you won't notice a
> huge speedup, but if you zoom out, the speedup can be great.

Just to illustrate how effective this often overlooked technique can be, I ran a
few tests using your basic scene.

I first ran the scene as is at 4 camera settings, 1) the original where the
sphere fills the image, 2)zoom out 2X, 3)zoom out 4X, 4)zoom out 10X.
I then reran the scene with the same camera settings, but manually bounding the
difference object (bounded_by{sphere{0,SphereGrid_radius*1.01}})

Unbounded:
1) 49s
2) 26s
3) 19s
4) 8s

Bounded:
1) 40s (82%, not much improvement because the object fills the entire image
almost, only the corners are skipped in the bounding check
2) 13s (50%)
3) 6s (32%)
4) 2s (25%)

As you can see, the payback gets greater as you zoom out.  This is because nore
of the scene is outside the bounding box now, so POV doesn't need to check for
intersections, whereas before, the bounding box was infinite, filled the entire
scene, so intersections had to be checked at every pixel.

-tgq


Post a reply to this message

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