/* Justin Smith's modified pov script to try and make it seem snow is in shadowed places. I've only rewritten this as an example which hopefully does exactly what was intended. However, no guarantee! Bob Hughes */ // Persistence of Vision Ray Tracer Scene Description File // File: mountains with snow preferential to shadows.pov // Vers: 3.5 // Desc: mountains and snow, with more snow in shadows // Date: 2003.833 // Auth: Justin Smith, and Bob Hughes // adapted to sunpos and version 3.7 by THomas de Groot (February 2014) // Render settings (right-click on a line below): // +w800 +h600 +a0.3 +am2 +bm2 +wt6 // +w1600 +h1200 +a0.3 +am2 +bm2 +wt6 #version 3.7; #include "colors.inc" #include "functions.inc" #include "sunpos.inc" #include "transforms.inc" #declare Rad = on; // See Cousin Ricky's documentation #include "Cousin Ricky\Radiosity-pretrace\radiosity-pretrace.inc" #declare Radiosity_Pretrace_debug = true; global_settings { assumed_gamma 1.0 #if (Rad) radiosity { //pretrace_start 0.08 // start pretrace at this size //pretrace_end 0.004 // end pretrace at this size Radiosity_Pretrace (0.1, 0.004) count 50, 500 // higher -> higher quality (1..1600) [35] ->set to about 200 for better shadows (slower) nearest_count 10, 5 // higher -> higher quality (1..10) [5] error_bound 0.6 // higher -> smoother, less accurate [1.8] recursion_limit 2 // how much interreflections are calculated (1..5+) [2] low_error_factor .3 // reduce error_bound during last pretrace step gray_threshold 0.0 // increase for weakening colors (0..1) [0] minimum_reuse 0.010 // reuse of old radiosity samples [0.015] maximum_reuse 0.1 // new parameter 3.7 [0.2] brightness 1 // brightness of radiosity effects (0..1) [1] adc_bailout 0.01/2 normal off // take surface normals into account [off] media off // take media into account [off] always_sample off // turn sampling in final trace off [on] //max_sample 1.0 // maximum brightness of samples } #end } // perspective camera camera { location <0.0, 2.0, -5.0>*1000 look_at <0.0, 0.0, 0.0> right x*image_width/image_height //rotate -45*y // 90 degree azimuth difference from light source } #declare Kelvin = 6200; // Sun's temperature: 2800=red; 7500=blue white. #declare SunFactor = 2; //NOTE: LONG/LAT conversion: http://transition.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html #declare SunPosition = SunPos(2012, 12, 5, 16, 0, 25, 31.7625, 25.0888); //year, month, day, hour(gmt), minute, +-degrees, lat, long //note: Azimuth (Az) and Altitude (Al) are automatically declared. #debug concat("\nSun azimuth: ",str(Az,5,3),"; Sun altitude: ",str(Al,5,3),"\n\n") #include "CIE.inc" #macro SunLight (Kelvin,SunFactor) Blackbody(Kelvin)*SunFactor #end light_source { SunPosition color SunLight (Kelvin,SunFactor) // light's color parallel point_at <0, 0, 0> } sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } plane { y, -1 pigment { color srgb <0.7,0.5,0.3> } } #declare fnpigment1 =function { pigment { agate color_map { [0 rgb 0] [1 rgb 1] } scale 5000 } } #declare fnpigment2 =function { pigment { granite color_map { [0 rgb 0] [1 rgb 1] } scale 5000 } } #declare fnpigment3 =function { pigment { bumps color_map { [0 rgb 0] [1 rgb 1] } scale 5000 } } #declare pigment1 = pigment { slope { y, 0, 1 // range of color map } color_map { [0.0 color rgbt <0,0,0,1>] [0.3 color rgbf <1,1,1,0.9>] [1.0 color rgbf <1,1,1,0>] } } #declare pigment2 = pigment { slope { y, 0, 1 // range of color map } color_map { [0.0 color rgbt <0,0,0,1>] [0.6 color rgbf <1,1,1,0.6>] [1.0 color rgbf <1,1,1,0>] } } #declare pigment3 = pigment { slope { SunPosition, // align with sunlight 0, 1 // range of color map } color_map { [0.3 color rgbf <1, 1, 1, 0.0>] //---->away from sunlight [0.5 color rgbf <1, 1, 1, 0.3>] [0.7 color rgbf <1, 1, 1, 0.9>] [0.9 color rgbf <1, 1, 1, 1.0>] //---->towards sunlight } } #declare Mountains = isosurface { function { (y - fnpigment2(x,y,z).gray*100) - (fnpigment1(x,y,z).gray + fnpigment1(x,y,z).gray*10 + fnpigment2(x,y,z).gray*10 + fnpigment3(x,y,z).gray*.05) } contained_by { box {<-5000,0,-5000>,<5000,125,5000>} } max_gradient 1 texture { pigment {rgb <0.4, 0.2, 0>} finish {diffuse 0.5} } texture { pigment { gradient y //turbulence <0,.1,0> pigment_map { [.5 color rgbf <1,1,1,1>] [.6 pigment1] [.8 pigment2] [1 color rgbf <1,1,1,0>] } scale 125 } finish { diffuse 0.8 } } texture { pigment { gradient y //turbulence <0,.1,0> pigment_map { [0.2 color rgbf <1,1,1,1>] [0.4 pigment3] [0.5 pigment3] [0.6 color rgbf <1,1,1,1>] } scale <333,125,333> } finish { diffuse 0.8 } } scale <1,4,1> } object {Mountains}