home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5350 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1.5 KB

  1. Path: sparky!uunet!ogicse!reed!lydgate
  2. From: lydgate@reed.edu (Chris Lydgate)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Renderman surface mapping problem
  5. Message-ID: <1992Jul30.084334.9893@reed.edu>
  6. Date: 30 Jul 92 08:43:34 GMT
  7. Article-I.D.: reed.1992Jul30.084334.9893
  8. Organization: Reed College, Portland, OR
  9. Lines: 37
  10.  
  11.  
  12. Help!
  13.  
  14. I've been soundly defeated in my effort to do surface mapping in the
  15. 3DKit.  The Renderman Companion (TRC) says this is done by using a
  16. surface shader. But the shaders in /NextLibrary/Shaders which look
  17. like candidates, ie "texmap.slo", I can't get them to work.
  18.  
  19. In general, I can successfully tell an N3DShader to read a .slo file,  
  20. set its instance variables, and then associate that shader with an  
  21. N3DShape.  For many shaders, this works perfectly.
  22.  
  23. The "texmap.slo" shader has a "texturemap" i-var, which (I guess) is  
  24. supposed to be set to a texture file.  However, setting this i-var  
  25. never seems to 
  26. /NextLibrary/Textures..
  27.  
  28. TRC (p 253) lists a fragment for doing what I want (mapping an 
  29. image file onto a surface) but it makes use of an imaginary shader 
  30. called "mytexture".  It says that such shaders 
  31. are easy to write, but  does not say how.  
  32.  
  33. Basically, I'm wondering:
  34.  
  35. 1) How do I map a texture file onto a surface using the 3DKit?
  36.  
  37. 2) If there's no standard shader for doing this, how could I write
  38. one?
  39.  
  40. 3) How can I create a texture file from, say, a TIFF file?  (I know
  41. about RiMakeTexture(), but the documentation is vague about file 
  42. formats.)
  43.  
  44. Thanks in advance,
  45.  
  46. Chris Lydgate
  47. chris@insight.com
  48.