POV-Ray : Newsgroups : povray.beta-test : intersection tests : Re: intersection tests Server Time
28 Jul 2024 18:20:56 EDT (-0400)
  Re: intersection tests  
From: Bruno Cabasson
Date: 21 Sep 2007 11:50:00
Message: <web.46f3e6cfacb0bd79e8ba46670@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Bruno Cabasson <bru### [at] alcatelaleniaspacefr> wrote:
> > I take the risk of appearing stupid, but is it possible to make the
> > assumption that if a ray hits an object, the rays next to it (next pixel
> > for example, or the next ray shot, or so ...) have a high probability to
> > hit the same object, thus avoiding useless tree-traversal and intersection
> > test? Would it be costful: if the test fails, then we go on with the normal
> > traversal with little overhead, and if success, we save a non neglectable
> > time?
>
>   Testing against the same object in the next pixel and getting a hit
> doesn't tell us anything. There could be another object in front of
> the object at that next pixel, so it would have to be tested anyways.
>
> --
>                                                           - Warp

I am aware of that, of course. But what happens in our scenes? Does every
pixel concern a different object? Certainly not. What happens generally and
statistically? The case you mention (when the predicted object is occluded
for the next ray by another object) costs only one test, and the predictor
can be updated according to this new situation. In the worst case, we can
traverse the tree 'like usual'. Maybe someone intelligent (I am not), full
of math (I am not), and skilled in ray-tracing implementation concerns (I
am still not ....) could find something 'affordable'?

Bruno


Post a reply to this message

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