// LegoŽ scene // by David Fontaine #include "colors.inc" #include "lego00.inc" #include "lego_misc.inc" #include "lego_bricks.inc" #include "lego_beams.inc" #include "lego_plates.inc" #include "lego_castle.inc" #include "lego_deco.inc" #include "stones.inc" #include "castle 6-99.inc" #include "textures.inc" global_settings { max_trace_level 50 } camera { location <0,10.5,-15> look_at <0,7.5,7> } light_source { <600,2700,-2200> color White*1.2 area_light x*220,z*220,4,4 jitter } light_source { <600,2700,-2200> color Gray50 shadowless } // ************************************************ // *** NON-MEDIA CLOUDS (but almost so slow!!!) *** // ************************************************ // Jaime Vives Piqueres, (?)1999. // jaime@ctav.es // http://members.xoom.com/jaimevives #declare sky_color=SkyBlue; // basic sky color #declare clouds_height=5000; // first layer starts here #declare plane_dist=30; // distance between succesive planes #declare textu_dist=30; // distance between textures on succesive planes #declare num_planes=40; // raise it for more "volume" #declare cnt_planes=1; // counter // place the planes #while (cnt_planes <= num_planes) // basic pigment for the lower plane #declare p=sky_color*.5+White*.5; // two derived pigments to mix on each plane, more "white" each pass #declare p1=p*(1-(cnt_planes/num_planes))+White*(cnt_planes/num_planes); #declare p2=p*.9*(1-(cnt_planes/num_planes))+White*.9*(cnt_planes/num_planes); // place the plane disc { 0,y,100000000000 texture{ pigment{ wrinkles // try other patterns... octaves 9 lambda 3 turbulence 4 color_map{ // notice that each plane has more transparency [0.0 Clear] [0.65 Clear] // play with the "cloud zone" entries [0.75 p1 filter 0.7+0.1*(cnt_planes/num_planes)] [1.0 p2 filter 0.7+0.1*(cnt_planes/num_planes)] } scale 30000 // depends on the patern } finish{Luminous} // prevent shadows translate (clouds_height+textu_dist*cnt_planes)*y //scale (clouds_height+textu_dist*cnt_planes)/clouds_height } translate (clouds_height+plane_dist*cnt_planes)*y //scale (clouds_height+plane_dist*cnt_planes)/clouds_height } #declare cnt_planes=cnt_planes+1; #end disc { 0,y,100000000000 translate (clouds_height+plane_dist*num_planes+100)*y pigment{sky_color} finish { ambient 1 diffuse 0 } no_shadow } // "container" sky sky_sphere{ pigment{sky_color} } fog { fog_type 1 distance 60000 color Gray85 } union { SpiralTree (2,3,16,3,75,1) translate <-10,0,180> } //.1 union { SpiralTree (2,3,16,3,200,-1) translate <-30,0,90> } union { SpiralTree (3,5,19,5,130,1) translate <-90,0,130> } union { SpiralTree (3,5,19,5,10,-1) translate <-65,0,380> } //1 union { SpiralTree (3,5,19,5,90,1) translate <-270,0,500> } //1 union { SpiralTree (2,3,16,3,100,1) translate <-150,0,300> } //1 union { SpiralTree (3,5,19,5,90,-1) translate <-400,0,700> } //6 union { SpiralTree (2,3,16,3,100,1) translate <-200,0,900> } //7 union { SpiralTree (3,5,19,5,90,1) translate <100,0,880> } //7 union { SpiralTree (2,3,16,3,100,-1) translate <150,0,800> } //7 union { SpiralTree (3,5,19,5,240,1) translate <40,0,150> } //.1 union { SpiralTree (3,5,19,5,200,-1) translate <10,0,400> } //1 union { SpiralTree (3,5,19,5,27,1) translate <-300,0,800> } //7 union { SpiralTree (3,5,19,5,265,1) translate <-70,0,700> } //6 union { SpiralTree (3,5,19,5,260,1) translate <25,0,300> } //1 union { SpiralTree (3,5,19,5,290,1) translate <-140,0,320> } //1 object { castle699 rotate 34*y translate <22,0,86> } prism { -10,0,31 <41,2>,<44,5>,<48,5>,<48,6>,<50,8>,<50,18>,<54,22>,<54,24>,<50,28>,<50,41>,<48,43>,<47,43>,<44,46>,<35,46>,<33,48>, <21,48>,<19,46>,<10,46>,<7,43>,<6,43>,<4,41>,<4,28>,<0,24>,<0,22>,<4,18>,<4,8>,<6,6>,<6,5>,<8,5>,<13,2>,<41,2> texture { T_Stone25 scale 5 } rotate 34*y translate <22,0,86> } sphere { <0,-60000,0>,59996 texture { pigment { bumps turbulence .3 scale .8 color_map { [ 0.0 rgbt<.439,.600,.750,.3> ] [ 0.5 rgbt<.137,.500,.500,.3> ] [ 1.0 rgbt<.259,.400,.300,.3> ] } } } finish { reflection .3 ambient .2 } } #declare man = union { object { torso texture { LegoRed } translate 2*y } object { shirt texture { LegoRed } texture { pigment { image_map { sys "st_redmail.bmp" once } } scale <1.95,1.6,1> translate <-.975,0,0> } translate 2*y } object { plainhead translate <0,3.6,.5> } union { object { left_arm texture { LegoBlack } translate <0,3.2,0> } object { hand texture { LegoYellow } translate -.52*z rotate 177*y translate .52*z rotate <12.4,0,10.6> translate <1.3,1.7,0> } object { shieldbluedragon rotate -3*z rotate -2*y translate <0,.55,0> rotate -65.2*x translate <1.3,1.7,.52> } translate <0,-3.2,-.5> rotate -10.6*z rotate 65.2*x rotate 10.6*z translate <0,3.2,.5> } object { hand texture { LegoYellow } rotate <12.4,0,-10.6> translate <-1.3,1.7,0> } object { right_arm texture { LegoBlack } translate <0,3.2,0> } object { sword rotate 90*y rotate -90*x translate <-1.3,1.7,.48> texture { LegoDkGray } } object { left_leg texture { LegoBlack } translate 1.45*y } object { right_leg texture { LegoBlack } translate -.5*z rotate 40*x translate <0,1.45,.5> } object { leg_joiner texture { LegoRed } } object { helmet_archer translate <0,3.6,.5> texture { LegoDkGray } normal { WeaponNormal } finish { WeaponFinish } } } #declare grassblock = height_field { tga "hfield.tga" smooth scale <20,.2,15> } #declare U=19.5; difference { union { union { object { grassblock translate <-2*U,0,-10> } object { grassblock translate <-U,0,-10> } object { grassblock translate <0,0,-10> } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate <-2*U,0,-10+U*.75> } object { grassblock translate <-U,0,-10+U*.75> } object { grassblock translate <0,0,-10+U*.75> } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate <-2*U,0,-10+2*U*.75> } object { grassblock translate <-U,0,-10+2*U*.75> } object { grassblock translate <0,0,-10+2*U*.75> } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate <-2*U,0,-10+3*U*.75> } object { grassblock translate <-U,0,-10+3*U*.75> } object { grassblock translate <0,0,-10+3*U*.75> } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate <-2*U,0,-10+4*U*.75> } object { grassblock translate <-U,0,-10+4*U*.75> } object { grassblock translate <0,0,-10+4*U*.75> } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate <-2*U,0,-10+5*U*.75> } object { grassblock translate <-U,0,-10+5*U*.75> } object { grassblock translate <0,0,-10+5*U*.75> } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate <-2*U,0,-10+6*U*.75> } object { grassblock translate <-U,0,-10+6*U*.75> } object { grassblock translate <0,0,-10+6*U*.75> } object { grassblock translate } object { grassblock translate } object { grassblock translate } object { grassblock translate } pigment { bozo turbulence 0.45 octaves 4 omega 0.7 lambda 1.4 color_map { [0.0 color rgb<.400,.496,.272> ] [0.0 color rgb<.400,.496,.272> ] [0.5 color rgb<.336,.528,.256> ] [0.5 color rgb<.336,.528,.256> ] } scale <10,2,10> } finish { ambient 0.14 diffuse 0.62 } } difference { //sphere { <0,-60000,0>,60000 } plane { y,0 } box { <-29,-5,-9>,<74,10,74> } pigment { bozo turbulence 0.45 octaves 4 omega 0.7 lambda 1.4 color_map { [0.0 color rgb<.400,.496,.272> ] [0.0 color rgb<.400,.496,.272> ] [0.5 color rgb<.336,.528,.256> ] [0.5 color rgb<.336,.528,.256> ] } scale <10,2,10> } normal { bumps 1.2 scale .07 } finish { diffuse .7 } } rotate -16*y } difference { union { box { <-5,-6,-10>,<59,2,0> } box { <-5,-8,-8>,<60,2,-2> } cylinder { <-5,-6,-8>,<59,-6,-8>,2 } cylinder { <-5,-6,-2>,<59,-6,-2>,2 } box { <-10,-6,-5>,<0,2,53> } box { <-8,-8,-5>,<-2,2,53> } cylinder { <-8,-6,-5>,<-8,-6,53>,2 } cylinder { <-2,-6,-5>,<-2,-6,53>,2 } box { <-5,-6,48>,<59,2,58> } box { <-5,-8,50>,<59,2,56> } cylinder { <-5,-6,50>,<59,-6,50>,2 } cylinder { <-5,-6,56>,<59,-6,56>,2 } box { <54,-6,-5>,<64,-6,53> } box { <56,-8,-5>,<62,-8,53> } cylinder { <56,-6,-5>,<56,-6,53>,2 } cylinder { <62,-6,-5>,<62,-6,53>,2 } cylinder { <-5,-8,-5>,<-5,2,-5>,3 } cylinder { <-5,-6,-5>,<-5,2,-5>,5 } torus { 3,2 translate <-5,-6,-5> } cylinder { <-5,-8,53>,<-5,2,53>,3 } cylinder { <-5,-6,53>,<-5,2,53>,5 } torus { 3,2 translate <-5,-6,53> } cylinder { <59,-8,-5>,<59,2,-5>,3 } cylinder { <59,-6,-5>,<59,2,-5>,5 } torus { 3,2 translate <59,-6,-5> } cylinder { <59,-8,53>,<59,2,53>,3 } cylinder { <59,-6,53>,<59,2,53>,5 } torus { 3,2 translate <59,-6,53> } box { <-5,-1,-11>,<59,2,-9> } box { <-11,-1,-5>,<-9,2,53> } box { <-5,-1,57>,<59,2,61> } box { <63,-1,-5>,<65,2,53> } cylinder { <-5,-1,-5>,<-5,2,-5>,6 } cylinder { <59,-1,-5>,<59,2,-5>,6 } cylinder { <-5,-1,53>,<-5,2,53>,6 } cylinder { <59,-1,53>,<59,2,53>,6 } box { <-5,-8,-5>,<59,2,53> } } intersection { torus { 6,1 translate <-5,-1,-5> } box { <-20,-20,-20>,<-5,10,-5> } } intersection { torus { 6,1 translate <59,-1,-5> } box { <100,-20,-20>,<59,10,-5> } } intersection { torus { 6,1 translate <-5,-1,53> } box { <-20,-20,100>,<-5,10,53> } } intersection { torus { 6,1 translate <59,-1,53> } box { <100,-20,100>,<59,10,53> } } cylinder { <-10,-1,-11>,<64,-1,-11>,1 } cylinder { <-11,-1,-10>,<-11,-1,58>,1 } cylinder { <-10,-1,59>,<64,-1,59>,1 } cylinder { <65,-1,-10>,<65,-1,58>,1 } pigment { bozo turbulence 0.45 octaves 4 omega 0.7 lambda 1.4 color_map { [0.0 color rgb<.400,.496,.272> ] [0.0 color rgb<.400,.496,.272> ] [0.5 color rgb<.336,.528,.256> ] [0.5 color rgb<.336,.528,.256> ] } scale <10,2,10> } normal { bumps 1.2 scale .07 } finish { ambient .09 diffuse .55 } rotate 34*y translate <22,0,86> } } #declare pos = 0; #while (pos < 55) object { man translate rotate -60*y } #declare pos=pos+1; #end union { union { object { chest texture { LegoBrown } } object { chestlid translate <0,1.4,1.8> texture { LegoBrown } } translate <1.7,.2,-.5> } union { object { torso texture { LegoWhite } translate 2*y } object { shirt texture { LegoWhite } texture { pigment { image_map { sys "st_bluecolonial.bmp" once } } scale <1.95,1.6,1> translate <-.975,0,0> finish { ambient .15 diffuse .9 } } translate 2*y } object { shoulderpads translate <0,3.6,.5> texture { LegoYellow } } object { beardhead translate <0,3.7,.5> } object { left_arm texture { LegoBlue } translate <0,3.2,0> } object { hand texture { LegoYellow } rotate <12.4,0,10.6> translate <1.3,1.7,0> } object { hand texture { LegoYellow } rotate <12.4,0,-10.6> translate <-1.3,1.7,0> } object { right_arm texture { LegoBlue } translate <0,3.2,0> } object { left_leg texture { LegoWhite } translate 1.45*y } object { right_leg texture { LegoWhite } translate -.5*z rotate 40*x translate <0,1.45,.5> } object { leg_joiner texture { LegoWhite } } } union { object { torso texture { LegoWhite } translate 2*y } object { shirt texture { LegoWhite } texture { pigment { image_map { sys "st_bluecolonial.bmp" once } } scale <1.95,1.6,1> translate <-.975,0,0> finish { ambient .15 diffuse .9 } } translate 2*y } object { shoulderpads translate <0,3.6,.5> texture { LegoYellow } } object { beardhead translate <0,3.7,.5> } object { left_arm texture { LegoBlue } translate <0,3.2,0> } object { hand texture { LegoYellow } rotate <12.4,0,10.6> translate <1.3,1.7,0> } object { hand texture { LegoYellow } rotate <12.4,0,-10.6> translate <-1.3,1.7,0> } object { right_arm texture { LegoBlue } translate <0,3.2,0> } object { left_leg texture { LegoWhite } translate 1.45*y } object { right_leg texture { LegoWhite } translate -.5*z rotate 40*x translate <0,1.45,.5> } object { leg_joiner texture { LegoWhite } } translate <7.4,0,0> } translate <4.3,0,6> rotate -60*y }