home *** CD-ROM | disk | FTP | other *** search
/ PC Graphics Unleashed / PC Graphics Unleashed.iso / ch17 / pi / roomfly / room.inc < prev    next >
Encoding:
Text File  |  1994-08-05  |  1.2 KB  |  57 lines

  1. // Polyray include file: ROOM1.INC
  2. // by Rob McGregor
  3. //
  4. // A basic room with two walls and a floor...
  5.  
  6.  
  7. // Create the wooden wall texture (could use Polyray's "wooden")
  8. static define WALL_TEXTURE planar_imagemap(image("Your image file here..."), P, 10)
  9. static define wood1
  10. texture {
  11.   special surface { color WALL_TEXTURE }
  12.   scale <0.25, 0.25, 0.25>
  13. }
  14.  
  15. // Create the floor texture (could use checkers)
  16. static define FLOOR_TEXTURE planar_imagemap(image("Your image file here..."), P, 100)
  17. static define tiles 
  18. texture {
  19.   special surface {
  20.     color FLOOR_TEXTURE  // wood
  21.     ambient    0.4
  22.     diffuse    0.4
  23.     specular   0.5
  24.     reflection 0.7
  25.   }
  26.   scale <0.4, 1, 0.4>
  27. }
  28.  
  29. static define room2
  30. object {
  31.   object {
  32.     // (Floor)
  33.     polygon 4, <-1 , 0, 1>, <-1, 0, -1>, <1, 0, -1>, <1, 0, 1>
  34.     scale <10, 1, 10>
  35.     translate <0, -2.5, 0>
  36.     tiles
  37.   }
  38. +
  39.   object {
  40.     // (Left Wall)
  41.     polygon 4, <0, -1, 1>, <0, 1, 1>, <0, 1, -1>, <0, -1, -1>
  42.     scale <1, 10, 10>
  43.     translate <-10, 5, 0>
  44.     wood1
  45.   }
  46. +
  47.   object {
  48.     // (Back Wall)
  49.     polygon 4, <-1, 1, 0>, <1, 1, 0>, <1, -1, 0>, <-1 ,-1, 0>
  50.     scale <10, 10, 1>
  51.     translate <0, 5, 10>
  52.     wood1
  53.   }
  54. }
  55.  
  56.  
  57.