POV-Ray : Newsgroups : povray.advanced-users : Difficulty with overlapping objects with media interiors : Re: Difficulty with overlapping objects with media interiors Server Time
3 Jul 2024 06:17:24 EDT (-0400)
  Re: Difficulty with overlapping objects with media interiors  
From: clipka
Date: 28 Mar 2009 11:30:01
Message: <web.49ce4199abe32fb222390e420@news.povray.org>
"Jim Hart" <nomail@nomail> wrote:
Just took the time to not only read your problem description, but also have a
look at your code and run it, to find that you probably have a different
problem than I had, and that it should be solvable.

What happens is that POV only takes into account the media of *one* object at a
time. This is not a really good thing, but difficult to change. In POV,
whenever a ray enters an object A, it is considered inside *that* object, and
no other, regardless whether the ray was in thin air or inside some other
object B; POV does make a mental note that object A seems to be nested inside
B, and will switch back to B as soon as the ray leaves A (unless the ray leaves
B first, of course), but that's how far the influence of B goes while the ray is
also in A.
So obviously, when two objects overlap, it makes a difference from which the ray
enters the intersection: It is always the object encountered later that wins.

So in order to work around this issue, you must "mix" the media yourself in the
overlapping area.

You'll probably have to define your spheres without a material first, make a
union of them, and then equip that union with as many media{} statements as you
have spheres (make sure to translate each of them like you translated the
corresponding sphere).


Post a reply to this message

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