// The Stained Glass descritption // Do not switch to transmit in the image map. You want the filter // properties to add their colors to the light source. Transmit will // pass the light without affecting its color and is not what you want. // A very small amount of transmit is used to allow some backlighting // of the glass to occur. Otherwise it is totaly dark and looks wrong // having that much light streaming in without something behind it to // account for it. #declare P1 = pigment{ granite color_map{ [.33 rgbft< 1, 1.0, 0,.97, 0.05>][.33 rgbft< 1, 1.0, 1,.97, 0.05>] [.33 rgbft< 1, 0.0, 0,.97, 0.05>][.66 rgbft< 1, 1.0, 1,.97, 0.05>] [.66 rgbft< 0, 0.8, 0,.97, 0.05>][.66 rgbft< 1, 1.0, 1,.97, 0.05>]}} #declare P2 = pigment{ gradient y color_map{ [0.0 rgbft< 1, 1, 1, .85, 0.05>][.33 rgbft< 1, 1, 1, .95, 0.05>] [.33 rgbft< 1, 1, 1, .85, 0.05>][.66 rgbft< 1, 1, 1, .95, 0.05>] [.66 rgbft< 1, 1, 1, .85, 0.05>][1.0 rgbft< 1, 1, 1, .95, 0.05>]}} #declare P3 = pigment{rgb<0,.7,0,1,.1>} #declare P4 = pigment{rgb<0, 0,1,1,.1>} // lower image mapped section of glass window #declare Bx = union { box { -.5,.5 texture { pigment{ image_map { png "win1.png" interpolate 4 transmit all .1 filter all 1 } translate -.5 scale 1.1 }} finish { ambient .3 diffuse 0 } scale<6.05,7.05,.05> rotate 90*y translate<20.5,8.5,6> } // Upper pov pigment section of glass window box { -.5,.5 pigment { spiral2 2 pigment_map { [.25 P1][.50 P3][.75 P2][1.0 P4] } rotate 0*x scale 2} finish { ambient .4 diffuse 0 } scale<6.10,3.05,0.2> rotate 90*y translate<20.5,13.5,6> } } // The Stained Glass object object { Bx } // Room construction union { difference { // 40x20x40 room box { <-21.0,-1.000, -21.00>, <21.0, 21.00, 21.00> } box { <-20.0, 0.000, -20.00>, <20.0, 20.00, 20.00> } box { < 19.9, 5.000, 9.00>, <21.1, 15.00, 3.00> }} box { < 20.0,11.775, 9.00>, <21.0, 12.25, 3.00> } pigment { rgb 1} finish { ambient 0.2 diffuse 0.5 } hollow } camera { location <-10, 8, -12>look_at <0, 3, 0>angle 75} background { color rgb 1.3} // inside room light light_source { < 0, 19, 0>rgb 0.5 media_interaction off } // This is the light that shines through the glass light_source { <50, 25, 6>rgb 1.5 spotlight point_at <0, 4, 6> radius 20 falloff 20 media_attenuation on } /* If you make any changes to the media I recommend that you start with the number of intervals and the number of maximum samples. Changing the rest of the parameter will do little in theis scene except add extra render time to it. The only other modifier that will make a major impact on the color reaction of the media to the light is the color of the scattering media used. I have it set low to get a more natural dust like effect. Raising this value even .01 makes a noticable difference and shuld be adjusted in small increments. Larger values also produce the cotton ball effect unless you specify very large interval and max samples to compensate for it. This also adds considerable time to the total render time needed so should be considered with caution. */ media { scattering { 1.0000, 0.03 extinction .1} confidence 0.9999 intervals 5.0000 variance 0.0001 samples 10.0000, 40 ratio 0.9399 } /*// Media used in posted image media { scattering { 1, rgb 0.025} // extinction 1.5} confidence 0.990 intervals 40.00 variance 0.001 samples 1.000, 10 ratio 0.999 } // optional media statement Not set for anything in particular media { scattering { 1, .03 extinction .1} confidence 0.900 intervals 5.000 variance 0.001 samples 5.000, 25 ratio 0.999 } */