// +a // : Basic default antialiasing (threshold 0.3, method 1) // +a +am2 // : Basic antialising using method 2 // +a0.1 // : More accurate antialiasing, method 1 // +a0.1 +am2 // : More accurate antialiasing, method 2 #declare View_POV_Include_Stack = 1; #include "metals.inc" #include "stdinc.inc" /********************************************==#include "colors.inc" #include "shapes.inc" #include "transforms.inc" #include "consts.inc" #include "functions.inc" #include "math.inc" #include "rand.inc"*/ //#include "echo.inc" #version 3.63; ////////////////////////////////////////////////////////////Photons #declare Quality = 2; // 0-3 #if (Quality) #declare Use_Photons = no; #declare Photon_Run = no; // "no" to reuse a map #declare Photon_File = "saber_test.ph" #end #switch (Quality) #case (0) #declare Use_Photons = no; #break #case (1) #declare S_val = 0.1; #declare M_val = 75; #declare T_val = 5; #break #case (2) #declare S_val = 0.025; #declare M_val = 500; #declare T_val = 10; #break #case (3) #declare S_val = 0.01; #declare M_val = 1000; #declare T_val = 15; #break #end #declare propblur = 10; #declare mblurtype = 1; #declare tclock = clock+0; global_settings { #if (propblur) motion_blur 20,1 #end //nInstance distanc?? samples shutter_time max_trace_level T_val assumed_gamma 2.0 adc_bailout 1/25 // early bailout for speed #if (Use_Photons) photons { spacing S_val media M_val max_trace_level T_val #if (Photon_Run) save_file Photon_File #else load_file Photon_File #end } #end } ////////////////////////////////////////////////////////////Photons #declare Final_town = 1; #declare Final_space = 2; #declare Final_diver = 3; #declare Preview_town = 4; #declare Preview_space = 5; #declare Preview_diver = 6; #declare Building_test = 7; ///////////////////// #declare Quality = 1; // #declare radio = 0; #declare setting = 4; // 1 faster 4 final #declare camlookat = <80,20,0>; #declare camloc = <80,40,-250>*2.7; camera { perspective location camloc //right=up.eye //up=eye.right //eye=right.up right vnormalize(vcross(y,camlookat-camloc))//*(image_width/image_height right len = 1 for correct fov up vnormalize(vcross(camlookat-camloc,vcross(y,camlookat-camloc)))*(image_height/image_width) direction vnormalize(camlookat-camloc)*(image_height/image_width) //look_at camlookat angle 17.5 } #declare white = color rgb <1, 1, 1>; #declare basic_finish = finish { ambient 0 diffuse 0.95 brilliance 1 phong 0 phong_size 40 reflection 0 } #switch ( Quality ) #case ( Final_town ) light_source { vaxis_rotate(<700, 900, 202>,y,10) color white area_light 70*y, 70*z, 5, 5 adaptive 0 jitter rotate 45*y #if (Use_Photons) photons { refraction on } #end } #declare nice = color white; #declare nice2 = color rgb <.2, .2 ,.8>; #declare grad_tex = texture { pigment { gradient y color_map { [ 0.0 color nice ] [ 0.6 color nice2 ] } } finish { basic_finish } scale 200 } #break #case ( Final_space ) light_source { <700, 500, 0> color white area_light 50*y, 50*z, 5, 5 adaptive 0 jitter } #declare nice = color rgb <1, .8, .6>; #declare nice2 = color black; #declare grad_tex = texture { pigment { gradient y color_map { [ 0.0 color nice ] [ 0.4 color _red ] [ 0.8 color black ] } } finish { basic_finish } scale 200 } #break #case ( Final_diver ) light_source { <700, 500, 0> color white area_light 50*y, 50*z, 5, 5 adaptive 0 jitter } #declare nice = color rgb <1, .8, .6>; #declare nice2= color black; #declare grad_tex = texture { pigment { gradient y color_map { [ 0.0 color nice ] [ 0.4 color _green ] [ 0.8 color black ] } } finish { basic_finish } scale 200 } #break #case ( Preview_town ) light_source { <700, 500, 0> color white media_interaction off rotate 45*y } #declare nice = color white; #declare nice2 = color rgb <.2, .2, .8>; #declare grad_tex = texture { pigment { gradient y color_map { [ 0.0 color white ] [ 0.6 color nice2 ] } } finish { basic_finish } scale 200 } #break #case ( Preview_space ) light_source { <700, 500, 0> color white } #declare nice = color rgb <1, .8, .6>; #declare nice2= color black; #declare grad_tex = texture { pigment { gradient y color_map { [ 0.0 color nice ] [ 0.4 color _red ] [ 0.8 color black ] } } finish { basic_finish } scale 200 } #break #case ( Preview_diver ) light_source { <700, 500, 0> color white } #declare nice = color t_cyan; #declare nice2= color _blue; #declare grad_tex = texture { pigment { gradient y color_map { [ 0.0 color t_cyan ] [ 0.4 color t_cyan ] [ 0.8 color _blue ] } } finish { basic_finish } scale 200 } #break #case ( Building_test ) light_source { <700, 500, 0> white } #declare nice = color white; #declare nice2 = color rgb <.2, .2 ,.8>; #end #declare rr = 1400; #declare nice = color rgb < .6, .8 ,.9>*1.3; //difference { object { // floor box { <-rr, -80, -rr> } // box { <0, -72, 0> <240, 1, 240> translate <-16,0,-16> } texture { pigment { color nice } finish { ambient 0.4 diffuse 0.5 brilliance 1 phong 0 phong_size 40 reflection 0 } } } // variable sky sphere #if ( Quality < 7) #declare nice = color rgb < .5, .7 ,1>*.6; #declare nice2 = color rgb < 0,0,1>*1.2 ; #declare grad_tex = texture { pigment { gradient y color_map { [ 0 color rgb 0 ] [ 0.02/(rr/200) nice2 ] [ .5/(rr/200) color rgb < .4, .7 ,1>*1 ] [ .55/(rr/200) nice ] } } finish { ambient 0.97 diffuse 0 brilliance 1 phong 0 phong_size 40 reflection 0 } scale rr } sphere { 0 rr texture { grad_tex } hollow } #end //1x1 brick = 8x8 #declare beachball = sphere { <0,0,0>, 1 texture { pigment { radial frequency 3 color_map { [0.00 color rgb <1.0,0.4,0.2> ] [0.33 color rgb <0.2,0.4,1.0> ] [0.66 color rgb <0.4,1.0,0.2> ] [1.00 color rgb <1.0,0.4,0.2> ] } } finish { ambient 0.4 phong .5 phong_size 450 roughness 0.05 reflection 0.05 } } } #macro m_propellor(color_tex) #if (setting = 0) merge { box { <-2.5, -4, 1.5> <2.5, 4, 18.5> rotate -22*z } box { <-2.5, -4, 1.5> <2.5, 4, 18.5> rotate -22*z rotate 120*x } box { <-2.5, -4, 1.5> <2.5, 4, 18.5> rotate -22*z rotate 240*x } texture { color_tex } } #else difference { merge { cylinder { -3.25*x, 3.25*x, 3 } cylinder { -2.5*x, 2.5*x, 4 } #local counter = 0; #while (counter < 3) difference { cylinder { -2.500001*x, 2.500001*x, 4 scale <1, 1, 2.5> translate <0, 0, 11.5> } box { <-4, -10, 8.5> <-1.1, 10, 30> rotate -22*z } box { <1.1, -10, 8.5> <4, 10, 30> rotate -22*z } cylinder { -10*y, 10*y, 7 rotate -22*z translate <-8.75, 0, 8.500001> } cylinder { -10*y, 10*y, 7 rotate -22*z translate <8.75, 0, 8.5000001> } rotate (counter*120)*x } #local counter = counter + 1; #end } cylinder { -4*x, 4*x, 2.5 } texture { color_tex } bounded_by { box { <-3.35, -22, -22> <3.35, 22, 22> } } } #end #end #declare black = color rgb <0.05, 0.05, 0.05>; #declare lego_finish = finish { //ambient 0.08 phong .3 phong_size 450 roughness 0.05 reflection 0.05 } // road finish ambient 0.4 specular 1 roughness 0.005 reflection 0.05 } #declare black_tex = texture { pigment { color black } finish { lego_finish } } //object { plane_10(1,0,1,1,0,0,0,(clock*56),(clock*56),0,60,60,90,90,0,0,0) rotate -65*y translate <-10, 0, 0> } #declare leftpropellorangle = clock*56; #declare leftpropellorangle = clock*56; #macro props() #if (propblur) motion_blur { type mblurtype object { m_propellor(black_tex) rotate 70*x*clock translate <54, 40.45, -48> } // } #else object { m_propellor(black_tex) rotate leftpropellorangle*x translate <54, 40.45, -48> } #end #if (propblur) motion_blur { type mblurtype object { m_propellor(black_tex) rotate 180*y rotate -70*x*clock translate <54, 40.45, 48> } } #else object { m_propellor(black_tex) rotate 180*y rotate -rightpropellorangle*x translate <54, 40.45, 48> } #end #end union { props() rotate y*-90 translate x*70 }