// Persistence of Vision Ray Tracer Scene Description File // Vers: 3.5 // Stefan Sittler 2006 // ======================================================= // This work is licensed under the Creative Commons Attribution ShareAlike 2.0 License. // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.0/ // or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. // You are free: // // * to copy, distribute, display, and perform the work // * to make derivative works // * to make commercial use of the work // // Under the following conditions: // --Attribution. You must attribute the work in the manner specified by the author or licensor. // --Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting // work only under a license identical to this one. // // * For any reuse or distribution, you must make clear to others the license terms of this work. // * Any of these conditions can be waived if you get permission from the copyright holder. // Your fair use and other rights are in no way affected by the above. // ======================================================= // Desc: Test scene for Wings3d Head model //File is a little messy; sorry! Note that object {eye} is not actually used; "eye1" is better. #include "colors.inc" #include "glass.inc" #include "metals.inc" #include "stones.inc" // Switches // ======================================================= #declare Area_Light=1; // Area Light(s) off=0/on=1 #declare Fill_Light=0; // Fill Light(s) off=0/on=1 #declare Radiosity=1; // radiosity switch // Settings // ======================================================= #declare Ambient_Setting= .1; global_settings { max_trace_level 256 assumed_gamma 1 #if (Radiosity) radiosity { brightness 1.0 // count 100 error_bound 0.1 gray_threshold 0.0 low_error_factor 0.2 minimum_reuse 0.015 nearest_count 10 recursion_limit 2 adc_bailout 0.01 max_sample 0.5 media off normal off always_sample 1 pretrace_start 0.08 pretrace_end 0.01 } #end } #declare Ambient_Glow= 1/Ambient_Setting; #declare R1= seed (72319); //3413 #declare Rangle= (rand(R1)*180); #macro RRot() rotate #end #default { texture { pigment { color Gray80} finish { ambient 0} } } // Camera // ======================================================= camera { location <0, 0, -7.2> // location <0, 0, -2.2> look_at y*0 // direction angle 33 } // Lights // ======================================================= #declare SunCol=White*2; #declare SunRotate=transform{RRot()} light_source { y*1000 color SunCol #if (Area_Light=1) area_light x*100, z*100, 7, 7 adaptive 1 jitter circular orient #end transform {SunRotate} } #declare Fill1=light_source { -y*1000 color (SunCol+OrangeRed)/3 shadowless transform {SunRotate} } #if (Fill_Light) light_source {Fill1} #end //Sky // ======================================================= #declare EarthLightBlue= color rgb <123,141,191>/255; #declare EarthBlue= color rgb <63,99,157>/255; #declare EarthDarkBlue= color rgb <37,74,157>/255; #declare Horizon1=pigment{ gradient y color_map { [0 (EarthLightBlue+White)/2] [0.1 EarthBlue] [0.5 EarthDarkBlue] [1 EarthDarkBlue/2] // [1 (EarthLightBlue+White)/2] } } #declare Sky_cm1=color_map { [0 SkyBlue+EarthBlue/1.5 ] // Horizon [.5 SkyBlue+EarthBlue/1.5 ] [.96 EarthLightBlue*2] [.99995 (EarthLightBlue+SunCol)/2] [1 SunCol] // [.99985 SunCol*10 ] // [.99995 SunCol*20 ] // [1 SunCol*20] } #declare Sky_cm2=color_map { [0 color Black] // [0 color EarthDarkBlue] // [.97 color NewMidnightBlue] [.99 color EarthDarkBlue] //DarkPurple [.9995 color EarthBlue] //DarkPurple [.99985 color (SunCol+Yellow)*2] [1 color SunCol*20] } #declare Horizon2=pigment{ gradient y color_map {Sky_cm1} scale 2 translate -1 transform SunRotate } #declare Sky=sky_sphere { pigment { // color White*1.25 average pigment_map { [1 Horizon1] [6 Horizon2] [5 White] } } } // Scene // ======================================================= #declare SP=.233; #declare SP2=.758; #declare pupil_WingsMat = texture{ pigment{ Black} finish { specular 1 roughness .003 // reflection {.5,1 fresnel} conserve_energy } } #declare Iris_WingsMat = texture{ pigment{ VeryDarkBrown } finish { specular 1.0 roughness .0001 // reflection {0.5,1 fresnel} conserve_energy } } #declare THead=texture { pigment {color (Maroon+LightWood+DarkWood)/7} normal {granite .03 scale .03 } finish {specular .3 roughness .09} } #declare upperlip_WingsMat = texture{ pigment { color (VioletRed+LightWood+DarkWood)/6} finish{specular .6 roughness .003}} #declare lowerlip_WingsMat =texture{THead pigment {color (NewTan+Maroon+LightWood)/5}} #declare hair_WingsMat =texture { pigment { gradient x color_map { [0 Black] [.5 Black] [.5 Clear] [1 Clear] } scale .01 turbulence .3 } } #declare TIris=texture { pigment {color (NewTan+Gray60)/2 filter .8} finish { reflection {.2 } specular 1 roughness .001 conserve_energy } } #include "head4.inc" #declare Eye_p1=pigment { crackle color_map { [0 color Red] [.005 color Red] [.007 color (Red+Gray05)/12] [.012 color (Gray80*2+Yellow)/3] [1 color (Gray80*2+Yellow)/3] } scale .25 warp {turbulence .4} } #declare Eye_p2=pigment { crackle color_map { [0 color Red] [.0025 color Red] [.0045 color (Red+Gray05)/2] [.0052 color (Gray90*2+Yellow)/3] [1 color (Gray90*2+Yellow)/3] } warp {turbulence .3} scale .25 } #declare Eye_p3=pigment { radial triangle_wave frequency 100 color_map { [0 (White*2+Salmon)/3] [.25 DarkBrown] [.3 Gold] [.31 Gold] [.325 VeryDarkBrown] [.4 Sienna] [1 Black] } scale 20 warp {turbulence .3} scale 1/20 rotate x*-90 rotate z*.1 } #declare Eye_p4=pigment { wood frequency 6 phase .1 ramp_wave color_map { [0 Black] [.1 Gray70+Yellow/2.5] [.25 VeryDarkBrown] [.3 VeryDarkBrown] [.7 Brown] [.75 Tan] } scale 15 warp {turbulence .5 omega .7} scale 1/15 } #declare Eye_p5=pigment { average pigment_map { [1 Eye_p3] [3 Eye_p4] } } #declare Dilate=1; // 1-fully dilated 0-fully contracted #declare TEye=texture { pigment { wood pigment_map { [.0 Black] [(.15*Dilate) Black] [(.17*Dilate) Eye_p5] // [.17 VeryDarkBrown] // [.23 DarkBrown] // [.27 VeryDarkBrown] [.27 Eye_p5] [.3 VeryDarkBrown] [.35 Eye_p2] [.4 Eye_p2] [1 Eye_p1] } ramp_wave } finish { brilliance 2 specular 1 roughness .0003 reflection {.05 exponent .1} } scale .18 } #declare TLens=texture { pigment {rgbt 1} finish { ambient 0 diffuse 0 // F_Glass2 reflection { 1 // 0.2, 1.0 // fresnel on // exponent .3 exponent .1 } } } /* pigment {color (NewTan+Gray60)/2 filter .8} finish { reflection {.2 fresnel} specular 1 roughness .001 conserve_energy } }*/ #declare Eye2=union{ sphere {0, .135 texture {TEye}} sphere {0, .135*.6 translate -z*1/2*.135 texture {TLens} interior {I_Glass}} } #declare EyeRot=<0,0,0>; #declare Face1=union { object {Head rotate -y*90} // object {Eye rotate -y*90} // object {Eye rotate -y*90 scale <-1,1,1> } // object {Brow rotate -y*90} // object {Lash rotate -y*90} object {Eye2 translate <-.275,0,-.8>} object {Eye2 translate <.275,0,-.79>} } object {Eye2 scale 7 } //object {Face1 rotate <12,10,0> translate 0} //-x*2 box {<-2.5, -1, -2.5>,2.5 pigment { LightBlue/1.5} clipped_by {box{<-3,-3,-2.3>,<3,2.1,3>}} rotate y*14} //sphere {o,1 finish {ambient 0 diffuse 0 reflection 1}} plane {y, -23 color Gray20} //ground sky_sphere {Sky} #declare Count=1; #while (Count<100) //reflection interest box {-1, 1 pigment {color rgb rand(R1)} y*RRot() translate <0,-2.5+rand(R1)*4.7,-8-rand(R1)*12> rotate y*(rand(R1)*2-1)*65 } #declare Count=Count+1; #end //other heads... #declare THMetal=texture {T_Stone44}// normal {granite scale .09}} #declare THead=texture {THMetal} #declare Iris_WingsMat= texture {THMetal} #declare TIris=texture {THMetal} #declare upperlip_WingsMat = texture{THMetal} #declare lowerlip_WingsMat = texture{THMetal} //#include "head4.inc" #declare Face1=union { object {Head rotate -y*90} object {Eye rotate -y*90} object {Eye rotate -y*90 scale <-1,1,1> } // object {Brow rotate -y*90} // object {Lash rotate -y*90} // object {Eye2 translate <-.27,0,-.8>} // object {Eye2 translate <.27,0,-.79>} } //object {Face1 rotate <-13,73,1> translate x*.25} // rotate y*23 #declare THMetal=texture {T_Copper_3D}// normal {granite scale .09}} #declare THead=texture {THMetal} #declare Iris_WingsMat= texture {THMetal} #declare TIris=texture {THMetal} #declare upperlip_WingsMat = texture{THMetal} #declare lowerlip_WingsMat = texture{THMetal} //#include "head4.inc" #declare Face1=union { object {Head rotate -y*90} object {Eye rotate -y*90} object {Eye rotate -y*90 scale <-1,1,1> } // object {Brow rotate -y*90} // object {Lash rotate -y*90} // object {Eye2 translate <-.27,0,-.8>} // object {Eye2 translate <.27,0,-.79>} } //object {Face1 rotate <0,-23,2> translate x*2.2} //background {color (NewTan+Gray40)/2}