POV-Ray : Newsgroups : povray.newusers : transparent backlit colored gels : transparent backlit colored gels Server Time
30 Jun 2024 15:11:43 EDT (-0400)
  transparent backlit colored gels  
From: George White
Date: 21 Nov 2011 00:30:00
Message: <web.4ec9e15f2d98a05646dfc3530@news.povray.org>
I have overlapping blue and yellow transparent "gels". With one blue and the
other yellow I was expecting the overlapped region, when back-lit, to look green
from the front. Instead it is brownish color. I seem to have a reason to use
POV-Ray once every two years or so for the last 6 years but have not used media
or photons before. I made a simplified file that illustrates my scene issue.

I'd appreciate any help in getting two transparent colored gels to work. thanks

--George
_____________________
#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "metals.inc"
#include "skies.inc"


//++++++++++++++++++++

camera {
   location <0, 1, -5>
   look_at <.5,.5,0>
}

//++++++++++++++++++

light_source {< 0, 10, 10> color White }  //back

//light_source {< 0, 10,-10> color White  }  //front

//++++++++++++++++++
sky_sphere {
    pigment {
      gradient y
      color_map {
        [ .4  color <.9,.9,.9>  ]
     }
      scale 1000
     translate -1
    }
  }

//++++++++++++++++++++++
//wall with opening

#declare wind_width = 3;
#declare wind_height =3;
#declare wind_depth = 1;

#declare wall =box {
                        <-200,-200,wind_depth/3>
                        <200,200,-wind_depth/3> };

#declare window_opening = box {<-5,-.5,wind_depth/2>
<wind_width-.5,wind_height, -wind_depth/2>}

#declare wall      = difference {

                      object {wall pigment {Cherry_Wood}}
                      object {window_opening }
                        }
wall

//+++++++++++++++++++++++
#declare color_filter_blue      =
texture {
    pigment { rgbf <0,0,1,.9> }
    finish {
        ambient 0
        diffuse 0
        reflection 0.5

    }
}


#declare color_filter_yellow =

texture {
    pigment { rgbf <1,1,0,.9> }
    finish {
        ambient 0
        diffuse 0
        reflection 0.5
    }
}



//++++++++++++++++++++++++++++++++++++++++++
     #declare Blue_gel =


                        box {<0, 0,0 >  <1, 1,-.01 >
                        texture {color_filter_blue}
                          interior {
                                 media {
                                        absorption  Blue
                                       }

                                    }
                        photons{
                                target
                                reflection on
                                refraction on
                                }

                             }

      #declare Yellow_gel =
                        box {<0, 0,0 >  <1, 1,-.01 >
                        texture {color_filter_yellow}
                          interior {
                                 media {
                                        absorption  Blue
                                       }

                                    }
                        photons{
                                target
                                reflection on
                                refraction on
                                }



                        translate <.5,.5, -.5>}

Blue_gel
Yellow_gel


Post a reply to this message

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