// Persistence of Vision Ray Tracer Scene Description File // File: radiosity // Vers: 3.5 // Desc: Example-File for testnig of radiosity // Date: 12.07.03 (dd.mm.yy) // Auth: Tim Nikias Wenclawiak // Last Update: 12.07.03 (dd.mm.yy) //Description // Scene Stage for experiments using different combinations of // conventional lighting, radiosity and photons. These are // all indoor experiments, outdoor may behave somewhat different // and will be dealt with in a second series of experiments. //Homepage: // www.digitaltwilight.de/no_lights //Email: // Tim.Nikias@gmx.de //When saving Radiosity, the image is rather blotchy. This // is later taken care of by interpolating more rad-samples // using a higher error_bound. That's a main factor of the // experiments. Using radiosity settings with direct smooth // results are more difficult to set up and more tedious in // time-consumption and tweaking. #declare Radiosity=1; #declare Save_Rad=1; #declare Load_Rad=0; //A lightsource is used when saving photons, its // switched off otherwise #declare Photons=1; #declare Save_Pho=0; #declare Load_Pho=1; #declare Example_Setup=6; global_settings{ assumed_gamma 1 max_trace_level 256 #if (Radiosity) radiosity{ #if (Save_Rad) //pretrace_start .1 //pretrace_end .005 pretrace_start 1 pretrace_end 1 error_bound .1 save_file "rad.rad" #end #if (Load_Rad) pretrace_start 1 pretrace_end 1 #if (Example_Setup<=5) error_bound .8 #else error_bound .4 #end load_file "rad.rad" #end //Different brightness for 1st and 2nd pass, to compensate // for the higher interpolation on the 2nd pass #if (Save_Rad) brightness 1.00 #else #if (Example_Setup>=4) brightness .5 #else brightness 1.25 #end #end gray_threshold 0 low_error_factor 1 minimum_reuse .0025 nearest_count 20 count 1200 recursion_limit 2 always_sample off #if (Example_Setup=6) media on #end } #end #if (Photons) photons{ spacing .005 autostop .5 #if (Save_Pho) save_file "rad.pho" #end #if (Load_Pho) load_file "rad.pho" #end } #end } camera{ location <0,5,-17> //Provides proper Aspect-Ratio up y right x*image_width/image_height look_at <0,5,0> } #default{finish{ambient 0 diffuse 1}} //Cornell box{<-5,-1,-5><-6,10,6> pigment{rgb x}} box{< 5,-1,-5>< 6,10,6> pigment{rgb y}} box{<-6,-1, 5>< 6,10,6> pigment{rgb 1}} box{<-6, 0,-5><6,-1,5> pigment{rgb 1}} box{<-6,10,-5><6,11,5> pigment{rgb 1}} box{<-6,-1,-5>< 6,10,-6> pigment{rgb 1} no_image} //Lightsource box{<-1,9.25,-1><1,10,1> pigment{rgb 1} finish{ambient #if (Example_Setup>=3) 1 #else 25 #end} #if (Example_Setup>=4) no_shadow #end } #if (Save_Pho | Example_Setup>=3) light_source{<0,9,0> rgb 1 //Fading lightsource is important for realistic lighting! fade_power 2 fade_distance 6 //And an arealight for realistic and soft shadows area_light x*2,z*2,16,16 orient circular photons{reflection on refraction on} } #end torus{ 2,.5 pigment{rgb <.25,.25,1>} rotate <-35,-37,0> translate <-2,7,2> finish{specular 10 roughness .02} } sphere{0,1 scale <1,2,1> translate <-3,2,-1> pigment{rgbt <1,1,1,1>} finish{reflection{0,1 falloff 2} conserve_energy} interior{ior 1.66 fade_power 2 fade_distance 8} photons{target reflection on refraction on collect off} } triangle{ <1,0,-3><4,4,-4><4,1,-2.5> pigment{rgb 1} finish{reflection 1 conserve_energy} photons{target reflection on refraction off collect off} }