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

  1. /*************************************************************************
  2.  CITY GENERATOR VEHICLE OBJECTS 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 (city_default_objects) #include "DEFAULT.OBJ" #end
  13.  
  14. // VEHICLE OPTIONS
  15.    #ifndef (city_right_hand_drive) #local city_right_hand_drive = false; #end
  16.  
  17. // VEHICLE COMPONENTS
  18. // NB: Vehicles should travel along +z axis (LH drive), or -z axis (RH drive)
  19.    #local Tires = union {
  20.       sphere {y, 1 scale <.2, .3, .3> translate -x}
  21.       sphere {y, 1 scale <.2, .3, .3> translate x}
  22.       pigment {rgb .1}}
  23.  
  24.    #local HeadLights = union {
  25.       sphere {<-.6, .7, 0>, .15 scale <1, 1, .3>} sphere {<.6, .7, 0>, .15 scale <1, 1, .3>}
  26.       #if (city_night) union {
  27.          spotlight_cone (<-.6, 0, 0>, .1, <-.6, -.7, 0>, 1, rgbt <1.5, 1.4, 1.2, .8>, 1)
  28.          spotlight_cone (<.6, 0, 0>, .1, <.6, -.7, 0>, 1, rgbt <1.5, 1.4, 1.2, .8>, 1)
  29.          matrix <1, 0, 0, 0, 1, -5, 0, 0, 1, 0, .7, -.1>}
  30.          finish {ambient 1.3}
  31.       #end
  32.       pigment {rgb <1, 1, .9>}}
  33.  
  34.    #local BrakeLights = union {sphere {<-.5, .7, 0>, .15} sphere {<.5, .7, 0>, .15}
  35.       pigment {rgb <1, .3, .2>} scale <1, 1, .3>
  36.       #if (city_night) finish {ambient 1.3} #end }
  37.  
  38.    #local Car = union {
  39.       superellipsoid {<.4, .5> scale <1, .5, 2> translate y*.6}
  40.       superellipsoid {<.5, .7> scale <.8, .5, 1.1> translate y*1.3}
  41.       object {Tires translate z*1.2} object {Tires translate -z*1.2}
  42.       object {HeadLights translate z*2} object {BrakeLights translate -z * 2}
  43.       #if (city_right_hand_drive) rotate y*180 #end
  44.       finish {phong .6 phong_size 20 metallic}}
  45.  
  46.    #local Bus = union {
  47.       superellipsoid {<.2, .3> scale <1.2, 1.3, 2.7> translate <0, 1.6, -.3>}
  48.       superellipsoid {<.5, .6> scale <1.1, .7, .7> translate <0, 1, 2.3>}
  49.       object {Tires scale 1.2 translate z*2} object {Tires scale 1.2 translate -z*2}
  50.       object {HeadLights scale 1.2 translate z*2.95} object {BrakeLights scale 1.2 translate -z * 2.95}
  51.       #if (city_right_hand_drive) rotate y*180 #end
  52.       pigment {gradient y color_map {[.6 rgb <.8, .6, .2>] [.6 rgb .2]} scale 1.5 translate y*.8}
  53.       finish {phong .3 phong_size 15 metallic}}
  54.  
  55. // OBJECT ARRAYS FOR CITY.MCR
  56.    #declare city_vehicle = array[6] {
  57.       object {Car pigment {rgb .9}},
  58.       object {Car scale 1.1 pigment {rgb <0, .4, .2>}},
  59.       object {Car scale .8 pigment {rgb <1, .9, .3>}},
  60.       object {Car scale <1, .7, 1> pigment {rgb <.8, .1, .2>}},
  61.       object {Car scale <1.1, 1, 1.3> pigment {rgb .25}}
  62.       object {Bus}}
  63.  
  64.    #declare city_vehicle_spacing = array[6] {4.5, 4.5, 4, 4.5, 6, 7}
  65.