POV-Ray : Newsgroups : povray.newusers : transparent backlit colored gels Server Time
1 Nov 2024 00:24:19 EDT (-0400)
  transparent backlit colored gels (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: George White
Subject: transparent backlit colored gels
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

From: clipka
Subject: Re: transparent backlit colored gels
Date: 21 Nov 2011 02:50:17
Message: <4eca02b9$1@news.povray.org>
Am 21.11.2011 06:27, schrieb George White:
> 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

Is that your complete scene? Because when I render it I don't see 
anything brownish where the two gels overlap.


Try giving the blue gel a slightly green-ish hue, say rgbf <0,0.2,1,.9>, 
otherwise the combination of the two filters will let no light through 
at all (<0,0,1>*<1,1,0> = <0,0,0>).


Post a reply to this message

From: Thomas de Groot
Subject: Re: transparent backlit colored gels
Date: 21 Nov 2011 03:15:53
Message: <4eca08b9$1@news.povray.org>
On 21-11-2011 8:50, clipka wrote:
> Is that your complete scene? Because when I render it I don't see
> anything brownish where the two gels overlap.
>
>
> Try giving the blue gel a slightly green-ish hue, say rgbf <0,0.2,1,.9>,
> otherwise the combination of the two filters will let no light through
> at all (<0,0,1>*<1,1,0> = <0,0,0>).

The boxes should be *hollow* in order for the media to show. Also, if 
you want the media to show the gel's colour, do this, and switch off the 
photons and the absorbtion for the time being. I think the brownish 
colour comes from the way the light is treated in RL and in POV-Ray: 
additive versus substractive?

      #declare Blue_gel =


                         box {<0, 0,0 >  <1, 1, -.01 > hollow
                         texture {pigment {rgbt 1}}
                           interior {
                                  media {
                                         //absorption  Blue
                                         scattering {1, <0,0,1>*1000}
                                        }

                                     }
                         /*photons{
                                 target
                                 reflection on
                                 refraction on
                                 }*/

                              }

       #declare Yellow_gel =
                         box {<0, 0,0 >  <1, 1,-.01 > hollow
                         texture {pigment{rgbt 1}}
                           interior {
                                  media {
                                         //absorption  Yellow
                                         scattering {1, <1,1,0>*1000}
                                        }

                                     }
                         /*photons{
                                 target
                                 reflection on
                                 refraction on
                                 }*/



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

Blue_gel
Yellow_gel


Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: transparent backlit colored gels
Date: 21 Nov 2011 03:40:02
Message: <4eca0e62$1@news.povray.org>
...But this does what you want:

#declare Blue_gel =
box {<0, 0,0 >  <1, 1, -.01 > hollow
   texture {pigment {rgbt 1}}
   interior {
     media {
       scattering {1, <1,0,0>*1000}
     }
   }
}

#declare Yellow_gel =
box {<0, 0,0 >  <1, 1,-.01 > hollow
   texture {pigment{rgbt 1}}
   interior {
     media {
       scattering {1, <0,0,1>*1000}
     }
   }
   translate <.5,.5, -.5>
}

Blue_gel
Yellow_gel


Post a reply to this message

From: George White
Subject: Re: transparent backlit colored gels
Date: 21 Nov 2011 15:50:02
Message: <web.4ecab814f120d22746dfc3530@news.povray.org>
thank you

That looks exactly right when back lit! But to make it also look right when
front lit do I need to reduce the t component in the color vector and put back
some pigment color and reflectivity?

---George


Post a reply to this message

From: Thomas de Groot
Subject: Re: transparent backlit colored gels
Date: 22 Nov 2011 03:35:59
Message: <4ecb5eef$1@news.povray.org>
On 21-11-2011 21:44, George White wrote:
> thank you
>
> That looks exactly right when back lit! But to make it also look right when
> front lit do I need to reduce the t component in the color vector and put back
> some pigment color and reflectivity?
>

You can try that, but without reflectivity. It does not add anything 
here imo.

However, you still need to change media back to blue and yellow, 
otherwise the gels will have the wrong colour:

#declare Blue_gel =
box {<0, 0, 0 >  <1, 1, -.01 > hollow
   texture {pigment {rgbt 1}} //make this for instance <0,0,1,0.9>
   interior {
     media {
       scattering {1, <0,0,1>*1000}
     }
   }
}

#declare Yellow_gel =
box {<0, 0, 0 >  <1, 1,-.01 > hollow
   texture {pigment{rgbt 1}} //make this for instance <1,1,0,0.9>
   interior {
     media {
       scattering {1, <1,1,0>*1000}
     }
   }
   translate <.5,.5, .5>
}


Thomas


Post a reply to this message

From: George White
Subject: Re: transparent backlit colored gels
Date: 22 Nov 2011 13:55:01
Message: <web.4ecbeefcf120d22746dfc3530@news.povray.org>
I added in the pigment and still have something that looks very strange when
front lit. I am working on an animated sequence where I need the front and back
lit to both work.

_____________

#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,-100> 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 Blue_gel =
box {<0, 0,0 >  <1, 1, -.01 > hollow
   texture {pigment {rgbt <0,0,1,1>
                        }
//       finish { reflection rgb 1 }
        }
   interior {
     media {
       scattering {1, <1,0,0>*1000}
     }
   }
}

#declare Yellow_gel =
box {<0, 0,0 >  <1, 1,-.01 > hollow
   texture {pigment{rgbt  <1,1,0,1>
                       }
//      finish { reflection rgb 1 }
                }
   interior {
     media {
       scattering {1, <0,0,1>*1000}
     }
   }
   translate <.5,.5, -.5>
}

Blue_gel
Yellow_gel


Post a reply to this message

From: Thomas de Groot
Subject: Re: transparent backlit colored gels
Date: 23 Nov 2011 03:59:55
Message: <4eccb60b$1@news.povray.org>
On 22-11-2011 19:50, George White wrote:
> I added in the pigment and still have something that looks very strange when
> front lit. I am working on an animated sequence where I need the front and back
> lit to both work.
>

I see what you mean. I have no ready solution for you unfortunately. 
This is a bit beyond my own understanding :-(

[calling: Somebody else out there who knows?]

Thomas


Post a reply to this message

From: Stephen
Subject: Re: transparent backlit colored gels
Date: 23 Nov 2011 08:13:45
Message: <4eccf189@news.povray.org>
On 22/11/2011 6:50 PM, George White wrote:
> I added in the pigment and still have something that looks very strange when
> front lit. I am working on an animated sequence where I need the front and back
> lit to both work.

I think the problem is that you are mixing additive and subtractive 
colour systems. If you want the overlap to be green try using Cyan 
instead of blue.

#declare Cyan_Material0 =
material{
   texture {
     pigment {
       colour rgbft <0.000,1.000,1.000,0.750,0.200>
     }

     finish {
       ambient     rgb <0.000,0.000,0.000>
       brilliance  1.000
       crand       0.000
       diffuse     0.600
       metallic    0.000
       phong       0.000
       phong_size  40.000
       specular    0.000
       roughness   0.050
       reflection {
         rgb <0.000,0.000,0.000>, rgb <0.000,0.125,0.125>
         fresnel   0
         falloff   0.000
         exponent  1.000
         metallic  0.000
       }
     }

   }

}

#declare Yellow_Material0 =
material{
   texture {
     pigment {
       colour rgbft <1.000,1.000,0.100,0.750,0.200>
     }

     finish {
       ambient     rgb <0.133,0.133,0.000>
       brilliance  1.000
       crand       0.000
       diffuse     0.600
       metallic    0.000
       phong       0.000
       phong_size  40.000
       specular    0.000
       roughness   0.050
       reflection {
         rgb <0.000,0.000,0.000>, rgb <0.100,0.100,0.010>
         fresnel   0
         falloff   0.000
         exponent  1.000
         metallic  0.000
       }
     }

   }

}


-- 
Regards
     Stephen


Post a reply to this message

From: George White
Subject: Re: transparent backlit colored gels
Date: 24 Nov 2011 13:50:01
Message: <web.4ece91b1f120d22746dfc3530@news.povray.org>
Stephen,

Thanks very much. Blue and Yellow gels make black. Cyan and Yellow gels make
green.

--George


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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