POV-Ray : Newsgroups : povray.programming : A possible solution for coincident surfaces? Server Time
28 Mar 2024 19:39:59 EDT (-0400)
  A possible solution for coincident surfaces? (Message 1 to 7 of 7)  
From: Chambers
Subject: A possible solution for coincident surfaces?
Date: 5 Apr 2009 21:09:38
Message: <49d95652$1@news.povray.org>
Why not make a list of all objects returning points that may be 
coincident, select a single intersection from every object in the list, 
and combine them as if in an "average" texture map?

-- 
...Chambers
www.pacificwebguy.com


Post a reply to this message

From: clipka
Subject: Re: A possible solution for coincident surfaces?
Date: 5 Apr 2009 21:45:00
Message: <web.49d95e64149f0cf968105bc50@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:
> Why not make a list of all objects returning points that may be
> coincident, select a single intersection from every object in the list,
> and combine them as if in an "average" texture map?

This would probably solve issues with opaque textures - but for (semi-)
transparent surfaces it would still mess up things: Inside which object is the
ray then?


Post a reply to this message

From: Chambers
Subject: Re: A possible solution for coincident surfaces?
Date: 5 Apr 2009 22:56:31
Message: <49d96f5f@news.povray.org>
On 4/5/2009 6:44 PM, clipka wrote:
> Chambers<ben### [at] pacificwebguycom>  wrote:
>> Why not make a list of all objects returning points that may be
>> coincident, select a single intersection from every object in the list,
>> and combine them as if in an "average" texture map?
>
> This would probably solve issues with opaque textures - but for (semi-)
> transparent surfaces it would still mess up things: Inside which object is the
> ray then?

I was thinking the same idea could be applied there... that is, as far 
as transparency goes, separate rays would be traced for each texture 
evaluated (due to possible normal map variations).  When evaluating 
media and such, every media the point is inside should be evaluated and 
the result returned.

-- 
...Chambers
www.pacificwebguy.com


Post a reply to this message

From: Warp
Subject: Re: A possible solution for coincident surfaces?
Date: 6 Apr 2009 11:12:14
Message: <49da1bce@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:
> Why not make a list of all objects returning points that may be 
> coincident, select a single intersection from every object in the list, 
> and combine them as if in an "average" texture map?

  The surface of two objects may be (and often are) only partially
coincident. How do you determine whether a point is at a coincident
part or not?

-- 
                                                          - Warp


Post a reply to this message

From: Chambers
Subject: Re: A possible solution for coincident surfaces?
Date: 7 Apr 2009 02:31:10
Message: <49daf32e@news.povray.org>
On 4/6/2009 8:12 AM, Warp wrote:
> Chambers<ben### [at] pacificwebguycom>  wrote:
>> Why not make a list of all objects returning points that may be
>> coincident, select a single intersection from every object in the list,
>> and combine them as if in an "average" texture map?
>
>    The surface of two objects may be (and often are) only partially
> coincident. How do you determine whether a point is at a coincident
> part or not?
>

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.

-- 
...Chambers
www.pacificwebguy.com


Post a reply to this message

From: MessyBlob
Subject: Re: A possible solution for coincident surfaces?
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

From: MessyBlob
Subject: Re: A possible solution for coincident surfaces?
Date: 16 Apr 2009 20:35:01
Message: <web.49e7ce3b149f0cf9addfbead0@news.povray.org>
"MessyBlob" <nomail@nomail> wrote:
> 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 completeness, I should add that a more than two surfaces can be coincident.
One can use the same algorithm to interpolate between two of three ordered
surfaces, noting that the terms would need to be recalculated for each ray.

Also, you could keep the assignment of 'outsideness order' simple, by assigning
incremental numbers to each successive object added to the scene. You might
then want to allow a script to assign absolute or relative changes to the
value, for users who need to change this order.

p.s. I think this method is the answer for a frequent requirement, so would be
interested to hear if anyone has any notes on feasibility, and whether they'd
like this feature to be implemented without unacceptably affecting performance.


Post a reply to this message

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