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

  1. // Generic Polyray input File
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. // Set up the camera
  5. viewpoint {
  6.    from <0, 0, -8>
  7.    at <0,0,0>
  8.    up <0,1,0>
  9.    angle 45
  10.    resolution 320, 160
  11.    aspect 2
  12.    }
  13.  
  14. background <0, 0, 0>
  15. light 0.7*white, <-15, 3, -20>
  16. light 0.7*white, < 15, 3, -20>
  17.  
  18. include "..\colors.inc"
  19. include "..\texture.inc"
  20.  
  21. // Simple color map texture
  22. define noise_texture0
  23. texture {
  24.    noise surface {
  25.       color white
  26.       position_fn position_plain
  27.       lookup_fn lookup_cos
  28.       normal bump_normal
  29.       turbulence 2
  30.       frequency 3
  31.       bump_scale 3
  32.       octaves 2
  33.       ambient 0.1
  34.       diffuse 0.5
  35.       specular 0.6
  36.       microfacet Reitz 10
  37.       color_map(
  38.          [0,   0.2, red,     orange]
  39.          [0.2, 0.3, orange,  blue]
  40.          [0.3, 0.5, blue,    skyblue]
  41.          [0.5, 0.7, skyblue, orange]
  42.          [0.7, 0.9, orange,  magenta]
  43.          [0.9, 1.0, magenta, red],
  44.          <1, 1, 1>)
  45.       }
  46.    scale <0.5, 0.5, 0.5>
  47.    }
  48.  
  49. define ripple_marble_texture
  50. texture {
  51.    noise surface {
  52.       color white
  53.       position_fn position_objectx
  54.       lookup_fn lookup_sawtooth
  55.       octaves 4
  56.       turbulence 3
  57.       normal ripple_normal
  58.       frequency 10
  59.       bump_scale 5
  60.       ambient 0.1
  61.       diffuse 0.5
  62.       specular 0.6
  63.       microfacet Reitz 10
  64.       color_map(
  65.          [0.0, 0.8, <1, 1, 1>, <0.6, 0.6, 0.6>]
  66.          [0.8, 1.0, <0.6, 0.6, 0.6>, <0.1, 0.1, 0.1>])
  67.       }
  68.    translate <-5, 0, 0>
  69.    }
  70.  
  71. object { sphere <0, 0, 0>, 2
  72.    noise_texture0
  73.    translate <-3, 0, 0>
  74.    }
  75. object { sphere <0, 0, 0>, 2
  76.    ripple_marble_texture
  77.    translate <3, 0, 0>
  78.    }
  79.