POV-Ray : Newsgroups : povray.beta-test : intersection tests : Re: intersection tests Server Time
29 Jul 2024 00:27:27 EDT (-0400)
  Re: intersection tests  
From: Grassblade
Date: 22 Sep 2007 17:05:01
Message: <web.46f582bfacb0bd79d838aa940@news.povray.org>
"Bruno Cabasson" <bru### [at] alcatelaleniaspacefr> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> > Bruno Cabasson <bru### [at] alcatelaleniaspacefr> wrote:
> > > I am aware of that, of course. But what happens in our scenes? Does every
> > > pixel concern a different object? Certainly not.
> >
> >   But how can the program know that without actually testing for it?
> >
> > --
> >                                                           - Warp
>
> As a first embryonic try for this idea, it might be enough to try to
> intersect the previous object that was hit. If success, then time is saved;
> if fail, go back to normal process, and no significant time was lost. I
> think that statistically (I insist heavily on that word), we can gain
> something because most of objects occupy an entire area of the scene, more
> or less, even if they are plenty of them.
>
> Bruno.

I know nothing of how a ray-tracer works internally, so I may be spouting
nonsense, but I think you're on to something. The way I would do it is
based on the observation that the generic bounding box as seen in the
camera plane will appear as an irregular hexagon. I don't know how to save
an irregular hexagon, but if it can be done efficiently, then align
bounding boxes projection from furthest to the camera to closest, exactly
as it's done in splatting.
Just by using the trigonometry you'd save a significant number of rays.

Regarding tracing inside the box, if a ray gives a hit on the object, skip
the next both in up and side directions, and trace the second ray instead.
If it's a hit again, then assume the intermediate (skipped) ray is a hit
too. If it's a miss, then go back to the skipped ray and trace it.
I can already hear purists screaming to the top of their lungs that it's not
accurate, and I happen to agree, but since it appears we're writing the
wish-list of Pov 4, I might as well chime in. This method might be useful
for previews, quick tests, big renders and hopefully for real-time
raytracing. The final render would take the usual route, although that
should be up to the user.

Also the probabilistic thing you mention reminds me a lot of bayesian
statistics.


Post a reply to this message

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