POV-Ray : Newsgroups : povray.general : Problems combining two isosurfaces with non-flat surface Server Time
30 Jul 2024 14:17:28 EDT (-0400)
  Problems combining two isosurfaces with non-flat surface (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Christian Froeschlin
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 7 Mar 2009 05:50:48
Message: <49b25188$1@news.povray.org>
clipka wrote:
> You're right, overlapping both objects and doing a merge should do the job 

I'm not sure about this. Although ior belongs to interior physically,
I think POV-Ray uses it only when a ray crosses a surface. But that
surface is no longer there after the merge, is it?

You may also be interested in this two year old thread:

http://news.povray.org/povray.binaries.images/thread/%3C45cf36f7%40news.povray.org%3E/?ttop=287005&toff=950&mtop=238932


Post a reply to this message

From: clipka
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 7 Mar 2009 07:20:00
Message: <web.49b266648416b8f940b1852c0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> clipka wrote:
> > You're right, overlapping both objects and doing a merge should do the job
>
> I'm not sure about this. Although ior belongs to interior physically,
> I think POV-Ray uses it only when a ray crosses a surface. But that
> surface is no longer there after the merge, is it?

If you read my whole post and not just the first sentence, you'll notice that I
am perfectly aware of this.

Full quote (emphasis added this time):

"You're right, overlapping both objects and doing a merge should do the job (IN
THIS CASE; it will DEFINITELY NOT do what you need for different liquids).
[...]"


Post a reply to this message

From: Mike
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 7 Mar 2009 12:20:01
Message: <web.49b2ac718416b8f9cb45af7a0@news.povray.org>
"clipka" <nomail@nomail> wrote:
> You're right, overlapping both objects and doing a merge should do the job (in
> tis case; it will definitely not do what you need for different liquids). Did
> you test with plain boxes instead of isosurfs?
>
> Maybe you also have a max_trace_level issue here?

Ok.  I just tried to plain boxes overlapping using the merge command at it does
the same thing.  Actually, you have to mess with the lighting a bit in order to
actually see the trouble (looks good at first). I added a backlight, as I have
done for two of the images in the images section.
What I did:
I commented out all the isosurf stuff and added
box{ <-1.899,.21,-1.899>,<1.899,3.01,1.899>
to the top of the AlcoholRegion
and: box{<-1.899, 3,-1.899>,<1.899,5,1.899>
to the HeavyLiquidRegion
I did not comment out the rotate, translate.
The backlight stuff I had to add (many little LEDs)in order to visualize the
problem is:
#declare IndexX=-1.8;
#while (IndexX <=2)
    #declare IndexY=0.4;
    #while (IndexY <=5.6)
         light_source {
        <IndexX, IndexY, -2>
          color rgb <1, 0, 0>
           spotlight
           radius 150
           falloff 160
          point_at <IndexX,IndexY,0>
         }
#declare IndexY= IndexY +2;
#end
#declare IndexX=IndexX+2;
#end

Oh, and of course I uncommented the merge stuff so that I merge the two regions.
I have posted this new image in post I have going in the images section.

-Mike
P.S.  i Don't think it is max trace level because with the merge, the line is
not black, it is just visible.  And of course I did try messing with it with no
luck.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 7 Mar 2009 14:33:57
Message: <49b2cc25@news.povray.org>
Mike wrote:

> I commented out all the isosurf stuff and added
> box{ <-1.899,.21,-1.899>,<1.899,3.01,1.899>
> to the top of the AlcoholRegion
> and: box{<-1.899, 3,-1.899>,<1.899,5,1.899>
> to the HeavyLiquidRegion

Hmm, I wonder if this is related to the small strip of
coincident surfaces at the sides of your overlap. I just
made a small test using two copies of a transparent
object as in

#declare OBJ = sphere {y,1 pigment {color rgbt 1} interior {ior 1.5}}

object {OBJ}
object {OBJ}

and the refraction of the background was wildly different when
the second object was present (but not when the second object
was scaled up a tiny fraction). Also funny thing: I did not
observe this effect when the sphere was centered at 0.


Post a reply to this message

From: Mike
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 7 Mar 2009 19:25:01
Message: <web.49b30f8b8416b8f9cb45af7a0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> Hmm, I wonder if this is related to the small strip of
> coincident surfaces at the sides of your overlap. I just
> made a small test using two copies of a transparent
> object as in
>
> #declare OBJ = sphere {y,1 pigment {color rgbt 1} interior {ior 1.5}}
> object {OBJ}
> object {OBJ}
> and the refraction of the background was wildly different when
> the second object was present (but not when the second object
> was scaled up a tiny fraction). Also funny thing: I did not
> observe this effect when the sphere was centered at 0.

Not sure if you did this with the merge command or without.  I tried it, without
the merge command I see nothing weird.  With the merge command I see really
weird effect.  I did not see the weird effects go away when I centered the
spheres around zero though.  You were right, scaling up one sphere a bit did
make it look correct, amazingly.  Translating it a bit did not fix the problem,
only scaling I guess.
Also, I was trying it with my test case of the two boxes overlapping a tiny bit;
I tried scaling one box, but in that case it did not fix the problem.  I still
see the weird line at the interface.  I guess it is a bit of a different
scenario in that only a small region is overlapping as opposed to the whole
object as with the spheres?


Post a reply to this message

From: Tim Attwood
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 7 Mar 2009 23:00:44
Message: <49b342ec$1@news.povray.org>
I'm perty sure you are seeing hall of mirror and refraction effects.
Rays are passing in and out of the sinusoidal surface creating
dark spots, the surface has shallow peaks along the ridges
from floating point errors in the functions. POV also doesn't
perfectly model the IOR of interiors, the dropped out portions
of light bent inside of a material are black in POV but reflected 
IRL.

The bottom line is that POV isn't a physics simulator, it's
a way to make perty pictures.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 8 Mar 2009 07:49:41
Message: <49b3b0d5@news.povray.org>
Mike wrote:

> Not sure if you did this with the merge command or without.

attached are my images for

1. one sphere
2. two spheres with union
3. two spheres with merge

I also get a wrong result for the union, although it
is not as glaringly obvious as in the merge case ;)

Also, I tried to reconstruct your rectangle test scene based
on you original posting and the described modifications. For
me, the line went away (in the merge case) after replacing

box{<-1.899, 3,-1.899000001>,<1.899000001,5,1.899000001>

with

box{<-1.899000001, 3,-1.899000001>,<1.899000001,5,1.899000001>

I wanted to add "using 3.6.1c", but I just noticed it actually
says 3.6.1a in the about dialog ;) However, that should mostly
concern the editor according to the download page.


Post a reply to this message


Attachments:
Download 'single.jpg' (11 KB) Download 'double_union.jpg' (11 KB) Download 'double_merge.jpg' (13 KB)

Preview of image 'single.jpg'
single.jpg

Preview of image 'double_union.jpg'
double_union.jpg

Preview of image 'double_merge.jpg'
double_merge.jpg


 

From: Christian Froeschlin
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 8 Mar 2009 07:52:11
Message: <49b3b16b$1@news.povray.org>
Christian Froeschlin wrote:

> me, the line went away (in the merge case) after replacing
> 
> box{<-1.899, 3,-1.899000001>,<1.899000001,5,1.899000001>

of course, the line I was replacing was actually

   box{<-1.899, 3,-1.899>,<1.899,5,1.899>

;)


Post a reply to this message

From: Mike
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 8 Mar 2009 14:30:01
Message: <web.49b40e8e8416b8f9cb45af7a0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> Christian Froeschlin wrote:
>
> > me, the line went away (in the merge case) after replacing
> >
> > box{<-1.899, 3,-1.899000001>,<1.899000001,5,1.899000001>
>
> of course, the line I was replacing was actually
>
>    box{<-1.899, 3,-1.899>,<1.899,5,1.899>
>
> ;)

Cool, I got it to work with the flat interface (even when lit from behind which
seems to be the more difficult case).  Actually I was really hopeful so tried
it on my sine wave interface, but I guess it still did not work.  It looks good
at first, but when lit from behind (with the backlight code I put up) I still
see interface weirdness.
I used my isosurface function for the AlcoholRegion this time making the
contained by box { <-1.899000001, .21, -1.899000001>, <1.899000001, 3.5,
1.899000001> }.
Then in the heavy liquid region I did a difference operator (as suggested to me)
difference{
box{<-1.899, .21,-1.899>,<1.899,5,1.899>}
object{AlcoholRegion}
I also did a " translate -0.001*y " in the HeavyLiquidRegion so they overlap, if
I do not do this it looks even worse.
Then, I merge them.  And when lit from the back it does not look good.  When lit
from the front the interface is only a little weird at the edges, but with flat
boxes both cases seem to work.

-Mike


Post a reply to this message

From: Mike
Subject: Re: Problems combining two isosurfaces with non-flat surface
Date: 10 Mar 2009 00:00:07
Message: <web.49b5e4a38416b8f9cb45af7a0@news.povray.org>
I was able to get it to work pretty closely to reality.
By combining the tank with the liquids in a union using the difference command
for the two fluids and making sure to scale and such as we talked about I was
able to get it to work.  The interface disappears with matched IOR.  When I
mismatch the IORs I get effects I might expect.  Actually, one problem I am
having is that a low frequency wave .5 rad/sec works well, but higher
frequencies have weird interface effects.  Actually I am getting a max trace of
256/256 with high frequencies, perhaps some full internal reflections.  I am
wondering if there is a way to go above 256 for the max trace level, maybe even
a hack of the source code would be good.  maybe I should repost with that
specific question, but if anyone has any ideas, ...

-Mike


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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