#include "colors.inc" #include "finish.inc" #include "textures.inc" #include "skies.inc" #include "functions.inc" #declare camerazoom = 0; #declare cameralocation = <0, 1,-5>; #declare cameralook = <0, 0, 0>; #declare zoomlocation = <0, .3, 1>; #declare macrolocation = <0, 0, -5>; #declare camerarotate = <0, 15, 0>; #declare lighting1 = 0; #declare lighting2 = 1; #declare sunlight = 1; #declare sunlocation = <-1, 4, 20>*200; #declare photonsshoot = 1; #declare photonsave = 1; #declare complexwater = 1; #declare pillar = 1; #declare complexpillar = 1; #declare complexsky = 1; #declare mediasun = 0; #declare mediacloud = 0; #declare mediaglare = 0; #declare finalrender = 1; #declare final_pretrace_start = 0.08; #declare final_pretrace_end = 0.04; #declare final_count = 35; #declare final_nearest_count = 5; #declare final_brightness = .5; #declare final_normal = 1; #declare final_media = 1; #declare final_save = 1; //////////////// //Global Block// //////////////// #if (photonsshoot = on) global_settings { photons { spacing 0.005 #if (photonsave = 1) save_file "photons.inc" #else load_file "photons.inc" #end } } #end #declare watermaterial = material { #if (complexwater = on) texture { pigment { rgbf <0.5, 0.7, 0.6, 0.5> } finish { ambient 0.2 diffuse 0.3 reflection { 0.0, 1.0 fresnel on } specular 0.4 roughness 0.003 } normal { function { f_ridged_mf(x, y, z, 0.1, 3.0, 7, 0.7, 0.7, 2) } 0.6 scale 0.07 } } interior { ior 1.3 media { scattering { 3 <0.5, 0.65, 0.4> } } } #else texture { pigment { rgbf <0.5, 0.7, 0.6, 0.5> } } #end } #declare pillarmaterial = material { texture { pigment { color rgb <1, .8, .7> } #if (complexpillar = 1) normal { facets coords .3 scale .7 } normal { bumps 0.3 } normal { granite 0.3 } #end } } //////////////// //Camera Block// //////////////// #if (camerazoom = on) camera { location cameralocation look_at cameralook translate zoomlocation rotate camerarotate } #end #if (camerazoom = off) camera { location cameralocation look_at cameralook translate macrolocation rotate camerarotate } #end ////////////////// //Lighting Block// ////////////////// #if (lighting1 = on) light_source { 0*x // light's position (translated below) color rgb 1.0 // light's color area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate <-5, 8, 20>*200 } #end #if (lighting2 = on) light_source { 0*x // light's position (translated below) color rgbt <1,1,1,.5>/2 // light's color translate <25, 7, -20>*200 shadowless } #end #if (sunlight = on) light_source { 0*x // light's position (translated below) color rgb <1, .9, .9> // light's color area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate sunlocation photons { reflection on refraction on } looks_like { sphere { 0*x, 200 pigment { Yellow } } finish { ambient 1 } } } #end /////////////// //Environment// /////////////// sky_sphere { #if (complexsky = on) S_Cloud2 #else pigment { rgb <.6, .6, 1> } #end } plane { y, -4.0 material { texture { pigment { color rgb <0, 0, 0> } } } } //-> difference { plane { y, 0.0 } box { <-20.0001, -5, -5>, <20, .00001, 5> } material { watermaterial } photons { collect off } } //-< box { <-20.0, -5, -5>, <20, 0, 5> material { watermaterial } photons { target reflection on refraction off } } //////////////////////// //Pillar Wall Creation// //////////////////////// #declare pillarwall = //-> difference { box { <-5, -1, 0>, <5, 3.5, 1> } //-> union { box { <-.5, -4, -.1>, <.5, 2, 1.1> } cylinder { <0, 0, -.1>, <0, 0, 1.1>, .5 scale <1, 2, 1> translate <0, 2, 0> } translate <1, 0, 0> //Hole Translation } //-< //-> union { box { <-.5, -1, -.1>, <.5, 2, 1.1> } cylinder { <0, 0, -.1>, <0, 0, 1.1>, .5 scale <1, 2, 1> translate <0, 2, 0> } translate <3, 0, 0> //Hole Translation } //-< //-> union { box { <-.5, -1, -.1>, <.5, 2, 1.1> } cylinder { <0, 0, -.1>, <0, 0, 1.1>, .5 scale <1, 2, 1> translate <0, 2, 0> } translate <5, 0, 0> //Hole Translation } //-< //-> union { box { <-.5, -1, -.1>, <.5, 2, 1.1> } cylinder { <0, 0, -.1>, <0, 0, 1.1>, .5 scale <1, 2, 1> translate <0, 2, 0> } translate <-1, 0, 0> //Hole Translation } //-< //-> union { box { <-.5, -1, -.1>, <.5, 2, 1.1> } cylinder { <0, 0, -.1>, <0, 0, 1.1>, .5 scale <1, 2, 1> translate <0, 2, 0> } translate <-3, 0, 0> //Hole Translation } //-< //-> union { box { <-.5, -1, -.1>, <.5, 2, 1.1> } cylinder { <0, 0, -.1>, <0, 0, 1.1>, .5 scale <1, 2, 1> translate <0, 2, 0> } translate <-5, 0, 0> //Hole Translation } //-< material { pillarmaterial } translate <0, -1, -.5> //Set Translation scale <1, 1, 1> } //-< ////////////////// //Scene Creation// ////////////////// /////////////// //Pillar Wall// /////////////// #if (pillar = on) object { pillarwall translate <-10,0,0> } object { pillarwall translate <0,0,0> } object { pillarwall translate <10,0,0> } #end //////////// //End Wall// //////////// ////////////////////// //Final Render Stuff// ////////////////////// #if (finalrender = 1) global_settings { radiosity { #if (final_save = 1) pretrace_start final_pretrace_start // start pretrace at this size pretrace_end final_pretrace_end // end pretrace at this size #else pretrace_start 1 pretrace_end 1 #end count final_count // higher -> higher quality (1..1600) [35] nearest_count final_nearest_count // higher -> higher quality (1..10) [5] error_bound 1.8 // higher -> smoother, less accurate [1.8] recursion_limit 3 // how much interreflections are calculated (1..5+) [3] low_error_factor .5 // reduce error_bound during last pretrace step gray_threshold 0.0 // increase for weakening colors (0..1) [0] minimum_reuse 0.015 // reuse of old radiosity samples [0.015] brightness final_brightness // brightness of radiosity effects (0..1) [1] adc_bailout 0.01/2 #if (final_normal = 1) normal on // take surface normals into account [off] #end #if (final_media = 1) media on // take media into account [off] #end #if (final_save = 1) save_file "final.inc" // save radiosity data #else load_file "final.inc" // load saved radiosity data #end //always_sample off // turn sampling in final trace off [on] //max_sample 1.0 // maximum brightness of samples } } #end