home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / graphics / rays / povray_2.rea < prev    next >
Encoding:
Text File  |  1994-02-15  |  13.7 KB  |  334 lines

  1. HELLO, WORLD
  2. This is my "port" of POV-Ray 2.2 to Linux.  This version is almost
  3. exactly the same as the one distributed by the POV-Team, but support
  4. has been added for a dithered color X display and linux SVGALIB
  5. display for 256, 32k, 64k, and 16m color modes.
  6.  
  7. I have compiled and tested these sources on only one Linux machine, a
  8. 386-40 with 387 running Linux 0.99.15, GCC 2.5.9 and libc-4.5.19.  I am
  9. relatively confident that it will require little to no twiddling to
  10. get it to compile on other Linux systems and even general UNIX
  11. systems.
  12.  
  13. Compared to version 2.0 or 2.1, there aren't any real added features, 
  14. just some bugfixes.  If you haven't noticed any problems with 2.0 or
  15. 2.1, you probably don't need to bother upgrading.  In any case, you
  16. should probably only get the new source or binary archive, as the
  17. docs, include, and scene files are unchanged as far as I know.
  18.  
  19. ABOUT THE SOFTWARE/WHERE TO FTP/WHERE TO COMPLAIN
  20.  
  21. This archive should have contained the file "povlegal.doc" which
  22. tells you about my responsibilities and your rights.  If it is not
  23. present, you can find it in a copy of the real distribution.
  24. Basically, this is free software, but the license does have some
  25. restrictions.
  26.  
  27. If you want to get the real distribution for any reason, it is
  28. available at many FTP sites and BBSs.  Specifically, the FTP site
  29. alfred.ccs.carleton.ca is the official distribution point of the
  30. POV-Team to the internet.  Look in pub/pov-ray.  The current 2.1 files
  31. are in
  32. /pub/pov-ray/POV-Ray2.2/povsrc.tar.Z
  33.                         povscn.tar.Z
  34.                         povdoc.tar.Z
  35.  
  36. This (my) distribution is divided into several archives:
  37. povsrc-2.2.tar.gz contains the source/ directory
  38. povscn-2.2.tar.gz contains the scenes/ directory
  39. povinc-2.2.tar.gz contains the include/ directory
  40. povdoc-2.2.tar.gz contains the doc/ and demo/ directories
  41. povbin-2.2.tar.gz contains the bin/ directory
  42.  
  43. Each archive contains the toplevel README.linux and povlegal.doc files.
  44.  
  45. The minimum required is the include directory plus either binaries or
  46. source.  I recommend that you get the documentation and scenes unless
  47. you're sure you know what you're doing.  (The scenes/ directory is
  48. basically the same as POV 1.0, but the syntax has changed.)
  49.  
  50. HOW TO INSTALL:
  51. If you've gotten the binary archive, pick one of povray.? and copy it
  52. to a binary directory on your home system as "povray".
  53.  
  54. If you've gotten the source archive, change the INSTBIN= line of the
  55. Makefile, and "make install?" where ? is one of s, x, or v.  S stands
  56. for 'standard' and the resulting binary will not support a +d option.  X
  57. stands for Xwindows, and the resulting binary will support display on
  58. a 256 color X server.  V stands for VGA, and will support display on
  59. a (S)VGA monitor.  If you install the VGA version, you must do the
  60. installation as root because of the way svgalib operates.
  61.  
  62. Once you've done one of the two above things, you need to put
  63. (somewhere like .cshrc)
  64. setenv POVRAYOPT -l$HOME/povray/include
  65. to tell POVRAY where to find your include files.  You can actually
  66. specify any command-line options here, but this is the only one that's
  67. really necessary.
  68.  
  69. Now, render your scene:
  70. povray -w320 -h200 -ifoo.pov -ofoo.tga +ft -a +dG -v
  71.  
  72. WHAT TO VIEW/CONVERT PICTURES WITH:
  73.  
  74. XWINDOWS
  75. I recommend 'xli', which can apparently be obtained only in source
  76. form from ftp.x.org:/contrib/xli*
  77.  
  78. It can view the targa files that POV generates, as well as many other
  79. formats (gif, jfif, ...) and (on my 5 meg machine) faster output than
  80.  
  81. 'xv', the other picture display I know of for X.  It seems slower but
  82. has a nicer (xview?) interface.  This one is available in binary
  83. format from sunsite.unc.edu:/pub/Linux/X11/something.  I prefer the
  84. 2.11(?) version to version 3.x because it seems somewhat faster.  Xv
  85. doesn't support direct viewing of targa images, so you'll have to
  86. convert them to something else.
  87.  
  88. SVGALIB
  89. There isn't that much out there for SVGALIB.  Try 'spic' (apparently
  90. not intended as a racial slur) from something like
  91. sunsite.unc.edu:/pub/Linux/apps/graphics/viewers/spic06.tgz for an
  92. archive of the source.  It views only gifs and jfif images, so take a
  93. look at one of the converters below.
  94.  
  95. CONVERTERS
  96. I'm not really sure if it's best to convert raytraced images into gif
  97. or jfif images.  Gif compression is "lossy" because it only allows for
  98. 256 colors per image, instead of 16 million like Targa allows.  Jfif
  99. (known commonly as jpg) is lossy in the true sense, but it seems to be
  100. better for display than a 256 color image when encoded at a high
  101. quality setting and viewed in a truecolor video mode.  And at the same
  102. time this file will generally have a smaller size on disk.
  103.  
  104. If you want to convert to jfif, you should use the IJG converters,
  105. jpeg-V4a.  These are available in source and binary form -- Ask Archie
  106. for the former, and take a look around Sunsite.unc.edu for the latter.
  107.  
  108. To convert to gif, I know of no decent program.  I thought I had found
  109. one, pvquant, but it has some problems.  Its commandline is confusing
  110. or at least brain-damaged.  And apparently it only deals with 320x200
  111. resolution images.  This is a pity since its quantization method (no
  112. dither) seemed to be pretty good.
  113.  
  114. I'm sure that there is some pair (or more) of programs in the netpbm
  115. or pbmplus packages that will serve to do any of the above.  But I'm
  116. not too familiar with those programs.  Perhaps someone could enlighten
  117. me as to what's out there....
  118.  
  119. SUMMARY OF CHANGES:
  120.  
  121. DIRECTORY STRUCTURE
  122. The machine/ directory was removed, and all system-specific files are 
  123. in pov/source with the general c files.
  124.  
  125. The include files were separated from the documentation, and a total
  126. of 5 archive files now exist, compared to 3 or 4 as distributed.
  127.  
  128. SOURCE FILES
  129.  
  130. PLAIN CODE
  131. A minor revision in the code of the matherr() function allows it to be
  132. compiled under Linux:  It is #ifdef'd out.  If someone will tell me
  133. that there are definitions of the macros that matherr() refers to,
  134. I'll be happy to change this.
  135.  
  136. XWINDOWS CODE
  137. Several changes other than those necessary for a compile were made to
  138. the xwindows.c file.  Two features were added, though the original
  139. behaviour of the xwindows display module can be restored by changing
  140. the -Define parameters to the compile of xwindows.c:
  141.  
  142.  The first change, reverted by -DWAIT_ON_COMPLETION causes the
  143.  displayed image to be erased at completion (Actually a few seconds
  144.  later) and then terminate POVray.  This option is useful if you use
  145.  POVray in a batch context but would still like to look at the output
  146.  as it renders.  
  147.  
  148.  The second change, reverted by removing -DCDITHER causes the display
  149.  module to do a primitive ordered dither on the displayed images.
  150.  While an ordered dither is not the highest quality attainable, it is
  151.  signifigantly better than the former behaviour:  A nearest colour was
  152.  chosen from a palette of only 216.  This led to severe banding.
  153.  
  154. If you are using the binary distributed, these additions to the X
  155. version will be compiled in.  You will have to get your own copy of
  156. the sources to change the behaviour.
  157.  
  158. The monochrome display code included seems to be broken, at least on
  159. Linux/XFree86 1.3.  I haven't tested it on any other X displays than
  160. my one at home, however
  161.  
  162. LINUX CODE
  163. The file linux.c was created, and it holds routines to allow POVray to
  164. render to a VGA or SVGA display, so that non-X users can do something
  165. besides look at the +V display.  The version in the binary is
  166. statically linked to the 0.98 version of svgalib, the minimum required
  167. version.  
  168.  
  169.  Specify the +D option according to the following table:
  170.   +D0       The mode specified in GSVGAMODE, or 320x200x256 if none
  171.   +D5       320x200x256
  172.   +D6       320x240x256
  173.   +D7       320x400x256
  174.   +D8       360x480x256
  175.   +DA       640x480x256
  176.   +DB       800x600x256
  177.   +DC      1024x768x256
  178.   +DD     1280x1024x256
  179.   +DE       320x200x32K
  180.   +DF       320x200x64K
  181.   +DG       320x200x16M
  182.   +DH       640x480x32K    
  183.   +DI       640x480x64K
  184.   +DJ       640x480x16M
  185.   +DK       800x600x32K
  186.   +DL       800x600x64K
  187.   +DM       800x600x16M
  188.   +DN      1024x768x32K
  189.   +DM      1024x768x65K
  190.   +DO      1024x768x16M
  191.   +DP     1280x1024x32K
  192.   +DQ     1280x1024x64K
  193.   +DR     1280X1024X16M
  194.  
  195.  Appending a U (IE +DIU) will turn off the dither effect that is in
  196.  effect by default.
  197.  
  198.  Because the gl libraries do not support 2- and 16-color modes,
  199.  selecting these modes will cause an error condition.  (0-4, 9, S-V)
  200.  This will probably never be fixed, unless the gl libraries are made
  201.  to support these modes.  Of course, I don't actually *check* for this
  202.  happening..
  203.  
  204.  VC switching in svgalib is still not incredibly robust, so you may end
  205.  up messing up your VCs beyond repair and have to reboot.  Take this up
  206.  with SVGALIB's author, or instead quit wildly pressing alt-fkeys.
  207.  
  208.  For some reason, when dithering is in effect with unusually bright colors,
  209.  the colors are sometimes displayed incorrectly and rather hideously.  I'm
  210.  sure the cause for this one is obvious, but I sure can't see it.
  211.  
  212. FROM povinf.doc (Or, What Did I Just FTP?)
  213.  
  214.                   Persistence of Vision Raytracer
  215.                            Version 2.0
  216.                         Basic Information
  217.                   -------------------------------
  218.  
  219.     The Persistence of Vision Raytracer creates three-dimensional,
  220. photo-realistic images using a rendering technique called ray tracing.
  221. It reads in a text file containing information describing the objects and
  222. lighting in a scene and generates an image of that scene from the view
  223. point of a camera also described in the text file. Ray tracing is not
  224. a fast process by any means, but it produces very high quality images
  225. with realistic reflections, shading, perspective, and other effects.
  226.  
  227. From whatsnew.doc: (For users of POV-Ray 1.0)
  228.  
  229.     What's New in POV-Ray 2.0
  230.     -------------------------
  231.     The following is not intended to be an all-inclusive list of every
  232.     new feature, but should give experienced users a pretty good guide
  233.     of what has been changed and what has been added.  Please refer to
  234.     POVRAY.DOC for details.
  235.  
  236.  
  237.     General:
  238.     -------
  239.   - Automatic bounding slabs for greatly enhanced rendering speed of
  240.     most scenes.
  241.   - Adding, subtracting, multiplying & dividing of floats & vectors.
  242.   - Clock global variable for external animation support.
  243.   - X, Y, and Z global vector constants.
  244.   - Improved antialiasing routine with new commandline options.
  245.  
  246.     Commandline options:
  247.     -------------------
  248.   - Version switch for backwards compatibility.
  249.   - Starting/ending column/row switches for trace window.
  250.   - Relative/absolute values for trace window switches.
  251.   - Antialiasing jitter scale value and toggle.
  252.   - Number of antialiasing rays to shoot.
  253.   - Internal "clock" setting for animations.
  254.  
  255.  
  256.     Objects:
  257.     -------
  258.   - Soft penumbral shadows from extended area lights.
  259.   - Smoother Bezier patches.
  260.   - New simplified torus syntax.
  261.   - Heightfield water_level now uses range 0-1 instead of 0-255.
  262.   - Heightfields can now be clipped and used in CSG operations.
  263.   - Heightfields can be phong-shaded with the "smooth" option.
  264.   - New, improved finite cylinders, cones, and discs, with
  265.     optional "capping" of cones and cylinders.
  266.   - More versatile CSG unions have replaced the need for composites.
  267.   - CSG texturing has been made much more flexible.
  268.   - New "merge" removes internal boundaries between transparent
  269.     unioned objects.
  270.  
  271.     Textures:
  272.     --------
  273.   - Hexagon pigment texture.
  274.   - Radial pigment texture.
  275.   - Mandelbrot pigment texture.
  276.   - Texture attributes grouped into 3 independently scalable groups:
  277.     pigment, normal, and finish.
  278.   - TIR (Total Internal Reflection) for more realistic refraction.
  279.   - Fractional Brownian Motion (fbm) turbulence controls.
  280.   - Turbulence can now be used independently with any pigment or normal
  281.     texture.
  282.   - Optional vector-style turbulence values.
  283.   - Background coloring.
  284.   - Color maps can now be declared.
  285.   - Frequency, phase keywords now available for use with color_maps.
  286.   - Filter keyword replaces "alpha", letting us reserve alpha for other
  287.     uses in the future.
  288.   - Less restrictive distribution policy.  See POVLEGAL.DOC for
  289.     details.
  290.  
  291. ABOUT THE SPEED OF POVRAY
  292.  
  293. I have run some simple tests comparing the Linux version with the DOS
  294. version.  I don't have any firm numbers, but renders were "slightly"
  295. faster on my Linux machine than under DOS.
  296.  
  297. I rendered "basicvue.pov" with the options
  298. -w320 -h240 -a -d -f -v
  299. on both DOS and Linux.  The machine is a 386/40+387 with 5 megabytes
  300. ram.  Times were pretty close: 1 minutes 27 seconds under Linux, 1:35
  301. under DOS.  
  302.  
  303. I was running several other programs under Linux at the same time, but
  304. nothing too heavy (A 'term' connection at 14.4kbps, with several
  305. remote shells).  On the DOS machine, I had loaded himem.sys but not
  306. emm386.exe, and no other TSRs.
  307.  
  308. I plan to post some better numbers soon, by running pov-ray in single
  309. user mode on a larger trace.  But it seems apparent to me that Linux
  310. has a small but worthwhile advantage over DOS.  Now if only there were
  311. good CAD systems for Linux or X that could output POV files. :(
  312.  
  313. FINAL NOTES
  314. If you use a 486, I recommend that you get and compile binaries
  315. yourself.  The change of the -m386 flag to -m486 should increase your
  316. performance by an appreciable percentage.  I do not use this flag by
  317. default as I do not have a 486.
  318.  
  319. If you have any problems with this software, please leave mail to me
  320. and not any member of the POV-Team.  While it is unlikely that any of
  321. the changes I have made have introduced bugs, it is possible.  (I'm
  322. also supposed to provide this support according to the terms of
  323. povlegal.doc)
  324.  
  325. Sorry if this "documentation" isn't too great.  While English is my
  326. first language, that doesn't make me very good at it.  Also, I'd
  327. rather be playing with POV-Ray than writing this and then reading it
  328. to see if it made sense.  Hopefully it was enough that you can use the
  329. software I've put together here.
  330.  
  331. Jeff Epler
  332. jepler@herbie.unl.edu
  333. jepler@nyx.cs.du.edu
  334.