home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / next / programm / 7748 < prev    next >
Encoding:
Text File  |  1992-12-14  |  3.1 KB  |  88 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!enterpoop.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!shanega
  3. From: shanega@athena.mit.edu (Shane G. Artis)
  4. Subject: Re: _very_ basic RenderMan question
  5. Message-ID: <1992Dec15.033437.7339@athena.mit.edu>
  6. Keywords: renderman
  7. Sender: news@athena.mit.edu (News system)
  8. Nntp-Posting-Host: e40-008-10.mit.edu
  9. Organization: Massachusetts Institute of Technology
  10. References: <92346.164214U54876@uicvm.uic.edu> <1992Dec13.110209.5345@lilliput.fdn.org>
  11. Date: Tue, 15 Dec 1992 03:34:37 GMT
  12. Lines: 74
  13.  
  14. In article <1992Dec13.110209.5345@lilliput.fdn.org> joseph@lilliput.fdn.org (Joseph Goldstone) writes:
  15. ><U54876@uicvm.uic.edu> writes
  16. >> Hello -
  17. >> 
  18. >>   To all you experienced NeXT programmers out there, a very basic question
  19. >> about RenderMan from someone who has just started programming.
  20. >>   I have copied, verbatim, the "minimal program using RenderMan" from page 18
  21. >> of The RenderMan Companion, saved it as test.c, and tried to compile it  
  22. >using:
  23. >> cc -lMedia_s test.c -o test
  24. >> 
  25. >> I get:
  26. >> 
  27. >> /bin/ld: Undefined symbols:
  28. >> _RiBegin
  29. >> _RiWorldBegin
  30. >> _RiSurface
  31. >> _RI_P
  32. >> _RiPolygon
  33. >> _RiWorldEnd
  34. >> _RiEnd
  35. >> 
  36. >...
  37. >
  38. >You can't get there from here.
  39. >
  40. >To compile the programs in the Companion you would need to be able to either  
  41. >directly link in the renderer, or link in the RIB client library routines that  
  42. >emit the RIB eaten by the renderer (which in this case is the renderer in  
  43. >/usr/prman/prman)..
  44.  
  45. <edited>
  46.  
  47. Actually, I disagree, up to a point.  I have successfully written and
  48. compiled and executed most of the basic examples in The RenderMan
  49. Companion.  The functions RiBegin(), RiSurface(), etc. exist quite
  50. nicely in libMedia_s.a, and /usr/include/3DKit/ri.h handles things
  51. quite nicely.  I think this person's basic problem is that to compile
  52. you need to use the command:
  53.  
  54.     cc -g -O RIfile.c -o RIfile -lMedia_s -lNeXT_s
  55.  
  56. i.e. the libraries need to be at the END of the command line.  The
  57. developers RenderMan is probably basically the same as the NeXT
  58. version, but better documented, more tutorials, a linkable renderer
  59. (for adding new capabilities, like trace(), and a RIB library).  Note
  60. that the big feature here is the linkable renderer.
  61.  
  62. I think NeXT doesn't want to support the standard Ri() commands
  63. themselves, at the expense of their nice Objective-C environment, but
  64. they still work just fine if you want to use them.
  65.  
  66. This reasoning may break down when using more sophisticated examples
  67. that I haven't tried yet, but so far I've been able to link in every
  68. Ri function that I've needed to use, and that includes some pretty
  69. sophisticated ones.
  70.  
  71. By the way, I haven't yet gotten one of the standard RenderMan programs
  72. from the RenderMan Companion to output the picture to the screen - that 
  73. process is not documented.  What I do is add lines like :
  74.  
  75.         RiBegin(RI_NULL, RI_RENDERER, &archive,
  76.                  RI_FILEPATH, &outputfile, RI_NULL);
  77.         RiOption(RI_ARCHIVE, "outputversion", &v31, RI_NULL);
  78.         RiDisplay("/me/Renderman/src/foo.tiff",RI_FILE,RI_RGBA,RI_NULL);
  79.  
  80. to my file.  This dumps the rest of the file to a .RIB file, which I
  81. then pass to prman.
  82.  
  83. Regards,
  84.  
  85. Shane
  86.  
  87.  
  88.