POV-Ray : Newsgroups : povray.binaries.images : How to fill them up Server Time
12 Nov 2024 19:46:46 EST (-0500)
  How to fill them up (Message 1 to 9 of 9)  
From: KalleK
Subject: How to fill them up
Date: 1 Aug 2004 11:53:27
Message: <410d11f7@news.povray.org>
Hi!

These are two lathe-glasses with colored media in the upper part (and some
media in the lower part...).

My problem is, how to fill in some water (or something else).

I know, how to make the water the size it would perfectly fit in, but then
you got the "coincident surfaces problem"...

What should I do to let the ior-statements play together well (Having only
one surface between the water and the glass with "ior 1.33" to "ior 1.5")?
-Remove some surfaces with clipped_by
-Scale the water a tiny bit up, so we got some water in the glass?
-Scale it down, to have some air between the glass and the water?
-Something completely different?

(I remember faintly, that scaling it up a bit should do it, because POV-Ray
would realize this, would make only one surface from glass to water - but I
don't know anymore...)

I searched the faq (Helpfile: 2.4) but didn't find anything - I think this
could be a candidate to be added.

Thanks in advance!

Kalle


Post a reply to this message


Attachments:
Download 'glasses.jpg' (30 KB)

Preview of image 'glasses.jpg'
glasses.jpg


 

From: Severi Salminen
Subject: Re: How to fill them up
Date: 1 Aug 2004 12:38:32
Message: <410d1c88$1@news.povray.org>
KalleK wrote:
> Hi!
> 
> These are two lathe-glasses with colored media in the upper part (and some
> media in the lower part...).
> 
> My problem is, how to fill in some water (or something else).
> 
> I know, how to make the water the size it would perfectly fit in, but then
> you got the "coincident surfaces problem"...

Well, obviously you just have to alter the points a little - either 
manually or automagically. If you have the glass points in an array, you 
can easily multiple every x-coordinate by some value (<1) or subtract a 
small value to keep the gap constant.

Or if you want a bit larger liquid you multiply with a value (>1) or add 
something.

I think the adding/subtracting is a better way actually because of the gap.

I don't know whether the liquid should be larger or smaller than the 
container. So I would also like to know what is the most accurate way to 
model that. Also, should there be specular reflections where the glass 
and liquid meet?

Severi S.


Post a reply to this message

From: ingo
Subject: Re: How to fill them up
Date: 1 Aug 2004 15:55:37
Message: <Xns9538DF0D4C624seed7@news.povray.org>
in news:410d1c88$1@news.povray.org Severi Salminen wrote:

> I don't know whether the liquid should be larger or smaller than the 
> container. 

Larger, if it's smaller you'l get an air-gap with a lot of internal 
reflections. 

Ingo


Post a reply to this message

From: Severi Salminen
Subject: Re: How to fill them up
Date: 1 Aug 2004 17:10:43
Message: <410d5c53$1@news.povray.org>
ingo wrote:

>>I don't know whether the liquid should be larger or smaller than the 
>>container. 
> 
> Larger, if it's smaller you'l get an air-gap with a lot of internal 
> reflections. 

Ok, but how does POV handle the situation where a ray intersects a new 
different IOR surface before "exiting" the previous? Does the ray just 
get bended more for this short overlapping portion and then back to normal?

Severi S.


Post a reply to this message

From: Slime
Subject: Re: How to fill them up
Date: 1 Aug 2004 17:14:04
Message: <410d5d1c@news.povray.org>
> Ok, but how does POV handle the situation where a ray intersects a new
> different IOR surface before "exiting" the previous? Does the ray just
> get bended more for this short overlapping portion and then back to
normal?

I think when it hits the first surface (the water surface), it accepts that
it's inside water and uses the water ior (as far as it knows, it's going to
come out of the water before it comes out of the glass). Then, when it comes
out of the glass, it recognizes that it's been in overlapping materials and
doesn't change the ior; it simply continues through the surface of the glass
and into the water.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Severi Salminen
Subject: Re: How to fill them up
Date: 2 Aug 2004 08:06:47
Message: <410e2e57@news.povray.org>
Slime wrote:
> I think when it hits the first surface (the water surface), it accepts that
> it's inside water and uses the water ior (as far as it knows, it's going to
> come out of the water before it comes out of the glass). Then, when it comes
> out of the glass, it recognizes that it's been in overlapping materials and
> doesn't change the ior; it simply continues through the surface of the glass
> and into the water.

Sounds reasonable but is this confirmed information?

Severi


Post a reply to this message

From: Jeremy M  Praay
Subject: Re: How to fill them up
Date: 2 Aug 2004 13:32:40
Message: <410e7ab8$1@news.povray.org>
"KalleK" <kal### [at] gmxde> wrote in message news:410d11f7@news.povray.org...
> Hi!
>
> These are two lathe-glasses with colored media in the upper part (and some
> media in the lower part...).
>
> My problem is, how to fill in some water (or something else).
>
> I know, how to make the water the size it would perfectly fit in, but then
> you got the "coincident surfaces problem"...
>
> What should I do to let the ior-statements play together well (Having only
> one surface between the water and the glass with "ior 1.33" to "ior 1.5")?
> -Remove some surfaces with clipped_by
> -Scale the water a tiny bit up, so we got some water in the glass?
> -Scale it down, to have some air between the glass and the water?
> -Something completely different?
>
> (I remember faintly, that scaling it up a bit should do it, because
POV-Ray
> would realize this, would make only one surface from glass to water - but
I
> don't know anymore...)
>
> I searched the faq (Helpfile: 2.4) but didn't find anything - I think this
> could be a candidate to be added.
>

There is an excellent example of how to do this posted by one "tommy" on
April 27, 2004.

Here is a link to the image.  In one of the followups, the author also links
to the posted the source code.
http://news.povray.org/povray.binaries.images/thread/%3Cweb.408df5996f50dd40a472d3920@news.povray.org%3E/

Maybe that's not "the best" way to do it, but the results seem impressive.

-- 
Jeremy
www.beantoad.com


Post a reply to this message

From: KalleK
Subject: Re: How to fill them up
Date: 3 Aug 2004 11:41:57
Message: <410fb245@news.povray.org>
Slime wrote:
>
> I think when it hits the first surface (the water surface), it
> accepts that it's inside water and uses the water ior (as far as it
> knows, it's going to come out of the water before it comes out of the
> glass). Then, when it comes out of the glass, it recognizes that it's
> been in overlapping materials and doesn't change the ior; it simply
> continues through the surface of the glass and into the water.
I don't know, if the following contradicts your statement: I have tested,
and there is a visual difference between:

difference { // the glass with hole
  sphere { <0,5,0>,5 }
  sphere { <0,5,0>,3 }
  interior {ior 1.5}
}
sphere { <0,5,0>,3.5 // the water
  interior {ior 1.33}
}

and

//difference { // the glass with hole
  sphere { <0,5,0>,5 //}
//  sphere { <0,5,0>,3 }
//  interior {ior 1.5} // without hole...
}
sphere { <0,5,0>, 4 // the water
  interior {ior 1.33}
}

So - the surface between "glass and water" to water can be seen. It's not:
"<Beeing in glas> O! there is water, well a guess I leave the glass here and
enter the water <then hitting the end of glass> well, I've already left - so
forget it <ignoring this surface>!"

But maybe it's right-looking this way... I have to do some more tests.

Kalle


Post a reply to this message

From: KalleK
Subject: Re: How to fill them up
Date: 3 Aug 2004 11:41:58
Message: <410fb246@news.povray.org>
>
> There is an excellent example of how to do this posted by one "tommy"
> on April 27, 2004.
>
> Here is a link to the image.  In one of the followups, the author
> also links to the posted the source code.
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.408df5996f50dd40a472d3920@news.povray.org%3E/
>
Thanks for the link! This is on of the messages that were not compatible to
OE - so I'm going to watch them from the web-interface. We'll see!

Kalle


Post a reply to this message

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