POV-Ray : Newsgroups : povray.programming : A possible solution for coincident surfaces? : Re: A possible solution for coincident surfaces? Server Time
28 Apr 2024 08:01:34 EDT (-0400)
  Re: A possible solution for coincident surfaces?  
From: MessyBlob
Date: 11 Apr 2009 19:45:00
Message: <web.49e12af5149f0cf9addfbead0@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:
> Given a ray and a scene, create a list of all intersections between that
> ray and the objects in the scene.
>
> When two intersections are within some defined distance, consider them
> coincident and kick in the multitexturing.

How do you determine the ordering of the textures along the ray? This is
critical to the 'result' of the ray, unless you're only dealing only with
additive emissions.

The coincident surfaces problem is 'evil', because it happens no matter what
precision you use in the floating-point calculations.


The only approach I think will work is to assign an 'outsideness order' to each
object, and two global thresholds for precision: 'start' (larger number) and
'end' (smaller number). The 'end' would be larger than the rounding error of
the FP calculations.

For any two proximate ray intersection points, if the distance between them is:

a) greater than 'start' threshold, then the result is calculated conventionally.

b) between 'start' and 'end' threshold, then the result is an interpolation
between two objects: the object computed conventionally, and the object with
the highest 'outsideness order'.

c) less than 'end' threshold, then the result is the object with the highest
'outsideness ordering'.


The result, close up, would look a bit like the transition on a blob object made
from two blobs having different textures.

Notes:

1. You'd need to reverse the ordering if you were inside the objects, or
strictly speaking, you'd determine the appropriate interpretation of the
'outsideness order', depending whether the ray is sent from the inside or the
outside of the objects.

2. I've not properly thought how reflections would be handled, and whether there
would be any self-interaction problems, particularly with reflections and
refractions.

3. In (b) above, the interpolation would apply to all aspects of the ray
intersection point: position, normal, texture, etc.

4. The 'outsideness order' would favour one object over the other, so that
objects crossing each other would not be 'equal'. For example, '/' and '\' to
produce 'X'. But at least then there would be no noise at the coincident
surface.


Post a reply to this message

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