#version 3.1; #include "colors.inc" #include "metals.inc" global_settings { assumed_gamma 1.0 max_trace_level 25 } // ---------------------------------------- light_source { <50, 3000, 250> color rgb 1 fade_distance 300 fade_power 0.3 } #declare N = 500; #include "world10.inc" //Ground will undefine N, so there won't be any problems in using it. #declare tWhiteBox = texture{ pigment { colour rgb 1 } finish { ambient 0.7 } } #declare tBlackBox = texture{ pigment { colour rgb 0 } finish { ambient 0.2 } } noise(0.0005) change_lin(<1/2, 0, 1/2>, -0.50) //Center hole change_lin(<1/1, 0, 1/1>, -0.25) //A hole at the top right corner. change_log(<2/5, 0, 1/5>, -0.25 ) //A hole close to center and towards the viewer, change_log(<08/32, 0, 23/32>, 0.50) change_lin(<11/32, 0, 26/32>, -0.5) change_log(<14/32, 0, 28/32>, 0.40) change_log(<04/32, 0, 19/32>, 0.40) change_lin(<07/32, 0, 22/32>, -0.5) finalize() //create the camera before the world. or you'll be in trouble, since the world creation destroys the array. #declare toScale = <200,200,200>; camera { //This is useless if I use an include file. //The point function can't read that data. //So, to fix, I'd have to do : #debug concat(str(point(<4/5,0,0>.x,-3,10), " ", str(point(<4/5,0,0>.y,-3,10), " ", str(point(<4/5,0,0>.z,-3,10)) //This is frustrating, i'll do a #macro to write a vector //It's done :-) location <27/50, 0.2595, 25/100>*toScale // location <.5,1.6,.5>*toScale direction 1*z right 4/3*x look_at <.5,0.3,.75>*toScale // look_at <.5,0,.5>*toScale } #declare fast = true; #if(!fast) #include "Tree1.inc" #include "Bush1.inc" #include "chesspcs.inc" #end #local DX = 34/50; #local DY = 0.255; #local DZ = 37/50; #if(fast) cylinder { , , 0.01 pigment{Red} finish { ambient <1,0,0>} scale toScale } #else object { Tree1 scale 1/6.25 translate scale toScale } #end #local DX = 20/50; #local DY = 0.253; #local DZ = 35/50; #if(fast) cylinder { , , 0.01 pigment{Blue} finish { ambient <0,0,1>} scale toScale } #else object { Bush1 scale 1/8 translate scale toScale } #end #local DX = 16/50; #local DY = 0.263; #local DZ = 29/50; #if(fast) cylinder { , , 0.01 pigment{Green} finish { ambient <0,1,0>} scale toScale } #else object { BKnight rotate y*-72 scale 1/6 //fit 1 unit measure scale 1/38 translate scale toScale } #end #local DX = 30/50; #local DY = 0.331; #local DZ = 42/50; #if(fast) cylinder { , , 0.01 pigment{Yellow} finish { ambient <1,1,0>} scale toScale } #else object { WKing scale 1/6 //fit 1 unit measure scale 1/36 translate scale toScale } #end WriteBoxes("MyWorld3B.inc") //WriteMesh("MyWorldM.inc") #error "I dont want to do more :-)" object { //OutMesh() //Create a mesh of it. //OutBoxes(tWhite, tBlack) #include "MyWorld3B.inc" // pigment { gradient y} scale toScale } #declare Water = material { texture { pigment { color rgbf <0.2708, 0.624006, 1.0, 1.0> } normal { bozo , 0.5 turbulence 0.5 ramp_wave scale 2.0 } finish { ambient 0.1 phong 1.0 phong_size 89.403333 reflection 0.4 } scale <0.4, 0.4, 2.0> } interior { ior 1.436 caustics 0.1 fade_distance 60.0 fade_power 2.0 } } box { <0,-0.0001,0>,<1,0.24,1> texture{ //Water T_Chrome_2D normal { waves 0.07 frequency 50.0 } scale 1/100 translate <1/2,0,1/2> } scale toScale } #declare fast = false; #if(!fast) fog { fog_type 2 distance 0.5*toScale.y color White fog_offset 0.25*toScale.y //0.125 * fog_alt 0.05*toScale.y turb_depth 2 turbulence <3,5,3> omega 2/3 octaves 6 lambda 2.3 } sky_sphere { pigment { gradient y color_map { [0 color rgb <.65,.7,.8>] [1 color rgb <0.2, 0.2, 1>] } } pigment { wrinkles turbulence .5 octaves 6 lambda 5 //3 to 6 omega 0.3 //0.2 to 0.6 color_map { [0 color rgbt <1, 1, 1, 1>] [0.5 color rgbt <0.98, 0.99, 0.99, .8>] [1 color rgbt <1, 1, 1, 1>] } scale <.8, .1, .8> } } //cloud layer 1 plane { y, 900 texture { pigment { bozo turbulence .4 omega .7 color_map { [0 color rgbt <.4,.4,.4,1>] [.5 color rgbt <.4,.4,.4,.6>] [1 color rgbt <.4,.4,.4,.2>] } } finish { ambient .5 diffuse .5 } scale 2000 translate <-500,900,-10000> } hollow } //cloud layer 2 plane { -y,-1200 texture { pigment { bozo turbulence .4 omega .7 color_map { [0 color rgbt <.8,.8,.8,1>] [.5 color rgbt <.8,.8,.8,.6>] [1 color rgbt <.9,.9,.9,.2>] } } finish { ambient .5 diffuse .3 } scale 2000 translate <1500,900,-2000> } hollow } #end #debug "rendering \n" #statistics concat("There are ",str(triangles,-3,0)," triangles in the scene.\n")