POV-Ray : Newsgroups : povray.newusers : Draw Vistas Option : Re: Draw Vistas Option Server Time
30 Jul 2024 22:17:35 EDT (-0400)
  Re: Draw Vistas Option  
From: Andreas Kaiser
Date: 3 Feb 2004 13:54:49
Message: <5onv10p3tu1lqpe9sj7822rcjlp7p7il69@4ax.com>
On Sun, 1 Feb 2004 19:31:59 +0000, Mike Williams
<nos### [at] econymdemoncouk> wrote:

>Wasn't it Carl Hoff who wrote:
>
>>I find that a little surprising as the scaled sphere is a much better fit.
>>If the sphere test is slower then a box test then I'm curious when
>>using a sphere as a bounding object would actually give an
>>improvement.  Could it be the scaling that's slowing it down?

You apply a 'bounded_by' object <B> to speed up the intersection tests
in those cases where <B> and the bounded object <O> are not
intersected (which requires that intersecting <B> is cheaper than
intersecting <O>).
You have to pay for it in those cases where <B> is intersected no
matter whether <O> is hit or missed by the ray.
Now assume two candidates <B1> and <B2> as 'bounded_by' object where
<B1> is cheaper to intersect than <B2> but <B2> better fits.
The latter means <B2> generates less 'false positive' intersections
where <O> is tested but missed by the ray.
Which of both candidates is the best one depends on the intersection
costs of <O>.
If <O> intersections are really expensive (as for a complicated
difference/intersection object) the lower number of 'false positive'
intersections of <B2> will outweigh the cheaper intersections of <B1>.
This may even change during scene development where you start with a
simple <O> object and end up with a complicated one.

>I don't think that scaling ever slows down any ray tests. What happens
>is that all the scaling, rotations and translations for an object are
>combined during parsing into a single transformation matrix. Applying
>the resulting matrix goes at the same speed whatever type of
>transformation is being applied.

But not each object needs to accumulate transformations.
For example a sphere doesn't create a TRANSFORM as long as it isn't
scaled unevenly such that it becomes a more general ellipsoid.
There are more objects (plane, triangle, ...) where only under certain
circumstances transformations are created/stored and from then on
accumulated.

Andreas


Post a reply to this message

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