home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2213 / README < prev    next >
Encoding:
Text File  |  1990-12-28  |  4.9 KB  |  150 lines

  1.  
  2.                       prt: A parallel raytracer.
  3.                    Copyright (C) 1990, Kory Hamzeh
  4.  
  5. INTRODUCTION
  6.  
  7. This is the first release of prt, and for that very reason, it's version 1.0. 
  8.  
  9. Prt is a parallel raytracer I wrote which will run across machines that 
  10. are networked together via TCP/IP. Prt consists of two programs:
  11.  
  12.     - prt: the front end system
  13.     - rt: the raytracing engine.
  14.  
  15. Prt requires the name of the input file, output image file name, and a list
  16. of hosts which will run rt. It then uses rsh to start rt on the given hosts.
  17. Rt reads the input file from its standard in and pipes the image back to
  18. prt on its standard out. Prt also monitors the standard error stream for
  19. error/diagnostics from rt.
  20.  
  21. Using rsh might not be the most efficient way to run parallel processes, but
  22. it's simple and very portable. I've run prt on up to 5 Sun SPARCstations and
  23. have gotten excellent performance. The speed improvement is very close to
  24. linear as the number of hosts increase.
  25.  
  26. In this archive set, there is a file named FORMAT which contains the prt
  27. input database format. Please read it.
  28.  
  29. I have also included two example input files: example1.dat and example2.dat.
  30. I have many more available. Contact me if you are interested.
  31.  
  32.  
  33. BUILDING PRT
  34.  
  35. To build prt, make sure you have unshared all of the shar files. Then type:
  36.  
  37.     make prt
  38.  
  39. It should require very little or no change on most BSD systems. Prt uses
  40. the select system call, so make sure your system supports it (all BSD and
  41. most System V systems now have a select system call).
  42.  
  43. Next, you need to build rt on all of the hosts which you plan to use. Copy
  44. the files on all of the hosts you want to use, and type:
  45.  
  46.     make rt
  47.  
  48. I have also written a program called nffconv which converts input
  49. databases in NFF format to a prt format. To build nffconv, type:
  50.  
  51.     make nffconv
  52.  
  53. The SURFACE primitive in prt is much more robust than that of NFF ray-
  54. tracers. You might have to tweak the outfile of nffconv to get a pretty
  55. picture.
  56.  
  57.  
  58. RUNNING PRT
  59.  
  60. Before you run prt, make sure that:
  61.  
  62.     1. You have built rt on all of the target hosts.
  63.     2. You have an account on all of the target hosts and can run rsh.
  64.     3. Rsh does not produce any more output other than the output
  65.        of the program. Type:
  66.  
  67.         rsh <hostname> rt
  68.  
  69.        then type a Control-D character. All you should see is:
  70.  
  71.         rt: no light sources were specified.
  72.  
  73.        If you see any other output (including a request for password
  74.        prompt), then you need to correct it. 
  75.  
  76. Prt has the following usage format:
  77.  
  78.     prt [-v] [-s] [-l] [-r] [-c sample_count] input-file
  79.         output-file host [host ... ]
  80.  
  81. The options are:
  82.  
  83.     -v    Verbose mode. Good for debugging and impatient people.
  84.  
  85.     -s    Don't trace shadow rays. For testing an object database.
  86.  
  87.     -l    Don't trace reflected rays. For testing an object database.
  88.  
  89.     -r    Don't trace refracted rays. For testing an object database.
  90.  
  91.     -c    This option specifies the number of samples per pixel 
  92.         for stochastic sampling. The default is 1 (no sampling).
  93.  
  94. Since prt uses two pipes per rt connection, you can specify up to 30 hosts
  95. on the command line. I am trying to figure out a way to increase this. If 
  96. anyone has any ideas, please let me know.
  97.  
  98. You can run rt directly if you want. It has the same usage format as prt
  99. with the exception of the host list. Rt has several more options that are
  100. only used when started by prt. If you are interested, look in main.c.
  101.  
  102. RUNNING NFFCONV
  103.  
  104. Nffconv makes a good faith attempt at converting NFF formatted files to
  105. a format that prt can use. By "good faith" I mean that it makes a lot of
  106. assumptions about the surface properties. Prt's surface properties are more
  107. robust than NFF's.
  108.  
  109. Since prt does not yet handle polygon patches, nnfconv will complain and
  110. exit if your input database contains any polygon patches.
  111.  
  112. Usage for nffconv is:
  113.  
  114.     nffconv <input-file >output-file.
  115.  
  116.  
  117. FUTURE PLANS
  118.  
  119. Since this is the first public release of prt, I expect that there are some
  120. bugs/portability issues. The next release should be less buggy/more portable.
  121. I would like to add the torus object type and polygon patches. The only reason 
  122. that these two objects haven't been added yet is because the math required is
  123. beyond me at this point. I also have come up with a much better load balancing 
  124. scheme which will adjust the load on a per machine basis in real time. I have 
  125. not had a chance to implement this.
  126.  
  127.  
  128. ACKNOWLEDGEMENTS
  129.  
  130. The code for cone intersection and building the bounding boxes were pretty
  131. much lifted from the MTV raytracer. Mark, I hope you don't mind.
  132.  
  133. I would also like to thank Eric Haines and George Kyriazis for their help 
  134. early on in the design of the raytracer engine.
  135.  
  136. Please report bugs/patches/etc to me at:
  137.  
  138.     kory@avatar.com
  139.  
  140. I am very intereseted to hear what kind of images you have done and what kind
  141. of performance you have achieved.
  142.  
  143. If you create cool object files, please send me a copy so that I can archive
  144. them and make them available to others.
  145.  
  146. Enjoy and happy tracing,
  147. --kory
  148. kory@avatar.com
  149.  
  150.