|
|
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
|
|