home *** CD-ROM | disk | FTP | other *** search
/ Freelog 34 / Freelog034.iso / Graphisme3D / City / HOTELS.OBJ < prev    next >
Encoding:
Text File  |  1999-02-01  |  5.8 KB  |  101 lines

  1. /*************************************************************************
  2.  CITY GENERATOR HOTEL BUILDINGS FILE FOR PERSISTENCE OF VISION 3.x
  3.  
  4.  Created by Chris Colefax, 1 February 1999
  5.  NOTE: This file is designed for use with City.mcr and City.inc
  6.        To use, include the file before including City.inc, with any other
  7.        object/building files you want to use.
  8.  
  9. **************************************************************************/
  10.  
  11. // INCLUDE DEFAULT OBJECTS FILE IF REQUIRED
  12.    #ifndef (building_size) #include "DEFAULT.OBJ" #end
  13.  
  14. // COMMON TEXTURES AND FINISHES
  15.    #local FMetal = finish {specular .2 roughness .1 metallic brilliance 10}
  16.    #local FGlass = finish {specular .5 roughness .05 reflection .4}
  17.  
  18. // HOTEL #1 (White marble)
  19.    #declare building_size[building_types] = <30, 5, 30>;
  20.    #declare building_options[building_types] = build_texture + build_base + build_profile + build_details + build_roof + build_window_profile;
  21.    #declare building_texture[building_types] = texture {
  22.       pigment {wrinkles color_map {[.45 rgb .9] [.5 rgb .8] [.55 rgb .9]} scale 4}
  23.       normal {bumps .2 scale .05}
  24.       finish {phong .1 phong_size 3}}
  25.    #local Column = cylinder {0, y * 5, .5 texture {building_texture[building_types]
  26.       normal {radial bump_size -.5 scallop_wave frequency 9}}}
  27.    #declare building_profile[building_types] = union {
  28.       object {Column translate <-12, 0, -8>} object {Column translate <-4, 0, -8>}
  29.       object {Column translate <4, 0, -8>} object {Column translate <12, 0, -8>}}
  30.    #declare building_base[building_types] = union {
  31.       box {<-14.5, 0, -7>, <14.5, 5, 14.5>}
  32.       #local C = 0; #while (C <= 1)
  33.          box {<-15, C*3, -15+(C*5)>, <15, (C+.1)*3, 15>}
  34.       #local C = C + .1; #end }
  35.    #local WindowCutout = union {box {<-.8, 1.8, -7.1>, <.8, 3.5, 14.6>}
  36.       cylinder {<0, 3.3, -7.1>, <0, 3.3, 14.6>, .8}}
  37.    #declare building_details[building_types] = union {
  38.       box {<-15, 4.6, -9>, <15, 5, 15>}
  39.       difference {box {<-14.5, 0, -7>, <14.5, 5, 14.5>}
  40.       #local C = -10; #while (C <= 10)
  41.          object {WindowCutout translate x * C}
  42.       #local C = C + 4; #end }}
  43.    #declare building_windows[building_types] = box {<-14.4, 0, -6.8>, <14.4, 4.99, 14.3>}
  44.    set_window_texture (
  45.       texture {pigment {rgb <0, 0, .1>} finish {FGlass}},
  46.       texture {pigment {rgb <1, 1, .8>} finish {FGlass ambient 1}},
  47.       <4, 5, 0>)
  48.    #declare building_roof[building_types] = union {
  49.       box {<-15, 0, -8>, <15, 1.5, -7>}
  50.       cylinder {<0, -6, -8>, <0, -6, -7>, 11 clipped_by {box {<-15, 1.5, -8.1>, <15, 5, -6.9>}}}}
  51.    #declare building_types = building_types + 1;
  52.  
  53. // HOTEL #2 (Tan stucco)
  54.    #declare building_size[building_types] = <100, 20, 100>;
  55.    #declare building_options[building_types] = build_texture + build_profile + build_window_profile + build_base + build_roof;
  56.    #declare building_texture[building_types] = texture {
  57.       pigment {rgb <.7, .65, .5>}
  58.       normal {granite -.8 scallop_wave scale <100, 50, 100>}}
  59.    #declare building_profile[building_types] = union {
  60.       box {<-45, 0, -35>, <45, 20, 45>}
  61.       cylinder {<-45, 0, -35>, <-45, 20, -35>, 4} cylinder {<45, 0, -35>, <45, 20, -35>, 4}
  62.       cylinder {<-45, 0, 45>, <-45, 20, 45>, 4} cylinder {<45, 0, 45>, <45, 20, 45>, 4}
  63.       cylinder {<0, 0, -35>, <0, 20, -35>, 8 scale <4, 1, 1>}}
  64.    #declare building_windows[building_types] = union {
  65.       box {<-45.01, 0, -35.01>, <45.01, 20, 45.01>}
  66.       cylinder {<0, 0, -35>, <0, 20, -35>, 8.01 scale <4, 1, 1>}}
  67.    #local Glass = texture {normal {bumps .01 scale .001} finish {FGlass reflection <.6, .7, .5>}}
  68.    #declare  building_window_texture[building_types] = texture {
  69.       gradient y texture_map {
  70.       [.6 pigment {rgbt 1}] [.6 window_texture (
  71.          texture {Glass pigment {rgb 0}},
  72.          texture {Glass pigment {rgb <.65, .7, .6>} finish {ambient 1}},
  73.          <.2, 1, .2>)]}
  74.       scale 20 translate -y*4}
  75.    #declare building_window_size[building_types] = <4, 0, 4>;
  76.    #local LightFitting = union {cylinder {<0, 18, -5>, <0, 18, 0>, .3}
  77.       sphere {0, .6 scale <1, .5, 1> translate <0, 18, -5>}
  78.       #if (city_night) spotlight_cone (<0, 18, -5>, .3, <0, 0, -5>, 7, rgbt <1.3, 1.2, 1, .8>, 3) #end
  79.       pigment {rgb .1}}
  80.    #declare building_base[building_types] = union {
  81.       cylinder {<0, 18, -60>, <0, 18, -42>, 7 clipped_by {box {<-7, 18, -61>, <7, 25, -42>}}
  82.          pigment {rgb <.1, .35, 0>} normal {gradient z bump_size .2 scallop_wave scale 3}}
  83.       cylinder {<-6.5, 0, -59.5>, <-6.5, 18, -59.5>, .5 pigment {rgb .1}}
  84.       cylinder {<6.5, 0, -59.5>, <6.5, 18, -59.5>, .5 pigment {rgb .1}}
  85.       object {LightFitting translate <-36, 0, -35>} object {LightFitting translate <36, 0, -35>}
  86.       object {LightFitting rotate y * 45 translate <-7, 0, -60>} object {LightFitting rotate y * -45 translate <7, 0, -60>}}
  87.    #local RoundRoof = union {torus {4, 1.5}
  88.       cylinder {<0, 10, 0>, <0, 11.5, 0>, 4} torus {4, 1.5 translate y*10}}
  89.    #declare building_roof[building_types] = union {
  90.       union {
  91.          torus {8, 1.5 scale <3.53, 1, 1> translate <0, 0, -35>}
  92.          cylinder {<-45, 0, -35>, <45, 0, -35>, 1.5} cylinder {<-45, 0, 45>, <45, 0, 45>, 1.5}
  93.          cylinder {<-45, 0, -35>, <-45, 0, 45>, 1.5} cylinder {<45, 0, -35>, <45, 0, 45>, 1.5}
  94.          object {RoundRoof translate <-45, 0, -35>} object {RoundRoof translate <45, 0, -35>} 
  95.          object {RoundRoof translate <-45, 0, 45>} object {RoundRoof translate <45, 0, 45>} 
  96.          object {building_profile[building_types] scale <1, 1.5/20, 1>}
  97.          texture {building_texture[building_types] pigment {rgb <.5, .4, .3>}}}
  98.       cylinder {0, y*10, 4 translate <-45, 0, -35>} cylinder {0, y*10, 4 translate <45, 0, -35>}
  99.       cylinder {0, y*10, 4 translate <-45, 0, 45>} cylinder {0, y*10, 4 translate <45, 0, 45>}}
  100.    #declare building_types = building_types + 1;
  101.