home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3.4.17 [SPARC, PA-RISC] / nextstep33_risc.iso / NextLibrary / Shaders / ReadMe < prev    next >
Text File  |  1991-06-21  |  7KB  |  166 lines

  1. SHADERS IN THIS DIRECTORY:
  2. =========================
  3. There are two categories of shaders here: the shaders required by
  4. the RenderMan Interface and some extra shaders created by Pixar 
  5. as examples of how to write shaders and the different ways in which
  6. they can be used. The extra shaders are light, displacement, and surface
  7. shaders.
  8.  
  9. Default Shaders
  10. ---------------
  11. These are the shaders required by and described in the RenderMan Interface
  12. Specification. They are:
  13. ambientlight.sl
  14. bumpy.sl
  15. constant.sl
  16. defaultlight.sl
  17. defaultsurface.sl
  18. depthcue.sl
  19. distantlight.sl
  20. fog.sl
  21. matte.sl
  22. metal.sl
  23. null.sl
  24. paintedplastic.sl
  25. plastic.sl
  26. pointlight.sl
  27. shinymetal.sl
  28. spotlight.sl
  29.  
  30. Light Shaders
  31. -------------
  32. pointnofalloff.sl
  33.     This light is just a point light source with no inverse square falloff.
  34.     It is useful for placing inside a scene and lighting objects
  35.     uniformly, without the "pools" produced by normal point lights,
  36.     or for placing at a great distance to simulate distant lights in
  37.     systems that don't have distant lights.  In addition, when using
  38.     point lights you normally have to set the magnitude quite large
  39.     to produce the right intensity at the distance you want, and this
  40.     light does not have that problem.
  41. shadowdistant.sl
  42.     This is just a distant light that uses a shadow map if it is passed
  43.     in shadowname.
  44. shadowpoint.sl
  45.     This is a spotlight that uses a shadow map if it is passed
  46.     in shadowname.
  47. shadowspot.sl
  48.     This is a point light that uses shadow maps.  Because a point light
  49.     casts shadows in all directions, in the general case this shader
  50.     takes 6 cube face shadow maps, sfpx, sfnx, sfpy, sfny, sfpz, sfnz,
  51.     corresponding to the positive and negative x, y, and z directions
  52.     respectively.  If any of these are not passed, the light will appear
  53.     as a normal point light in that direction.
  54.  
  55. Displacement Shaders
  56. --------------------
  57. General note: DON'T FORGET to set the displacement bound attribute when using
  58. any displacement shader!
  59.  
  60. cloth.sl
  61.     This produces a perpendicular weave cloth-like pattern.  It should
  62.     be very high frequency with a fairly small displacement.  It aliases
  63.     pretty badly, but this has the interesting effect of making it look
  64.     all the more like real cloth.
  65. diaknurl.sl
  66.     This produces a diamond knurl pattern like that often seen on knurled
  67.     screws, tool grips, etc.  Does a cylindrical projection so that
  68.     this will work on "fake" cylinders made of many polygons. Will look
  69.     better on real cylinders, however.  Note that the radius of the
  70.     cylinder must be set correctly for the diamonds to be diamond-shaped.
  71.     The projection mapping defaults to axis along z-axis, so the
  72.     easiest way to deal with it is to put it on cylinders
  73.     with this orientation (i.e. cylinder azis along z),
  74.     THEN rotate everything together.  Or, you can specify an
  75.     origin and 3 points which define a coordinate system relative
  76.     to this origin.  This projection is done in SHADER space for
  77.     consistency, although this means that the shader will have to
  78.     be instanced (with RiDisplacement) separately for all objects to
  79.     which it applies.
  80. sinknurl.sl
  81.     This produces a "wave" pattern parallel to the axis of a cylinder.
  82.     Uses a projection like diaknurl.  This can be used to produce
  83.     linear knurled patterns (which are in reality shaped like V's and
  84.     not sine waves) if the frequency is high, or nice Grecian columns
  85.     if the frequency is lower.
  86. threads.sl
  87.     This produces V-shaped threads projected onto a cylinder like the
  88.     knurl shaders.
  89.     For interior threads, use CSG operations to cut a threaded
  90.     cylinder out of an object (a block of metal, say, to make a
  91.     square nut).  To do this (the CSG), however, the shadingrate
  92.     has to be pretty low for the cylinder - like 0.25 or
  93.     lower. Sometimes this is even necessary for normal exterior threads.
  94.  
  95.  
  96.  
  97. Surface Shaders
  98. ---------------
  99.  
  100. carpet.sl
  101.     This produces a speckly carpet with a turbulent scuff-mark pattern.
  102.     It has controllable nap and "scuffiness", and can successfully
  103.     anti-alias itself most of the time.
  104. cmarble.sl
  105.     This produces a marble similar to rmarble, but it uses Ci (the color
  106.     set in the RIB file) for the vein color.
  107. glass.sl
  108.     This is a transparent glass with an environment map.  No refraction
  109.     is attempted.  Works well for clear glass and colored glass -
  110.     just set Cs (clear = 1,1,1).  The environment map's reflective
  111.     intensity can be controlled to fine-tune the appearance.
  112.     Can be used without an environment map, but doesn't look very good.
  113. glassbal.sl
  114.     This simulates a solid glass sphere, i.e. refracts everything
  115.     upside down and backwards.  This looks good on spheres and other
  116.     curvy objects like teapots.  Will work for any color glass, but
  117.     will not work without an environment map.
  118. maps.sl
  119.     These are projection map functions used by the knurl and threads
  120.     displacement shaders and by texmap.  There is a planar, cylindrical,
  121.     spherical, and "auto-planar" map (planemap, cylinmap, sphermap, and 
  122.     automap respectively) and a wrapping function decalmap that can call
  123.     any of the these to get projection parameters uu and vv (which simulate
  124.     u and v for parametric surfaces), and then use uu and vv with a set
  125.     of "textcoords" s1,t1,s2,t2,... (just like RenderMan parametric
  126.     surfaces) to calculate simulated texture coordinates s and t.
  127.     After this calculation decalmap will pass back
  128.     an ss and tt simulating s and t as if the surface were parametrically
  129.     defined as a plane, cylinder, or sphere.
  130.     This is very useful for putting texture maps on surfaces modeled with
  131.     lots of little polygons, for example, which do not parameterize
  132.     well.
  133.     The "auto-planar" projection does a planar projection using the
  134.     surface normal as the plane normal.  This looks good on faceted
  135.     surfaces (like rooms or tables), but is somewhat hard to control
  136.     precisely.
  137. rmarble.sl
  138.     Another marble (other than the blue_marble found in the RenderMan
  139.     Companion) with red veins and less abrupt color transitions.  Looks
  140.     quite good.  The colors can be changed easily by editing the
  141.     shader and changing the colors in the color spline.
  142. rsmetal.sl
  143.     A metal shader that uses random noise to simulate a reflection map.
  144.     Looks suprisingly good for complex surfaces.  
  145. spatter.sl
  146.     Makes a surface look painted a background color with another color
  147.     paint spattered on it.  Does a very good job making that blue
  148.     camp cookware with white paint spatters.
  149. stippled.sl
  150.     A bumpy textured surface, like computer-console plastic, a plaster
  151.     wall, a camera surface, etc.  Does a pretty good job of anti-aliasing
  152.     itself.
  153. stone.sl
  154.     A speckly stone surface.  Shades at various intensity levels
  155.     (a discrete number controlled by a parameter) between two
  156.     colors also controlled by parameters.  Grey looks good with
  157.     about 6 intensity levels - looks like granite.
  158. texmap.sl
  159.     Puts texture maps onto surfaces using the projection map functions
  160.     in maps.sl. Can be given a specular coefficient and a specular color,
  161.     which makes a surface look nice and shiny with a photo painted onto
  162.     it.
  163. wood.sl
  164.     Wood shader which allows any shade, with controllable grain and
  165.     texture.  Looks quite good.
  166.