POV-Ray : Newsgroups : povray.binaries.images : One-way glass - onewayglass.png (1/1) : One-way glass - onewayglass.png (1/1) Server Time
9 Aug 2024 09:00:41 EDT (-0400)
  One-way glass - onewayglass.png (1/1)  
From: Christopher James Huff
Date: 2 Mar 2005 10:30:54
Message: <cjameshuff-7A235D.10304802032005@news.povray.org>
How: use CSG to give the front and back faces different textures, the 
front in this case is 90% reflective, with 10% transmission, and the 
back face is simply 50% filtering. When seen from the front, objects 
behind the glass are filtered through both layers while reflections are 
unfiltered. When seen from the back, objects behind the glass pass 
through the same layers, but the reflections are filtered twice. Here's 
the code for the objects:

difference {
    sphere {< 0, 1, 0>, 1
        texture {
            pigment {color rgb 1 transmit 0.1}
            finish {ambient 0 diffuse 0 reflection 0.9}
        }
    }
    sphere {< 0, 1, 0>, 1 scale < 1, 1, 0.8>
        texture {
            pigment {color rgb 1 filter 0.5}
            finish {ambient 0 diffuse 0}
        }
    }
    plane {-z, 0 pigment {color rgb 0}}
    scale < 1, 1, 0.2>
}

-- 
Christopher James Huff <cja### [at] gmailcom>
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message


Attachments:
Download 'onewayglass.png' (109 KB)

Preview of image 'onewayglass.png'
onewayglass.png


 

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