#include "colors.inc" // Standard Color definitions #include "textures.inc" // Standard Texture definitions /* global_settings { radiosity { brightness 3.3 count 100 distance_maximum 0 error_bound 0.2 gray_threshold 0.5 low_error_factor 0.8 minimum_reuse 0.015 nearest_count 10 recursion_limit 2 } } */ // radiosity (global illumination) settings /* global_settings { radiosity { pretrace_start 0.08 // start pretrace at this size pretrace_end 0.04 // end pretrace at this size count 35 // higher -> higher quality (1..1600) [35] nearest_count 5 // higher -> higher quality (1..10) [5] error_bound 1.8 // higher -> smoother, less accurate [1.8] recursion_limit 4 // 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 .5 // brightness of radiosity effects (0..1) [1] adc_bailout 0.01/2 //normal on // take surface normals into account [off] //media on // take media into account [off] //save_file "file_name" // save radiosity data //load_file "file_name" // load saved radiosity data //always_sample off // turn sampling in final trace off [on] //max_sample 1.0 // maximum brightness of samples } } */ background { color White } //background { color Black } //---------------------------------------------------------------- // TEXTURE DEFFINITIONS //---------------------------------------------------------------- #local P_Clouds= pigment { gradient z pigment_map { [ 0.0 color rgbt 1] [ 0.1 bozo color_map { [0.0 color rgbt < 0.85, 0.88, 0.94, 0.0>] [0.15 color rgbt < 0.91, 0.96, 0.99, 0.0>] [0.35 color rgbt < 0.91, 0.96, 0.99, 1.0>] } turbulence 0.75 lambda 2.4 omega 0.6 octaves 8 scale <0.4,0.4,0.15> ] [ 0.4 bozo color_map { [0.0 color rgbt < 0.85, 0.88, 0.94, 0.0>] [0.15 color rgbt < 0.91, 0.96, 0.99, 0.0>] [0.35 color rgbt < 0.91, 0.96, 0.99, 1.0>] } turbulence 0.75 lambda 2.4 omega 0.6 octaves 8 scale <0.4,0.4,0.15> ] [ 0.65 color rgbt 1] } rotate 10*z } #declare BGlass=texture { pigment { color rgbf <1,1,1,.9> } finish { ambient .75 //0.5 diffuse 0.1 brilliance 10 reflection 0.1 refraction 0.9 ior 1.45 specular 0.8 roughness 0.0003 phong 1 phong_size 400 } } #declare BGlass2=texture { pigment { color rgbf <.9, .85, .80,.9> } finish { ambient .75 //0.5 diffuse 0.1 brilliance 10 reflection 0.1 refraction 0.9 ior 1.45 specular 0.8 roughness 0.0003 phong 1 phong_size 400 } } #local Tex_Sky = texture { pigment { function { abs(z) } color_map { [0.0 color rgb < 0.640, 0.685, 0.800 >] [0.3 color rgb < 0.400, 0.550, 0.900 >] } turbulence 0.05 } finish { diffuse 0 ambient 1 } } texture { pigment { P_Clouds } finish { diffuse 0 ambient 1 } } /* sphere { <0, 0, 0>, 1 texture { Tex_Sky } scale<10000, 10000, 3000> no_shadow hollow on photons{ collect off } } */ #declare White = color rgb <1,1,1>; #declare WindowWhite = texture { pigment { color rgb<.9.9.9> } finish { ambient .9 } } #declare WindowWhite2 = texture { pigment { color rgb<.8.8.8> } finish { ambient .2 } } #declare Aluminum2 = texture { pigment { //rgb <0.55, 0.5, 0.45> rgb <.9, .85, .80> } finish { metallic ambient .1 diffuse 0.65 specular 0.85 roughness 0.001 reflection { 0.45 metallic } //brilliance 1.5 brilliance 2.5 } } #declare AluminumWhite = texture { pigment { color NeonBlue } finish { metallic ambient .2 diffuse 0.65 specular 0.85 roughness 0.001 reflection { 0.45 metallic } brilliance 2.5 } } #declare TextureBuilding = texture { brick texture { Aluminum }, texture { bozo texture_map { [0.0 WindowWhite2 ] [0.49 WindowWhite ] [0.5 Aluminum2 ] [1.0 Aluminum2 ] } scale <2, .25, 2> } brick_size <1,1.2,1> mortar .2 scale .01 } //---------------------------------------------------------------- // CAMERA DEFFINITIONS //---------------------------------------------------------------- // The main camera to view the scene #declare camera_main = camera { location<0,0,-30> //location<0,0,-8> //location <0,0,-20> look_at<0,0,0> right <.66,0,0> } // camera that zooms in on the buildings #declare camera_building = camera { location<0,4,-4> look_at<0,4,0> right <.66,0,0> } camera { camera_main } //camera { camera_building } //---------------------------------------------------------------- // OBJECT DEFFINITIONS //---------------------------------------------------------------- #declare R1 = seed(1000); #declare big_rad = .03; #declare small_rad = .01; #declare planet_cage = union { #declare n = 0; #declare ns = 360 / 13; #while(n<360) torus { 5,big_rad rotate<0,0,90> rotate<0,n,0> } #declare n = n + ns; #end #declare r = 0; #declare rs = 6.28 / 30; #while(r<6.28) #declare xs = 5 * cos(r); #declare ys = 5 * sin(r); torus { xs,big_rad translate<0,ys,0> } #declare r = r + rs; #end #declare n = 0; #declare ns = 360 / 39; #while(n<360) torus { 5,small_rad rotate<0,0,90> rotate<0,n,0> } #declare n = n + ns; #end #declare r = 0; #declare rs = 6.28 / 90; #while(r<6.28) #declare xs = 5 * cos(r); #declare ys = 5 * sin(r); torus { xs,small_rad translate<0,ys,0> } #declare r = r + rs; #end texture { Aluminum2 } } #declare surface_holes = 30; #declare surface_ang_array = array[surface_holes] #declare surface_rad_array = array[surface_holes] #macro sphere_plate(r) difference { sphere { <0,0,0>,5.15 } sphere { <0,0,0>,5.1 } difference { cylinder { <0,-100,0>,<0,100,0>, 100 } cylinder { <0,-101,0>,<0,101,0>, r } } box { <-200,-200,-200>,<200,0,200> } } #end #declare surface_shell = difference { #local R1 = seed(1001); sphere { <0,0,0>,5.1 } // the shell sphere { <0,0,0>,5 } // cut out the center #local n = 0; #while(n < surface_holes) #local rad = rand(R1)*1 + 1; #local ang = ; #declare surface_ang_array[n] = ang; #declare surface_rad_array[n] = rad; cylinder { // punch some holes in the shell <0,0,0>,<0,100,0>,rad rotate ang } #local n = n + 1; #end texture { Aluminum2 } } #declare shell_rings = difference { union { #local n = 0; #while(n < surface_holes) object { sphere_plate(surface_rad_array[n] + .15) rotate surface_ang_array[n] } #local n = n + 1; #end } #local n = 0; #while(n < surface_holes) #declare ang = surface_ang_array[n]; #declare rad = surface_rad_array[n]; cylinder { // punch some holes in the shell <0,0,0>,<0,100,0>, rad rotate ang } #local n = n + 1; #end texture { Aluminum2 } } #declare surface_extras = union { // surface cubes #local n = 0; #while (n < 3000) #local w = rand(R1) * .05 + .01; box { <-w,-w,-w>, translate <5.1,0,0> rotate } #local n = n + 1; #end // embeded rings #local n = 0; #while (n < 45) torus { rand(R1)*2+1, rand(R1)*.02+.01 translate <5.1,0,0> rotate } #local n = n + 1; #end // floating rings #local n = 0; #while (n < 50) #local rad = rand(R1) * .5 + .1; union { torus { rad, .02 texture { Aluminum2 } } cylinder { <0, -.01, 0>, <0, .01, 0>, rad texture { BGlass2 } } translate <0,6,0> rotate } #local n = n + 1; #end // big ring union { torus { 8, .04 } #local n = 0; #while (n < 360) union { cylinder { <8,0,0>,<1000000,0,0>,.035 } #local s = 0; #while (s < 10) #local sx = rand(R1) * 20000 + 8; sphere { , rand(R1) * .15 + .035 } torus { sx, .02 } #local s = s + 1; #end #local s = 0; #while (s < 4) #local sx2 = rand(R1) * 20 + 8; sphere { , rand(R1) * .15 + .035 } #local s = s + 1; #end rotate <0,n,0> } #local n = n + 10; #end rotate <-15,45,0> } texture { Aluminum2 } } #declare slise = difference { sphere { <0,0,0>,4 } sphere { <0,0,0>,3.75 } box { <-100,-100,-100>,<100,100,0> } box { <-100,-100,-100>,<0,100,100> rotate<0,75,0> } } #declare slices = union { #local R1 = seed(1000); #local Count=0; #while (Count<30) object { slise rotate rotate <0,0,rand(R1)*360> } #local Count = Count + 1; #end texture { Aluminum2 } } #macro ships(h) #local n = 0; #while (n < 360) sphere { <0,0,0>, .01 scale <2,1,1> translate <0, 0, h> rotate } #local n = n + 3; #end #end #macro road(r) union { difference { cylinder { <-.025,0,0>,<.025,0,0>, r } cylinder { <-10,0,0>,<10,0,0>, r - .01 } } #local n = 0; #while (n < 360) cylinder { <0,0,0>, <0,r,0>, .025 rotate } #local n = n + 10; #end ships(r+.03) texture { Aluminum2 } } #end #declare roads = union { #local n = 0; #while(n < 50) #local r = rand(R1)*1 + 4.5; object { road(r) rotate } #local n = n + 1; #end } #macro antenna (w,h) union { #local sy = h+(h/50); #local rad = w/10; cylinder { <0,4,0>,<0,sy,0>, rad } sphere { <0,sy,0>, rad*2 } texture { Aluminum2 } } #end #macro building (w,h) union { box { <-w,4,-w>, texture { TextureBuilding } } antenna (w,h) } #end #macro buildings (buildingCount) #local R1 = seed(1000); #local n = 0; #while(n; #local k = 0; #while (k < surface_holes) #local dist = vlength(surface_ang_array[k] - ang); #if (dist < min_dist) #local min_dist = dist; #local save_index = k; #end #local k = k + 1; #end //#local rx = surface_ang_array[save_index].x; //#local ry = surface_ang_array[save_index].y; //#local rz = surface_ang_array[save_index].z; #local rad = surface_rad_array[save_index]; #if (min_dist < rad*100/2) object { building(rand(R1)*.1, rand(R1)*1+5.1) rotate ang } #end #local n = n + 1; #end #end #declare lights = union { #local R1 = seed(1000); #local n = 0; #while (n < 15) light_source { <5.25, 0, 0> color White //spotlight //point_at <0,0,0> //falloff 25 //radius 18 rotate } #local n = n + 1; #end } #declare port = difference { cylinder { <0,0,0>, <5.5,0,0>, 1.25 } cylinder { <-10,0,0>,<10,0,0>, 1 } texture { Aluminum2 } rotate <0, 110, 0> rotate <-30, 0, 0> } #declare port_cutout = cylinder { <0,0,0>, <10,0,0>, 1.125 texture { Aluminum2 } rotate <0, 110, 0> rotate <-30, 0, 0> } #declare building_count = 1500; #declare pov_planet = union { //sphere { <0,0,0>,4 texture { BGlass } } object { surface_shell } object { shell_rings } object { surface_extras } object { roads } buildings(building_count) //object { slices } //object { lights } //object { port } } light_source { <2000,2000,-2000> color White } light_source { <-2000,1000,-4000> color White } object { pov_planet }