POV-Ray : Newsgroups : povray.general : Glass and Text Problem Server Time
28 Nov 2024 00:37:51 EST (-0500)
  Glass and Text Problem (Message 1 to 3 of 3)  
From: NightHawk
Subject: Glass and Text Problem
Date: 17 Oct 2007 17:55:01
Message: <web.4716841afb2e10107be156420@news.povray.org>
Hi Im having a problem with a double textured glass sphere. Basically, I
create a glass sphere, texture it with glass texture, and then add some
text texture on top of it. The problem is that when rendered at qualities
higher than 6, the sphere glass gets colors the same color as text. If I
add multiple text textures, the sphere becomes almost white. What am I
doing wrong? here is the code for just the sphere and text.

global_settings {
   max_trace_level 8
   assumed_gamma 2
   ambient_light 0.2
   max_intersections 128
   adc_bailout 1/255 }

#declare R1 = text {ttf "OHIO_SCR.ttf", "Test", 2, 0
  translate <-1.35,0.4,-3> }

union{
object { sphere {<0,0,0>,3 material {SF_Glass}
                           texture {pigment {object {R1 rgbt 1 rgb <1,1,0> }
 scale 1.6} finish {ambient 2 diffuse 0.95 specular 0.9 roughness 0.01
reflection{P_Gold3*.3,P_Gold3.gray*.5}}}
                                                    }
                           scale 0.33}
}

object{tree_sphere2}

camera {

   location <1.2, 3, -2.5>
   look_at  <2.15, 0.65, 0>
   angle 51
}


Post a reply to this message

From: Tim Attwood
Subject: Re: Glass and Text Problem
Date: 18 Oct 2007 20:36:29
Message: <4717fc0d$1@news.povray.org>
When you layer materials the finishes all contribute.
Remove the finishes from all but the final top layer.

When you start dealing with glass the back of the
textures (interior_texture) starts to matter too, the
rear of things you would normally not see reflect in
odd places (the rear of a surface is the same
illumination as the front, which isn't like RL, except
lamp shades and stuff, especially with high ambients),
so often it's better just to place text onto a "decal"
object that sits on the surface.

#include "colors.inc"
#include "glass.inc"

global_settings {
   max_trace_level 8
   assumed_gamma 2
   ambient_light 0.2
   max_intersections 128
   adc_bailout 1/255 }

camera {
   location <1.2, 3, -2.5>
   look_at  <0, 0, 0>
   angle 51
}

light_source {
   <0,3,-10>
   color <1,1,1>*2
}

light_source {
   <0,0,10>
   color <0.2,0.2,1>
   fade_distance 1
   fade_power 2
   shadowless
}

#declare R1 = text {ttf "timrom.ttf", "Test", 2.4, 0
  translate <-1.35,0.4,-3> }

#declare GLS = material {
   texture {T_Glass1}
   interior {ior 1.2}
};

union {
   sphere {<0,0,0>,3
      material {GLS}
   }
   difference {
      object {R1}
      sphere {<0,0,0>,3.005 inverse}
      sphere {<0,0,0>,3}
      texture {
         pigment {Gold}
         finish {
            specular 0.9
            roughness 0.01
            reflection{Gold*.3, 0.9}
         }
      }
   }
   scale 0.33
}

plane {y,-1 pigment {checker Brown Tan}}


Post a reply to this message

From: NightHawk
Subject: Re: Glass and Text Problem
Date: 19 Oct 2007 14:45:00
Message: <web.4718fa095a721a487be156420@news.povray.org>
Thanks a LOT!!!

"Tim Attwood" <tim### [at] comcastnet> wrote:
> When you layer materials the finishes all contribute.
> Remove the finishes from all but the final top layer.
>
> When you start dealing with glass the back of the
> textures (interior_texture) starts to matter too, the
> rear of things you would normally not see reflect in
> odd places (the rear of a surface is the same
> illumination as the front, which isn't like RL, except
> lamp shades and stuff, especially with high ambients),
> so often it's better just to place text onto a "decal"
> object that sits on the surface.
>
> #include "colors.inc"
> #include "glass.inc"
>
> global_settings {
>    max_trace_level 8
>    assumed_gamma 2
>    ambient_light 0.2
>    max_intersections 128
>    adc_bailout 1/255 }
>
> camera {
>    location <1.2, 3, -2.5>
>    look_at  <0, 0, 0>
>    angle 51
> }
>
> light_source {
>    <0,3,-10>
>    color <1,1,1>*2
> }
>
> light_source {
>    <0,0,10>
>    color <0.2,0.2,1>
>    fade_distance 1
>    fade_power 2
>    shadowless
> }
>
> #declare R1 = text {ttf "timrom.ttf", "Test", 2.4, 0
>   translate <-1.35,0.4,-3> }
>
> #declare GLS = material {
>    texture {T_Glass1}
>    interior {ior 1.2}
> };
>
> union {
>    sphere {<0,0,0>,3
>       material {GLS}
>    }
>    difference {
>       object {R1}
>       sphere {<0,0,0>,3.005 inverse}
>       sphere {<0,0,0>,3}
>       texture {
>          pigment {Gold}
>          finish {
>             specular 0.9
>             roughness 0.01
>             reflection{Gold*.3, 0.9}
>          }
>       }
>    }
>    scale 0.33
> }
>
> plane {y,-1 pigment {checker Brown Tan}}


Post a reply to this message

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