POV-Ray : Newsgroups : povray.newusers : Can't get glass to look right Server Time
4 Nov 2024 19:16:55 EST (-0500)
  Can't get glass to look right (Message 1 to 5 of 5)  
From: Sleazy Saint
Subject: Can't get glass to look right
Date: 29 Oct 2004 18:50:00
Message: <web.4182c808a26689fe46d22db00@news.povray.org>
I've been trying to make a simple glass ball, and so far I've only produced
a jet black ball. I can't get it to look like glass. Here is a simplified
scene file, any help would be appreciated:

#include "colors.inc"

camera{
  location <0,6,-6>
  look_at <0,1.5,0>
}

light_source{
  <-3, 10, -2>
  color White
  spotlight
  radius 15
  falloff 20
  tightness 10
  point_at <0,0,0>
}

light_source{
  35*y
  color White
  area_light <10,0,0>, <0,0,10>, 10, 10
  adaptive 1
  jitter
}

plane{
  y, 0
  texture{
    pigment{ color White }
  }
}

sphere{
  <0, 2.005, 0>, 2
  texture{
    pigment{
      color rgbf <0.96, 0.97, 0.98, 0.1>
    }
    finish{
      specular 0.7
      roughness 0.001
      ambient 0.2
      diffuse 0.1
      reflection{ 0.03, 0.51
        fresnel on}
      conserve_energy
    }
  }
  interior{  ior 1.45
    fade_distance 0.50
    fade_power 1
  }
}


Post a reply to this message

From: Alain
Subject: Re: Can't get glass to look right
Date: 29 Oct 2004 19:12:25
Message: <4182ce59$1@news.povray.org>
Sleazy Saint nous apporta ses lumieres ainsi en ce 2004-10-29 18:45... :

>I've been trying to make a simple glass ball, and so far I've only produced
>a jet black ball. I can't get it to look like glass. Here is a simplified
>scene file, any help would be appreciated:
>
>#include "colors.inc"
>
>camera{
>  location <0,6,-6>
>  look_at <0,1.5,0>
>}
>
>light_source{
>  <-3, 10, -2>
>  color White
>  spotlight
>  radius 15
>  falloff 20
>  tightness 10
>  point_at <0,0,0>
>}
>
>light_source{
>  35*y
>  color White
>  area_light <10,0,0>, <0,0,10>, 10, 10
>  adaptive 1
>  jitter
>}
>
>plane{
>  y, 0
>  texture{
>    pigment{ color White }
>  }
>}
>
>sphere{
>  <0, 2.005, 0>, 2
>  texture{
>    pigment{
>      color rgbf <0.96, 0.97, 0.98, 0.1>
>  
>
The filter value is way to low, a value betwen 0.8 and 0.98 is better.

>    }
>    finish{
>      specular 0.7
>      roughness 0.001
>      ambient 0.2
>  
>
An ambient much closer to 0 would be beter (0 to 0.001)

>      diffuse 0.1
>  
>
OK

>      reflection{ 0.03, 0.51
>        fresnel on}
>  
>
OK

>      conserve_energy
>    }
>  }
>  interior{  ior 1.45
>  
>
OK

>    fade_distance 0.50
>  
>
Deffinitely to small, I got beter result with a value from 5 to 8

>    fade_power 1
>  }
>}
>
>
>  
>
Alain


Post a reply to this message

From: Sleazy Saint
Subject: Re: Can't get glass to look right
Date: 29 Oct 2004 20:10:00
Message: <web.4182db731bf351e246d22db00@news.povray.org>
Thanks.

I did everything you suggested. It helped, since the ball isn't jet black
anymore, but it still looks opaque.


Post a reply to this message

From: Mark Ulrich
Subject: Re: Can't get glass to look right
Date: 31 Oct 2004 06:15:00
Message: <web.4184c8071bf351e2de41050@news.povray.org>
"Sleazy Saint" <Oll### [at] aolcom> wrote:
> Thanks.
>
> I did everything you suggested. It helped, since the ball isn't jet black
> anymore, but it still looks opaque.

Hi,

I found something nice concerning Glass:

http://www.ignorancia.org/t_tips.php

There is an examplecode for a glass with water, and many other very useful
tips

Greets, Mark


Post a reply to this message

From: Captain Chemistry
Subject: Re: Can't get glass to look right
Date: 26 Nov 2004 17:10:00
Message: <web.41a7a8971bf351e2290632e60@news.povray.org>
"Sleazy Saint" <Oll### [at] aolcom> wrote:
> I've been trying to make a simple glass ball, and so far I've only produced
> a jet black ball. I can't get it to look like glass. Here is a simplified
> scene file, any help would be appreciated:
>
> #include "colors.inc"
>
> camera{
>   location <0,6,-6>
>   look_at <0,1.5,0>
> }
>
> light_source{
>   <-3, 10, -2>
>   color White
>   spotlight
>   radius 15
>   falloff 20
>   tightness 10
>   point_at <0,0,0>
> }
>
> light_source{
>   35*y
>   color White
>   area_light <10,0,0>, <0,0,10>, 10, 10
>   adaptive 1
>   jitter
> }
>
> plane{
>   y, 0
>   texture{
>     pigment{ color White }
>   }
> }
>
> sphere{
>   <0, 2.005, 0>, 2
>   texture{
>     pigment{
>       color rgbf <0.96, 0.97, 0.98, 0.1>
>     }
>     finish{
>       specular 0.7
>       roughness 0.001
>       ambient 0.2
>       diffuse 0.1
>       reflection{ 0.03, 0.51
>         fresnel on}
>       conserve_energy
>     }
>   }
>   interior{  ior 1.45
>     fade_distance 0.50
>     fade_power 1
>   }
> }


The following works (see below):
Also go to www.ignorancia.org - "The Persistance of Ignorance" and download
glasswater.pov because it rocks!
That fade_power & fade_distance stuff in the interior really hacked things
up and also the "rgbf <0.96, 0.97, 0.98, 0.1>" which only filters 0.1 (10%)
of the color <0.96, 0.97, 0.98> (whiteish).
You want to filter almost ALL of the color like rgbf<1,1,1,0.9> so you can
see through your glass ball.
If you are making a "hollow" glass ball like:
difference
{
  sphere{0 1}
  sphere{0 0.9}
  material{heaps of glass stuff like ior and junk}
}
And then you put some cool liquid in it that has a different ior...
You gotta raise max_trace_level in the global_settings{} block to something
higher than it's default of 5.

#include "colors.inc"

camera{
  location <0,6,-6>
  look_at <0,1.5,0>
}

light_source{
  <-3, 10, -2>
  color White
  spotlight
  radius 15
  falloff 20
  tightness 10
  point_at <0,0,0>
}

light_source{
  35*y
  color White
  area_light <10,0,0>, <0,0,10>, 10, 10
  adaptive 1
  jitter
}

plane{
  y, 0
  texture{
    //pigment{ color White }
    pigment{checker rgb 1 rgb 0}
  }
}

sphere{
  <0, 2.005, 0>, 2
  texture{
    pigment{
      //color rgbf <0.96, 0.97, 0.98, 0.1>
      color rgbf <0.96, 0.97, 0.98, 0.9>
    }
    finish{
      specular 0.7
      roughness 0.001
      ambient 0.2
      diffuse 0.1
      reflection{ 0.03, 0.51
        fresnel on}
      conserve_energy
    }
  }
  interior{  ior 1.45
    //fade_distance 0.50
    //fade_power 1
  }
}

glasswater.pov paves the way for glory my friend!
Enjoy!
Captain Chemistry


Post a reply to this message

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