//A motel by Kurt Bangert //http://www.travelnotes.de //Sorry, I provide this file, but it is not very //user friendly global_settings { max_trace_level 20 } #include "colors.inc" #include "textures.inc" #include "57chevy.inc" #include "neon.inc" #include "room.inc" #include "machine.inc" #include "shield.inc" #include "bush1.inc" camera { location <-12,10, -75> look_at <43,10, -8> angle 70 } #declare r1 = seed(2); #declare r2 = seed(5); #declare DarkYellow= color rgb<0.7,0.7,0> #declare skyblue = pigment{ gradient y color_map { [0.0 color rgb <.5, 0, .5>] [0.3 color rgb <0.2, 0, 0.4>] [1.0 color rgb <0, 0, 0>] } scale 10000 } light_source { <10, 10, -40> color rgb <0.3,0.3,0.3> } light_source { <-20, 20, -50> color rgb <0.3,0.3,0.3> } object {sphere {<0,0,0> 10000} hollow pigment {skyblue}finish {Luminous}} //fence #declare fence= union{ box {<-2,5.5,0><24,5.7,0.1>pigment {White}} box {<-2,5.9,0><24,6.1,0.1>pigment {White}} box {<-2,6.3,0><24,6.5,0.1>pigment {White}} box {<24,5.5,0><24.1,5.7,-58>pigment {White}} box {<24,5.9,0><24.1,6.1,-58>pigment {White}} box {<24,6.3,0><24.1,6.5,-58>pigment {White}} } object {fence} #declare i=0; #declare building = union { //part 1 of L shape #while (i<3) object {room_unit pigment {White } translate x*(i*broad)} #while (rand(r2)<0.35) object {box {<1,2,3><4,3.8,3.1> translate x*(i*broad) pigment {color rgb } finish {Luminous}} } #end object {room_unit pigment {White } translate y*high translate x*(i*broad) } #while (rand(r2)<0.35) object {box {<1,2,3><4,3.8,3.1> translate y*high translate x*(i*broad) pigment {color rgb } finish {Luminous}} } #end #declare i=i+1; #end //part 2 of L shape #declare j=1; #while (j<7) object {room_unit pigment {White } rotate y*90 translate <24,high,-(j*broad)> } #while (rand(r2)<0.35) object {box {<1,2,3><4,3.8,3.1> rotate y*90 translate <24,high,-(j*broad)> pigment {color rgb } finish {Luminous}} } #end object {room_unit pigment {White } rotate y*90 translate <24,0,-(j*broad)>} #while (rand(r2)<0.35) object {box {<1,2,3><4,3.8,3.1> rotate y*90 translate <24,0,-(j*broad)> pigment {color rgb } finish {Luminous}} } #end #declare j=j+1; #end box {<1,2,-.1><4,3.8,15> pigment {Red} rotate y*90 translate <56,0,-(i*16)>} //staircase corner //floor box {<24,0,0><54,0.2,30> pigment {White}} box {<24,5,0><54,5.2,30> pigment {White}} //room box {<24,0,8><50,10,20> pigment {White}} light_source {<32,9,7.3> color rgb <.4,.4,.1> fade_distance 5 fade_power 2 } object {sphere {<32,9,7.8>,.2 pigment {color rgb <1,1,.5>} finish {Luminous}} } light_source {<32,4,7.3> color rgb <.4,.4,.1> fade_distance 5 fade_power 2 } object {sphere {<32,4,7.8>,.2 pigment {color rgb <1,1,.5>} finish {Luminous}} } //roof box {<-.5,0,-.1><24+depth/2,.5,depth/2+.1> rotate -x*10 translate <0,10,0> pigment {PaleGreen}} box {<-.5,0,-.1><24+depth/2,.5,depth/2+.1> rotate x*10 translate <0,12.2,depth/2> pigment {PaleGreen}} box {<-.1,0,15> rotate z*10 translate <24,10,0> pigment {PaleGreen}} box {<-.1,0,15> rotate -z*10 translate <24+depth/2,12.2,0> pigment {PaleGreen}} triangle {<0,10,0><0,10,depth><0,12.5,depth/2> pigment {White}} triangle {<24,10,-56><24+depth,10,-56><24+depth/2,12.5,-56> pigment {White}} //close window behind vending machine #declare i=0; #while (i<13) object {box {<0,0,0> } rotate x*15 translate <0,i*0.4,2.4> rotate y*90 translate <24,0,-40> pigment {White } } #declare i=i+1; #end #declare i=0; #while (i<13) object {box {<0,0,0> <.1,.4,-broad>} rotate z*15 translate <26.5,i*0.4,-40> pigment {White } } #declare i=i+1; #end //office object{box {<27.5,0,-50><30,3.8,-56>} pigment {DarkYellow} finish {Luminous }} } //end union difference{ object {building} object{box {<25, 0,-53><30,3.8,-55>}pigment {DarkYellow} finish {Luminous }} object{box {<26.5, 0,-52><30,3.8,-55>}pigment {DarkYellow} finish {Luminous }} } //office door object{union{ object{box {<0,0,2><0.1,3.8,0> pigment {Gray50}}} object {sphere {<-.2, 1.9,1.7>,.1 pigment {color rgb <1,1,.5>} texture {Chrome_Texture}} } }rotate y*15 translate <26.5,0,-55>} light_source { <27.2,2,-52.5> color rgb <1,1,0> fade_distance 5 fade_power 2 } object {box {<1,2,2.6><4,3.8,2.7> translate x*(i*broad) pigment {color rgbt } finish {Luminous}} } //staircase #declare staircase = union{ #declare i=1; #while (i<16) object {box {<0,0,0> <2,.05,.7>} translate <-2,i*0.3125,10.9-i*.5> pigment {White } } #declare i=i+1; #end object{box {<-2,5,0><0,5.1,2.5>}} object{box {<-2.1,0,0><-2.1,0.2,10> rotate x*30 translate <0,4.93,2.4>} } object{box {<-2.1,0,0><-2.1,0.2,10> rotate x*30 translate <0,5.53,2.4>} } object{box {<-2.1,0,0><-2.1,0.2,10> rotate x*30 translate <0,5.93,2.4>} } object{box {<-2.1,0,0><-2.1,0.2,10> rotate x*30 translate <0,6.33,2.4>} } object{box {<0,5,0><0.1,5.1,2.5>}} object{box {<0,0,0><0.1,0.2,10> rotate x*30 translate <0,4.93,2.4>} } object{box {<0,0,0><0.1,0.2,10> rotate x*30 translate <0,5.53,2.4>} } object{box {<0,0,0><0.1,0.2,10> rotate x*30 translate <0,5.93,2.4>} } object{box {<0,0,0><0.1,0.2,10> rotate x*30 translate <0,6.33,2.4>} } object{box {<-2.1,0,11.4><-2,1.5,10.9> }} object{box {<-2.1,5,2.3><-2,6.5,2.6> }} object{box {<0,0,11.4><0.1,1.5,10.9> }} object{box {<0,5, 2.3><0.1,6.5,2.6> }} box {<-2,5.5,0><-1.9,5.7,2.5>pigment {White}} box {<-2,5.9,0><-1.9,6.1,2.5>pigment {White}} box {<-2,6.3,0><-1.9,6.5,2.5>pigment {White}} box {<0,5.5,0><0.1,5.7,2.5>pigment {White}} box {<0,5.9,0><0.1,6.1,2.5>pigment {White}} box {<0,6.3,0><0.1,6.5,2.5>pigment {White}} } //end union object{staircase pigment{White}} light_source { <-.5,8,5> color rgb <.4,.4,.1> fade_distance 15 fade_power 2 } object {sphere {<-.1,8 ,5>,.2 pigment {color rgb <1,1,.5>} finish {Luminous}} } object{staircase rotate y*90 translate <24,0,-58> pigment {White}} light_source { <29,7.5,-56.5> color rgb <.4,.4,.1> fade_distance 15 fade_power 2 } object {sphere {<29,7.5,-56.2>,.2 pigment {color rgb <1,1,.5>} finish {Luminous}} } object{staircase rotate -y*90 translate <37,0,2> pigment {White}} //Coke vending, in fact, for saving time and effort, I used the //battery vending machine from Colossal Cave light_source { <23,4.5,-42> color rgb <.2,.2,.1> fade_distance 5 fade_power 2 } object {vending_machine scale 0.005 rotate y*90 translate <25,0,-44>} //Pepsi, I use an image from a picture that I made in Florida in 1990 #declare pepsi = union{ box {<0,0,.01><1.3,3,.8> pigment {color rgb <0,0,.7>}} box {<0,0,0><1.3,3,.01> pigment{image_map { gif "vmpepsi.gif" interpolate 2 map_type 0 } scale <1.2,3,2.5> translate <0,0,0>} }} object {pepsi rotate y*90 translate <25,0,-42>} #declare ad4= text { ttf "arlrdbd.ttf" "OFFICE" .1, 0 hollow pigment {rgbt<1, 0, 0, .1>} finish{Luminous}} object {ad4 scale 1.1 rotate y*90 translate <23.9,4,-49>} box {<24,4,-49><24.1,5,-53.1> pigment {Gray50}} #declare ad1= text { ttf "arlrdbd.ttf" "MOTEL" .15, 0 hollow pigment {rgbt<1, 0, 1, .9> } interior {pink_neon} } #declare ad2= text { ttf "arlrdbd.ttf" "66" .15, 0 hollow pigment {rgbt<1, 0, 1, .9> } interior {pink_neon} } #declare ad3= text { ttf "arlrdbd.ttf" "VACANCY" .3, 0 hollow pigment {rgbt<1, 0, 1, .9>} interior {green_neon} } #declare ad4= text { ttf "arlrdbd.ttf" "AIR CONDITION" .3, 0 hollow pigment {rgbt<1, 0, 1, .9>} interior {pink_neon} } #declare ad5= text { ttf "arlrdbd.ttf" "CABLE TV" .3, 0 hollow pigment {rgbt<1, 0, 1, .9>} interior {pink_neon} } #declare ad= union{ cylinder{<0,-10,0>,<0,4.5,0> .1 pigment {Gray50}} cylinder{<0,7.2,0>,<0,8,0> .1 pigment {Gray50}} cylinder{<-2,7.2,0>,<2,7.2,0> .1 pigment {Gray50}} cylinder{<-2,4.55,0>,<2,4.55,0> .1 pigment {Gray50}} cylinder{<-2,4.55,0>,<-2,7.2,0> .1 pigment {Gray50}} cylinder{< 2,4.55,0>,< 2,7.2,0> .1 pigment {Gray50}} object {ad1 scale 1 translate <-1.7,12.4,0>} object {ad2 scale 2.8 translate <-1.45,9.7,0>} object {ad3 scale .7 translate <-1.7,6.5,0>} object {ad4 scale .4 translate <-1.6,5.5,0>} object {ad5 scale .4 translate <-1,4.8,0>} object {shield hollow translate y*8 pigment {rgbt<1, 0, 1, .9>} interior {pink_neon} } } //whole ad object {ad scale 2 translate <2.5,3.5,-26>} cylinder{<2.5,0,-26>,<2.5,0.2,-26> 1 texture{wall1}} cylinder{<2.5,.2,-26>,<2.5,0.21,-26> 1 texture{green1}} //Grass plane {y,0 texture {T1 scale 0.2}} //left object {box {<-30,0,-8> <0,.2,-100>} texture{wall1} } object {box {<-30,.2,-8> <0,.21,-100>} texture {green1} } //front object {box {<4,0,-8> <14,.2,-12>} texture{wall1} } object {box {<4,.2,-8> <14,.21,-12>} texture {green1} } //right object {box {<17,0,-16> <20,.2,-30>} texture{wall1} } object {box {<17,.2,-16> <20,.21,-30>} texture {green1} } object {box {<17,0,-36> <20,.2,-50>} texture{wall1} } object {box {<17,.2,-36> <20,.21,-50>} texture {green1} } //behind object {box {<10,0,-62> <56,.2,-68>} texture{wall1} } object {box {<10,.2,-62> <56,.21,-68>} texture {green1} } //left bushes #declare i=0; #while (i<10) object {bush2 scale <1+rand(r2),1+rand(r2)*2,1+rand(r2)> translate <-rand(r2)*2-2,0,-i*6+rand(r2)-9>} object {bush2 scale <1+rand(r2),1+rand(r2)*2,1+rand(r2)> translate <-rand(r2)*2-5,0,-i*6+rand(r2)-9>} object {bush2 scale <1+rand(r2),1+rand(r2)*2,1+rand(r2)> translate <-rand(r2)*2-8,0,-i*6+rand(r2)-9>} #declare i=i+1; #end //right bushes object {bush1 scale <1.5,3,2> translate < 21.5,0,-64.5>} object {bush1 scale <1.5,3,2> translate < 21.5,0,-66>} object {bush2 scale <1.5,4,2> translate < 18,0,-65.5>} object {bush1 scale <2,3,2> translate < 15,0,-65.5>} object {bush1 scale <1,2,1> translate < 13,0,-63.5>} /* //mountain //the mountain does not show up in the final picture //but I use it also to render a sky, and I liked the clouds #declare mountain = object {height_field { tga "berg.tga" }} object {mountain scale <5000,530,3000> translate<-200,0,100> pigment {DarkBrown}} //clouds object {mountain texture {pigment{ gradient y color_map { [0.0 color rgbt <0, 0, 0.1, 1>] [0.3 color rgbt <0.2, 0, 0.4, 0>] [1.0 color rgbt <0.5, 0.5, 0, 0>] } } finish {Luminous}} rotate -x*90 scale <10000,1000,500> translate<-500,00,2000> } */ object {chevy scale .4 rotate y*180 translate <9,1,-54>} object {light_source { <0,0,0> color red 1 green 1 blue 0.25 spotlight point_at <5, 0, 0 > tightness 12 radius 8 falloff 20 } rotate -z*20 rotate y*0 translate <12,1,-54>} object {light_source { <0,0,0> color red 1 green 1 blue 0.25 spotlight point_at <5, 0, 0 > tightness 12 radius 8 falloff 20 } rotate -z*20 rotate y*0 translate <12,1,-52>}