home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / graphuti / rawpov18.zip / RAW2POV.DOC < prev    next >
Text File  |  1993-10-02  |  9KB  |  239 lines

  1.                     Raw to POV-Ray Converter v1.8
  2.                     Copyright (c) 1993 Steve Anger
  3.  
  4.     RAW2POV is a utility that converts lists of triangle coordinates in raw
  5. ascii text format to various raytracer formats. Adjustable levels of smoothing
  6. can be applied to the triangle surfaces. If you're outputting to POV-Ray 1.0,
  7. raw2pov will automatically add an efficient set of nested bounding shapes to
  8. the scene to speed up the rendering.
  9.  
  10. POV-Ray users! Since POV-Ray 2.0 has now been released to the public the
  11. default output format has been changed to POV-Ray 2.0. If you're still
  12. using POV-Ray 1.0 you can still generate 1.0 compatible files by using
  13. the -op1 switch.
  14.  
  15.  
  16. File Format:
  17.  
  18. The triangle data can be organized in one of three formats:
  19.  
  20. 1) Default - Nine numbers per triangle
  21.  
  22.       Ax  Ay  Az  Bx  By  Bz  Cx  Cy  Cz
  23.  
  24.     e.g.  -3.5 -4.1 -5.0  -3.9 -6.2 -5.0  -3.4 -6.2 -7.0
  25.  
  26.  
  27. 2) Fractint colour (-fc) - Twelve numbers per triangle
  28.  
  29.       R  G  B  Ax  Ay  Az  Bx  By  Bz  Cx  Cy  Cz
  30.  
  31.     e.g.  1.0 1.0 0.0  -3.5 -4.1 -5.0  -3.9 -6.2 -5.0  -3.4 -6.2 -7.0
  32.  
  33.  
  34. 3) Texture names (-ft) - Nine numbers and one texture name per triangle
  35.  
  36.       Ax  Ay  Az  Bx  By  Bz  Cx  Cy  Cz  TEXTURE
  37.  
  38.     e.g.  -3.5 -4.1 -5.0  -3.9 -6.2 -5.0  -3.4 -6.2 -7.0  RedPlastic
  39.  
  40.  
  41.   Ax, Ay, etc are the x,y,z coordinates of the three triangle vertices A, B,
  42. and C.  R, G, and B represent the Red, Green, and Blue components of the
  43. triangle colour and range from 0.0 to 1.0.  TEXTURE is a string indicating
  44. the texture name. The numbers/names can be separated by spaces, tabs, or
  45. carriage returns.
  46.  
  47.   Non-numeric identifiers can be used to separate groups of triangles
  48. representing different objects. See CHESS.RAW for an example.
  49.  
  50.  
  51. Hardware Requirements:
  52.  
  53. Two version of the executable are included in this archive, RAW2POV.EXE and
  54. RAW2POVX.EXE. The first version will run on all machines from XT's to 486's
  55. but is only capable of using 640k of memory. The second version requires a
  56. minimum of a 386 with a co-pro to run but can use all available memory plus
  57. up to 128M of virtual memory.
  58.  
  59.  
  60. Usage: raw2pov inputfile[.raw] [outputfile] [options]
  61.  
  62. Options:
  63.  
  64. -snnn  - Generates smooth triangles. The boundary between triangles are only
  65.          smoothed if the angle between the triangles is less that nnn deg.
  66.          -s0 will not smooth any triangles while -s180 will smooth all
  67.          triangles. Values from -s45 to -s90 usually work well. If
  68.          unspecified smoothing defaults to -s70.
  69.  
  70. +v, -v - Turn verbose status messages on or off. Messages are off by default.
  71.  
  72. +i, -i - Turn internal bounding on or off for POV-Ray. By default internal
  73.          bounding is on for POV-Ray 1.0 output and off for POV-Ray 2.0 output.
  74.  
  75. -1     - Bound all of the input objects as a single object. By default all
  76.          objects are bounded separately and then combined. This option may
  77.          produce better results in some cases, especially if the input file
  78.          contains a large number of very small objects.
  79.  
  80. -x     - Exchanges the Y and Z coordinates of all triangle vertices. Useful
  81.          if the input file was generated from a program that uses the Z
  82.          coordinate as vertical rather that the Y coord as is normally used in
  83.          POV-Ray.
  84.  
  85. -c     - Adds a camera and a light source to the scene. The camera is
  86.          automatically adjusted to frame the object.
  87.  
  88. -fc    - Specifies that the input file is in Fractint style colour format
  89.          with 12 numbers per triangle.
  90.  
  91. -ft    - Specified that the input file contains texture names.
  92.  
  93. -op    - Output to POV-Ray 1.0 format (default).
  94. -op2   - Output to POV-Ray 2.0 format (2.0 is unreleased as yet).
  95. -ov    - Output to Vivid 2.0 format.
  96. -ol    - Output to Polyray format.
  97.  
  98.  
  99. Examples:
  100.  
  101.     // Convert CHESS.RAW to POV-Ray 2.0 format.
  102.     raw2pov chess
  103.  
  104.     // Convert CHESS.RAW to POV-Ray 1.0 format. Add a camera and light.
  105.     raw2pov chess -op1 -c
  106.  
  107.     // Convert CHESS.RAW to Vivid format with Y and Z axis' swapped
  108.     raw2pov chess -ov -x
  109.  
  110.     // Convert CHESS.RAW to POV-Ray format with full smoothing and a new name
  111.     raw2pov chess melted -s180
  112.  
  113. Note: Smooth triangles will only work properly if the input file uses
  114. consistent clockwise or counter-clockwise vertex ordering. Most CAD packages
  115. that output triangular data will already have the data in the proper order.
  116.  
  117.  
  118. Environment Variable:
  119.  
  120. If you find that you're often using the same command line options over and
  121. over again you can set up your default command line options in the RAW2POV
  122. environment variable. e.g. If you always want to have a camera and light
  123. added to your scene you may want to add the following line to your
  124. autoexec.bat:
  125.  
  126.                          set RAW2POV=-c
  127.  
  128. Commands specified in the environment variable will be overridden by those
  129. specified on the command line.
  130.  
  131.  
  132.  
  133. Revision History:
  134.  
  135. Changes in v1.8
  136. - Added POV-Ray 2.0, Vivid 2.0, and Polyray output.
  137. - Default smoothing changed from 60 degrees to 70 degrees.
  138. - A couple changes to the command line options.
  139. - Doesn't choke on decimal numbers with no leading zero (e.g. ".25")
  140. - RAW2POV environment variable added.
  141.  
  142. Changes in v1.7
  143. - The -ft option in 1.6 just plain didn't work (oops).
  144. - The -c option will automatically add a camera an light source to the scene.
  145. - Fixed a bug that occasionally generated a bad smooth triangle normal.
  146.  
  147. Changes in v1.6
  148. - Put the named texture feature back in with a command line option to turn
  149.   it on (-ft). A few people missed it.
  150.  
  151. Changed in v1.5
  152. - Outputs POV-Ray 1.0 format files only.
  153. - Uses the new box primitive available in POV-Ray 1.0 as a bounding shape.
  154. - Accepts unformatted input rather than the one triangle per line format
  155.   used with previous versions.
  156.  
  157. Changes in v1.4
  158. - Name changed from TXT2POV to RAW2POV.
  159. - Now outputs only lower case keywords. I'll assume nobody's using DKB any
  160.   more.
  161. - Allows you to swap the Y and Z axis when converting for those files that  
  162.   use the Z coord as vertical.
  163. - Automatically removes illegal characters in object/texture names.
  164. - Better rejection of degenerate triangles.
  165. - Little bug fixes here and there.
  166.  
  167. Changes in v1.3
  168. - Name changed from TXT2DKB to TXT2POV although the version number was not
  169.   reset. The output files should be compatible with both DKB 2.12 and POV
  170.   0.50 beta.
  171. - Nothing new as far as faster rendering times. :(
  172. - The graphic preview was getting to be a pain to maintain in this version so
  173.   I dropped it.
  174. - Protected mode compile (TXT2POVX) is now VCPI compliant and should work  
  175.   with most 386 memory managers. Desqview and Windows are still no-no's.
  176. - Now outputs both a data (.dat) file and a separate include (.inc) file  
  177.   instead of one big data file.
  178. - Generated files are about 30% smaller.
  179. - You can now specify object and texture names in the input file.
  180.  
  181. Changes in v1.2:
  182. - Added nested bounding shapes for improved rendering times (especially for
  183.   very large objects). Uses a mangled version of the octree method.
  184. - Bounding shapes optionally shown in preview.
  185.  
  186. Changes in v1.1:
  187. - The optimization routines can now handle input files that contain very  
  188.   large numbers of different colours such as those generated by Fractint.
  189.  
  190.  
  191.  
  192. Bench Marks:
  193.                                   ------ Render Time -------
  194.                       Bounding       Before        After      Speed-up
  195. Object   Triangles     Index *      Bounding      Bounding     Factor
  196. -------- ---------  ------------  ------------  ------------  --------
  197. SKULL       1489        16.1           442s           46s        9.6
  198. CAR1        3357        33.9           433s           25s       17.3
  199. CHESS2     12583       165.5          1291s           39s       33.1
  200. PLASMA      3672        52.9           669s           31s       21.6
  201. ROBOTECH    2488        27.3           560s           31s       18.1
  202. VENUS       1417        19.2           209s           24s        8.7
  203.  
  204. * Bounding index reported by RAW2POV when using -v option.
  205. All images rendered at 160x100 on 33Mhz 486DX. Results should be scalable to
  206. higher resolutions.
  207.  
  208.  
  209. Compiler:
  210.  
  211. The protected mode version of this program was compiled with DJGPP 1.10,
  212. DJ Delorie's DOS port of the GNU C/C++ compiler. Source code and executables
  213. for this compiler and the DOS extender can be obtained from the following
  214. ftp site:
  215.  
  216.         host:      omnigate.clarkson.edu
  217.         login:     ftp
  218.         password:  send your e-mail address
  219.         directory: ~ftp/pub/msdos/djgpp
  220.  
  221.  
  222. Files:
  223.  
  224. RAW2POV.EXE   - Raw to POV executable (compiled with Borland C++). Can handle
  225.                 files of up to approximately 4500 triangles. Less when
  226.                 generating smooth triangles. 
  227. RAW2POVX.EXE  - 32 bit version of converter (compiled with MS-DOS GNU C++ 
  228.                 v2.2.2). Limited only by available memory and disk space. 
  229.                 Requires 386 /w 387 or 486 CPU. 2Mb or more of RAM is   
  230.                 recommended.
  231. RAW2POV.DOC   - What you're reading.
  232. CHESS.RAW     - Example of RAW input file format.
  233. SOURCE.ZIP    - C source code.
  234.  
  235.  
  236.                                          CompuServe: 70714,3113
  237.                                            Internet: 70713.3113@compuserve.com
  238.                                           YCCMR BBS: (708)358-5611
  239.