home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polyray / dat / texture / bmpsph.pi < prev    next >
Text File  |  1994-12-31  |  1KB  |  56 lines

  1. //
  2. // Example of bump mapping on a sphere
  3. //
  4. // Generic Polyray input File
  5. // Polyray input file: Alexander Enzmann
  6.  
  7. // Set up the camera
  8. viewpoint {
  9.    from <0,5,-10>
  10.    at <0,0,0>
  11.    up <0,1,0>
  12.    angle 45
  13.    resolution 256, 256
  14.    }
  15.  
  16. background <0, 0, 0>
  17. spot_light 0.7*white, <-10, 20, -20>, <0, 0, 2>, 1, 15, 20
  18. spot_light 0.7*white, <-10, 10, 10>, <0, 0, 0>, 1, 15, 20
  19.  
  20. define tile_bumps image("tile1.jpg")
  21.  
  22. define bumpmap_red1
  23. texture {
  24.    special surface {
  25.       color red
  26.       normal planar_bumpmap(tile_bumps, <8*u, 0, 8*v>, 3)
  27.       ambient 0.1
  28.       diffuse 0.7
  29.       specular white, 0.5
  30.       microfacet Cook 5
  31.       }
  32.    }
  33.  
  34. define bumpmap_red2
  35. texture {
  36.    special surface {
  37.       color red
  38.       normal planar_bumpmap(tile_bumps, P, 3)
  39.       ambient 0.1
  40.       diffuse 0.7
  41.       specular white, 0.5
  42.       microfacet Cook 5
  43.       }
  44.    }
  45.  
  46. object {
  47.      object { torus 2, 0.75, <0, -1.25, 0>, <0, 1, 0> }
  48.    + object { cone <0, -2, 0>, 1, <0, 3, 0>, 0 }
  49.    + object { sphere <2, 0, 4>, 2 }
  50.    bumpmap_red1
  51.    }
  52. object {
  53.    disc <0,-2, 0>, <0, 1, 0>, 30
  54.    bumpmap_red2 { scale <2, 2, 2> }
  55.    }
  56.