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

  1. /*************************************************************************
  2.  CITY GENERATOR APARTMENT 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.    #local Concrete = texture {pigment {rgb .5} normal {granite .2 scale .1}}
  18.  
  19. // APARTMENT BLOCK #1 (Brown concrete)
  20.    #declare building_size[building_types] = <200, 50, 200>;
  21.    #declare building_options[building_types] = build_texture + build_profile + build_window_levels + build_details + build_base + build_roof;
  22.    #declare building_texture[building_types] = texture {
  23.       pigment {wrinkles color_map {[0 rgb <.7, .6, .4>] [1 rgb <.6, .4, .3>]} scale <80, 50, 80>}
  24.       normal {wrinkles .3 scale .2}}
  25.    #declare building_profile[building_types] = box {<-15, 0, -100>, <15, 50, 100>}
  26.    #declare building_windows[building_types] = box {<-99, 0, -87>, <99, 50, 87>}
  27.    #declare building_window_texture[building_types] = texture {window_texture (
  28.       texture {pigment {rgb 0} finish {FGlass}},
  29.       texture {pigment {rgb <1, .9, .5>} finish {ambient 1}},
  30.       <15, 50, 0>) translate x * 25}
  31.    #declare building_window_size[building_types] = <15, 50, 0>;
  32.    #declare building_details[building_types] = difference {box {<-100, 0, -90>, <100, 50, 90>}
  33.       #local X = 30; #while (X <= 90)
  34.          box {<X - 5, 20, -91>, <X + 5, 40, 91>} box {<5 - X, 20, -91>, <-5 - X, 40, 91>}
  35.       #local X = X + 15; #end }
  36.    #declare building_base[building_types] = union {
  37.       object {building_details[building_types]}
  38.       box {<-10, 0, -101>, <10, 40, 101> pigment {rgb .4} finish {FMetal}}}
  39.    #local AirVent = union {cylinder {<0, 0, 0>, <0, 25, 0>, 5} sphere {<0, 25, 0>, 6 scale <1.5, 1, 1.5>}
  40.       pigment {rgb .4} finish {specular .4 metallic}}
  41.    #declare building_roof[building_types] = union {
  42.       difference {box {<-102, 0, -102>, <102, 10, 102>} box {<-99, 5, -99>, <99, 11, 99>}
  43.          pigment {rgb .6} normal {wrinkles .4 scale .2}}
  44.       object {AirVent translate <-60, 5, -60>} object {AirVent translate <60, 5, -60>}
  45.       object {AirVent translate <60, 5, 60>} object {AirVent translate <-60, 5, 60>}}
  46.    #declare building_types = building_types + 1;
  47.  
  48. // APARTMENT BLOCK #2 (Red brick)
  49.    #declare building_options[building_types] = build_fit_texture + build_profile + build_window_levels + build_details + build_base + build_roof;
  50.    #declare building_size[building_types] = <20, 5, 20>;
  51.    #declare building_texture[building_types] = texture {
  52.       pigment {brick rgb .5, rgb <.6, .35, .15> brick_size <1, .5, 1> mortar .05}
  53.       normal {agate .1 scale .1}}
  54.    #declare building_profile[building_types] = difference {
  55.       box {<-10, 0, -10>, <10, 5, 10>}
  56.       box {<-6, -.1, -10.1>, <6, 5.1, 0>}}
  57.    #declare building_windows[building_types] = difference {
  58.       box {<-10.01, 2, -10.01>, <10.01, 4.2, 10.01>}
  59.       box {<-5.99, 1.9, -10.1>, <5.99, 4.3, -.01>}}
  60.    #declare building_window_texture[building_types] = texture {brick
  61.       texture {pigment {rgbt 1}},
  62.       texture {window_texture (
  63.          texture {pigment {rgb .1} finish {FGlass reflection .2}},
  64.          texture {pigment {rgb .8} finish {FGlass ambient 1}},
  65.          <1.5, 0, 1.5>) translate <-.25, 0, .25>}
  66.       brick_size <1.5, 5, 1.5> mortar .5 translate <1, 0, .25>}
  67.    #declare building_window_size[building_types] = <1.5, 0, 1.5>;
  68.    #declare building_details[building_types] = union {box {<-6, 0, -2>, <6, .2, 0>} box {<-6, .2, -1.8>, <6, 1.5, -1.6>}
  69.       texture {Concrete}}
  70.    #declare building_base[building_types] = union {
  71.       box {<-6, 0, -9.8>, <6, .01, 0>
  72.          pigment {wrinkles color_map {[.4 rgb <.4, .3, .1>] [.7 rgb <.4, .4, .2>]} scale 4}
  73.          normal {bumps .4 scale .1}}
  74.       box {<-6, 0, -9.8>, <-1, 3, -9.5>} box {<1, 0, -9.8>, <6, 3, -9.5>}}
  75.    #local AirVent = union {box {<-3, 0, -2>, <3, 2, 2>}
  76.       cylinder {<-2, 2, 0>, <-2, 10, 0>, .5 open} cylinder {<2, 2, 0>, <2, 6, 0>, .8 open}
  77.       pigment {rgb .4} normal {dents .4} scale .5}
  78.    #declare building_roof[building_types] = union {
  79.       difference {box {<-10.2, 0, -10.2>, <10.2, .5, 10.2>} box {<-5.8, -.1, -10.3>, <5.8, .6, -.2>}
  80.          texture {Concrete}}
  81.       object {AirVent translate <-6, .5, 6>} object {AirVent rotate -y*90 translate <8, .5, -6>}}
  82.    #declare building_types = building_types + 1;
  83.