POV-Ray : Newsgroups : povray.general : filling a bottle with fluid Server Time
29 Jul 2024 10:21:39 EDT (-0400)
  filling a bottle with fluid (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
From: joe
Subject: Re: filling a bottle with fluid
Date: 20 Aug 2012 10:40:00
Message: <web.50324b2fda492ada9949baae0@news.povray.org>
"jhu" <nomail@nomail> wrote:
> "joe" <nomail@nomail> wrote:
> > I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
> > hollow and has a wall thickness.  To fill the bottle with soda I am creating
> > another lathe object inside the bottle.  To prevent a coincident surface problem
> > should I scale the soda larger to push the soda into the bottle wall?  Any
> > better ways to fill a bottle with fluid?
>
> Here's what I usually do with such things. Make a lathe, subtract a slightly
> smaller lathe to create a hollow object, then place a slightly smaller lathe
> (just smaller than the difference) inside with appropriate media definitions. In
> all, you should have 3 of the same lathes, just different sizes.


With the liquid being slightly smaller than the cavity won't the air space
between the liquid and the wall be visible in some slight way?


Post a reply to this message

From: jhu
Subject: Re: filling a bottle with fluid
Date: 20 Aug 2012 12:40:00
Message: <web.503267e5da492adad19b0ec40@news.povray.org>
"joe" <nomail@nomail> wrote:
> "jhu" <nomail@nomail> wrote:
> > "joe" <nomail@nomail> wrote:
> > > I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
> > > hollow and has a wall thickness.  To fill the bottle with soda I am creating
> > > another lathe object inside the bottle.  To prevent a coincident surface problem
> > > should I scale the soda larger to push the soda into the bottle wall?  Any
> > > better ways to fill a bottle with fluid?
> >
> > Here's what I usually do with such things. Make a lathe, subtract a slightly
> > smaller lathe to create a hollow object, then place a slightly smaller lathe
> > (just smaller than the difference) inside with appropriate media definitions. In
> > all, you should have 3 of the same lathes, just different sizes.
>
>
> With the liquid being slightly smaller than the cavity won't the air space
> between the liquid and the wall be visible in some slight way?

Short answer: no

Long answer: no, if the camera is sufficiently far away and the "liquid" is
scaled very closely to the container. However if the camera is very close to the
container, then maybe.

Let's say your camera is 1 unit away from your bottle. You place a bottle at
<0,0,0>, then put the liquid in by scaling your bottle model by .9. You will see
a gap. However, if you scale the bottle model by .999999999 you probably won't
see the gap.


Post a reply to this message

From: joe
Subject: Re: filling a bottle with fluid
Date: 20 Aug 2012 22:30:01
Message: <web.5032f1c2da492adaad797add0@news.povray.org>
"jhu" <nomail@nomail> wrote:
<snip>
> > With the liquid being slightly smaller than the cavity won't the air space
> > between the liquid and the wall be visible in some slight way?
>
> Short answer: no
>
> Long answer: no, if the camera is sufficiently far away and the "liquid" is
> scaled very closely to the container. However if the camera is very close to the
> container, then maybe.
>
> Let's say your camera is 1 unit away from your bottle. You place a bottle at
> <0,0,0>, then put the liquid in by scaling your bottle model by .9. You will see
> a gap. However, if you scale the bottle model by .999999999 you probably won't
> see the gap.

Ok but why not just scale 1.00001 and push the liquid into the bottle wall?
Doesn't that eliminate both problems?


Post a reply to this message

From: jhu
Subject: Re: filling a bottle with fluid
Date: 21 Aug 2012 12:45:00
Message: <web.5033ba63da492adad19b0ec40@news.povray.org>
"joe" <nomail@nomail> wrote:
> "jhu" <nomail@nomail> wrote:
> <snip>

> >
> > Let's say your camera is 1 unit away from your bottle. You place a bottle at
> > <0,0,0>, then put the liquid in by scaling your bottle model by .9. You will see
> > a gap. However, if you scale the bottle model by .999999999 you probably won't
> > see the gap.
>
> Ok but why not just scale 1.00001 and push the liquid into the bottle wall?
> Doesn't that eliminate both problems?

I don't think I've ever tried that. Try them both out, and see which one works
better.


Post a reply to this message

From: Alain
Subject: Re: filling a bottle with fluid
Date: 21 Aug 2012 19:05:02
Message: <5034141e$1@news.povray.org>

> "jhu" <nomail@nomail> wrote:
>> "joe" <nomail@nomail> wrote:
>>> I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
>>> hollow and has a wall thickness.  To fill the bottle with soda I am creating
>>> another lathe object inside the bottle.  To prevent a coincident surface problem
>>> should I scale the soda larger to push the soda into the bottle wall?  Any
>>> better ways to fill a bottle with fluid?
>>
>> Here's what I usually do with such things. Make a lathe, subtract a slightly
>> smaller lathe to create a hollow object, then place a slightly smaller lathe
>> (just smaller than the difference) inside with appropriate media definitions. In
>> all, you should have 3 of the same lathes, just different sizes.
>
>
> With the liquid being slightly smaller than the cavity won't the air space
> between the liquid and the wall be visible in some slight way?
>
>
You won't see the gap itself if it's small enough.

BUT there will be extra reflections and highlights.
There will be broader total internal reflection from the glass object.
There will be total internal reflection from the liquid that should be 
totaly absent.
Those two effects are caused by the very small gap. There is no way to 
prevent those.
Making the liquid slightly larger also don't help as it just change the 
places where those problem will manifest themselves.

There will be reflection from the surfaces. Those can be reduced by 
tweaking the finishes of the glass and the liquid. It involve having a 
different finish only in the areas where the glass and liquid are in 
contact. Tricky but possible.



Alain


Post a reply to this message

From: Thomas de Groot
Subject: Re: filling a bottle with fluid
Date: 22 Aug 2012 04:12:49
Message: <50349481$1@news.povray.org>
On 21-8-2012 4:26, joe wrote:
> Ok but why not just scale 1.00001 and push the liquid into the bottle wall?
> Doesn't that eliminate both problems?

No. See image in p.b.i.

Thomas


Post a reply to this message

From: joe
Subject: Re: filling a bottle with fluid
Date: 23 Aug 2012 22:55:01
Message: <web.5036ec92da492adaad797add0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 21-8-2012 4:26, joe wrote:
> > Ok but why not just scale 1.00001 and push the liquid into the bottle wall?
> > Doesn't that eliminate both problems?
>
> No. See image in p.b.i.
>
> Thomas

Thanks for the example Thomas!  I will be digesting it this weekend!


Post a reply to this message

From: Bot
Subject: Re: filling a bottle with fluid
Date: 3 Jan 2013 08:55:01
Message: <web.50e58cd3da492adaba71d3320@news.povray.org>
"joe" <nomail@nomail> wrote:
> I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
> hollow and has a wall thickness.  To fill the bottle with soda I am creating
> another lathe object inside the bottle.  To prevent a coincident surface problem
> should I scale the soda larger to push the soda into the bottle wall?  Any
> better ways to fill a bottle with fluid?


Have you tried using csg merge? This prevents surface interference between
transparent objects, you could overlap the boundaries slightly and use merge to
remove the overlap.


Post a reply to this message

From: Alain
Subject: Re: filling a bottle with fluid
Date: 3 Jan 2013 12:02:50
Message: <50e5b9ba@news.povray.org>

> "joe" <nomail@nomail> wrote:
>> I've built a soda bottle with a bezier_spline lathe object.  It's clear glass,
>> hollow and has a wall thickness.  To fill the bottle with soda I am creating
>> another lathe object inside the bottle.  To prevent a coincident surface problem
>> should I scale the soda larger to push the soda into the bottle wall?  Any
>> better ways to fill a bottle with fluid?
>
>
> Have you tried using csg merge? This prevents surface interference between
> transparent objects, you could overlap the boundaries slightly and use merge to
> remove the overlap.
>
>
>
Not realy advisable as it will remove both surfaces and you need to keep 
one.

A possibility is to use an union of incomplete shapes:
- The container, including the inner surfaces except where the content 
is present. Have it's own interior.
- The bottom of the content, with an intermediate ior and appropriate 
interior.
- The surface of the content using a disk or any other single faced 
object. Have the same interior as the content and the proper ior.



Alain


Post a reply to this message

From: Le Forgeron
Subject: Re: filling a bottle with fluid
Date: 6 Jan 2013 04:33:23
Message: <50e944e3$1@news.povray.org>
Le 03/01/2013 18:02, Alain nous fit lire :
> Le 2013-01-03 08:51, Bot a écrit :
>> "joe" <nomail@nomail> wrote:
>>> I've built a soda bottle with a bezier_spline lathe object.  It's
>>> clear glass,
>>> hollow and has a wall thickness.  To fill the bottle with soda I am
>>> creating
>>> another lathe object inside the bottle.  To prevent a coincident
>>> surface problem
>>> should I scale the soda larger to push the soda into the bottle
>>> wall?  Any
>>> better ways to fill a bottle with fluid?
>>
>>
>> Have you tried using csg merge? This prevents surface interference
>> between
>> transparent objects, you could overlap the boundaries slightly and use
>> merge to
>> remove the overlap.
>>
>>
>>
> Not realy advisable as it will remove both surfaces and you need to keep
> one.
> 
> A possibility is to use an union of incomplete shapes:
> - The container, including the inner surfaces except where the content
> is present. Have it's own interior.
> - The bottom of the content, with an intermediate ior and appropriate
> interior.
> - The surface of the content using a disk or any other single faced
> object. Have the same interior as the content and the proper ior.

As you are reviving that thread, please find more details about the idea
of my wicked solution (from 20 August 2012):

http://wiki.povray.org/content/User:Le_Forgeron/HowTo/Perfect_glass

Happy new year 2013!


Post a reply to this message

<<< Previous 4 Messages Goto Initial 10 Messages

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