POV-Ray : Newsgroups : povray.binaries.images : hollow interior with fading issue Server Time
22 Dec 2024 07:05:39 EST (-0500)
  hollow interior with fading issue (Message 1 to 7 of 7)  
From: Chris R
Subject: hollow interior with fading issue
Date: 14 Jun 2023 09:30:00
Message: <web.6489c03e34998f938a3c0aee5cc1b6e@news.povray.org>
I am working on a scene that will include some glasses with colored liquids
inside of them.  While working on the model for the liquid, I noticed that
something odd was happening when I used interior fading to color the liquid.

The image on the left is the shape of the liquid rendered with a solid texture:
pigment { color rgb 0.5 } interior { ior 1.34 }

The image on the right is the same shape rendered with a transparent texture and
fading:

pigment { color rgbf 1 } interior { ior 1.34 fade_color <1, 0, 0> fade_distance
1 }

From this viewpoint, in the solid version you can see the curve of the liquid
object bowing upwards as expected.  In the transparent version, there is a sharp
horizontal line where the fade_color ends, below that curve.  You can see the
interior is still applying to the space above that line, as the vertical green
cylinder is broken where the ior changes, but the fade color is completely
missing in that segment.

I would expect to see some variation in the color in that region due to light
traveling different distances based on the camera angle, but not a complete drop
out.

Any idea why this might be happening?

-- Chris R.


Post a reply to this message


Attachments:
Download 'glassware-issue.png' (216 KB)

Preview of image 'glassware-issue.png'
glassware-issue.png


 

From: Chris R
Subject: Re: hollow interior with fading issue
Date: 14 Jun 2023 09:35:00
Message: <web.6489c17a1347764b8a3c0aee5cc1b6e@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> I am working on a scene that will include some glasses with colored liquids
> inside of them.  While working on the model for the liquid, I noticed that
> something odd was happening when I used interior fading to color the liquid.
>
> The image on the left is the shape of the liquid rendered with a solid texture:
> pigment { color rgb 0.5 } interior { ior 1.34 }
>
> The image on the right is the same shape rendered with a transparent texture and
> fading:
>
> pigment { color rgbf 1 } interior { ior 1.34 fade_color <1, 0, 0> fade_distance
> 1 }
>
> From this viewpoint, in the solid version you can see the curve of the liquid
> object bowing upwards as expected.  In the transparent version, there is a sharp
> horizontal line where the fade_color ends, below that curve.  You can see the
> interior is still applying to the space above that line, as the vertical green
> cylinder is broken where the ior changes, but the fade color is completely
> missing in that segment.
>
> I would expect to see some variation in the color in that region due to light
> traveling different distances based on the camera angle, but not a complete drop
> out.
>
> Any idea why this might be happening?
>
> -- Chris R.

I should have included this in the initial post.  Here is a version using a
transparent colored pigment and no fading.  This is more what I would expect
from a completely transparent version with fading.  The lighter region on the
top in this version is where the viewing angle sends the light through a shorter
distance in the liquid, and corresponds to the completely transparent section in
the version with the fade_color.

-- Chris R.


Post a reply to this message

From: Chris R
Subject: Re: hollow interior with fading issue
Date: 14 Jun 2023 10:00:00
Message: <web.6489c79d1347764b8a3c0aee5cc1b6e@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> "Chris R" <car### [at] comcastnet> wrote:
> > I am working on a scene that will include some glasses with colored liquids
> > inside of them.  While working on the model for the liquid, I noticed that
> > something odd was happening when I used interior fading to color the liquid.
> >
> > The image on the left is the shape of the liquid rendered with a solid texture:
> > pigment { color rgb 0.5 } interior { ior 1.34 }
> >
> > The image on the right is the same shape rendered with a transparent texture and
> > fading:
> >
> > pigment { color rgbf 1 } interior { ior 1.34 fade_color <1, 0, 0> fade_distance
> > 1 }
> >
> > From this viewpoint, in the solid version you can see the curve of the liquid
> > object bowing upwards as expected.  In the transparent version, there is a sharp
> > horizontal line where the fade_color ends, below that curve.  You can see the
> > interior is still applying to the space above that line, as the vertical green
> > cylinder is broken where the ior changes, but the fade color is completely
> > missing in that segment.
> >
> > I would expect to see some variation in the color in that region due to light
> > traveling different distances based on the camera angle, but not a complete drop
> > out.
> >
> > Any idea why this might be happening?
> >
> > -- Chris R.
>
> I should have included this in the initial post.  Here is a version using a
> transparent colored pigment and no fading.  This is more what I would expect
> from a completely transparent version with fading.  The lighter region on the
> top in this version is where the viewing angle sends the light through a shorter
> distance in the liquid, and corresponds to the completely transparent section in
> the version with the fade_color.
>
> -- Chris R.

This time with the image attached...

-- Chris R.


Post a reply to this message


Attachments:
Download 'glassware.png' (178 KB)

Preview of image 'glassware.png'
glassware.png


 

From: Alain Martel
Subject: Re: hollow interior with fading issue
Date: 14 Jun 2023 10:38:23
Message: <6489d0df$1@news.povray.org>
Le 2023-06-14 à 09:27, Chris R a écrit :
> I am working on a scene that will include some glasses with colored liquids
> inside of them.  While working on the model for the liquid, I noticed that
> something odd was happening when I used interior fading to color the liquid.
> 
> The image on the left is the shape of the liquid rendered with a solid texture:
> pigment { color rgb 0.5 } interior { ior 1.34 }
> 
> The image on the right is the same shape rendered with a transparent texture and
> fading:
> 
> pigment { color rgbf 1 } interior { ior 1.34 fade_color <1, 0, 0> fade_distance
> 1 }
> 
>  From this viewpoint, in the solid version you can see the curve of the liquid
> object bowing upwards as expected.  In the transparent version, there is a sharp
> horizontal line where the fade_color ends, below that curve.  You can see the
> interior is still applying to the space above that line, as the vertical green
> cylinder is broken where the ior changes, but the fade color is completely
> missing in that segment.
> 
> I would expect to see some variation in the color in that region due to light
> traveling different distances based on the camera angle, but not a complete drop
> out.
> 
> Any idea why this might be happening?
> 
> -- Chris R.

There is a missing parameter : fade_power

Try again, but with fade_power 1001

That image look as if the fade_power is zero.


Post a reply to this message

From: Chris R
Subject: Re: hollow interior with fading issue
Date: 14 Jun 2023 11:55:00
Message: <web.6489e1fe1347764b8a3c0aee5cc1b6e@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:

> > I am working on a scene that will include some glasses with colored liquids
> > inside of them.  While working on the model for the liquid, I noticed that
> > something odd was happening when I used interior fading to color the liquid.
> >
> > The image on the left is the shape of the liquid rendered with a solid texture:
> > pigment { color rgb 0.5 } interior { ior 1.34 }
> >
> > The image on the right is the same shape rendered with a transparent texture and
> > fading:
> >
> > pigment { color rgbf 1 } interior { ior 1.34 fade_color <1, 0, 0> fade_distance
> > 1 }
> >
> >  From this viewpoint, in the solid version you can see the curve of the liquid
> > object bowing upwards as expected.  In the transparent version, there is a sharp
> > horizontal line where the fade_color ends, below that curve.  You can see the
> > interior is still applying to the space above that line, as the vertical green
> > cylinder is broken where the ior changes, but the fade color is completely
> > missing in that segment.
> >
> > I would expect to see some variation in the color in that region due to light
> > traveling different distances based on the camera angle, but not a complete drop
> > out.
> >
> > Any idea why this might be happening?
> >
> > -- Chris R.
>
> There is a missing parameter : fade_power
>
> Try again, but with fade_power 1001
>
> That image look as if the fade_power is zero.

Sorry, I just didn't completely specify the interior I was using in the post.  I
did have a fade_power of 1001.  Here's the full texture:

pigment { color rgbt 1 } interior { ior 1.34 fade_color <1,0,0> fade_distance 1
fade_power 1001 }



-- Chris R.


Post a reply to this message

From: William F Pokorny
Subject: Re: hollow interior with fading issue
Date: 14 Jun 2023 18:34:23
Message: <648a406f$1@news.povray.org>
On 6/14/23 09:27, Chris R wrote:
> I would expect to see some variation in the color in that region due to light
> traveling different distances based on the camera angle, but not a complete drop
> out.
> 
> Any idea why this might be happening?

My guess is the top of the liquid shape is open - or for some reason 
effectively open as traced.

The interior fade function - unlike media - works correctly only when 
the interior shape is "clean." Meaning there is a clearly defined pair 
of surfaces of the interior shape defining the distance. The second 
surface also provides the starting color(a) ahead of the fade to color 
calculation.

(a) - Some exceptions apply.

Aside: This very likely also why there is no fading to color in front of 
the green axis cylinder.

Both the fade and colored-transparency images posted indicate there is 
no second surface. Why that might be, I don't know.

An interesting experiment would be to replace the liquid shape with a 
sphere. My guess is that will work OK except perhaps where rays are 
nearly tangent to the sphere's surface.

Bill P.

Aside: It looks to me like there might be some other noise in the posted 
images too - or maybe it's just "floaters" compliments of my old eyes. 
:-)


Post a reply to this message

From: Chris R
Subject: Re: hollow interior with fading issue
Date: 15 Jun 2023 10:10:00
Message: <web.648b1b8f1347764b14589f4d5cc1b6e@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 6/14/23 09:27, Chris R wrote:
> > I would expect to see some variation in the color in that region due to light
> > traveling different distances based on the camera angle, but not a complete drop
> > out.
> >
> > Any idea why this might be happening?
>
> My guess is the top of the liquid shape is open - or for some reason
> effectively open as traced.
>
> The interior fade function - unlike media - works correctly only when
> the interior shape is "clean." Meaning there is a clearly defined pair
> of surfaces of the interior shape defining the distance. The second
> surface also provides the starting color(a) ahead of the fade to color
> calculation.
>
> (a) - Some exceptions apply.
>
> Aside: This very likely also why there is no fading to color in front of
> the green axis cylinder.
>
> Both the fade and colored-transparency images posted indicate there is
> no second surface. Why that might be, I don't know.
>
> An interesting experiment would be to replace the liquid shape with a
> sphere. My guess is that will work OK except perhaps where rays are
> nearly tangent to the sphere's surface.
>
> Bill P.
>
> Aside: It looks to me like there might be some other noise in the posted
> images too - or maybe it's just "floaters" compliments of my old eyes.
> :-)

Thanks for looking into this Bill.  The object is actually an isosurface whose
function is a combination of a torus, cylinder, and truncated cone.  The upper
limit of the object is simply "y - height".  Maybe the cone function isn't clean
enough to define the top for fading purposes?

As for the noise, I forgot to mention the liquid contains a CO2 stream rising
from the bottom, so that's probably what you are seeing.  I should have removed
that from the model before posting this to make it clearer.  I tested without
the bubbles and I get the same results.

In any case, I have switched to doing this with media instead of fading, as it
is easier to add in the general foaminess of the beverage that way, and the
media versions work well.  I just found it curious.

-- Chris R.


Post a reply to this message

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