home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / POV-Ray 2.2 / POVMNF / POV-Ray 2.2 Notes < prev    next >
Encoding:
Text File  |  1994-02-09  |  27.8 KB  |  242 lines  |  [TEXT/ttxt]

  1.  This is a variable passed into POV-Ray, which can be used as a dynamically changing animation variable (clock) in a scene file.
  2.  
  3. (1a) Initial - This is the clock value at frame #1.  It must be different than the "Final" clock value, but otherwise may be any floating point value.
  4.  
  5. (1b) Start At - This is the displayed clock value at the "Start At" frame value.
  6.  
  7. (1c) End At - This is the displayed clock value at the "End At" frame value.
  8.  
  9. (1d) Final - This is the clock value at the "Final" frame #.  It must be different than the "Initial" clock value, but otherwise may be any floating point value.
  10.  
  11.  
  12. Advanced Tips
  13. -------------
  14. ***
  15. *** To speed up rendering as much as possible on the Mac…
  16. ***
  17. If you are in the beginning stages of scene creation, you often find yourself editing, rendering, editing, rendering, etc.  To speed this up, try shrinking the image size to 32x32, and using the quick_color statements and setting the Image Quality down to about 3.  Also hiding the image window during rendering speeds up POV-Ray a bit.  If you are generating a final scene, try temporarily booting your Mac with no (or few) extensions on.  Some of these, especially screen savers and network connections, can really slow things down.  POV-Ray grabs more time if it is in the foreground, so don't switch it out behind others.  Also, choose the POV-Ray Preferences item from the Edit menu, and set the Application Friendliness throttle way up, towards 11.  Doing all of this can dramatically speed up the scene generation.  
  18.  
  19. ***
  20. *** To edit large scene files…
  21. ***
  22. Because of the current file size limitation in the POV-Ray built-in editor, you must make sure that the main “.POV” file is no larger than 32K bytes.  To edit and  render larger files, you must use another text editor to break the file into a small .POV file, which uses the #include statement to use the larger file(s).  You can then edit and render the .POV file with POV-Ray.  The larger include files must still be edited with another text editor.  Note that if you use a word processor to do this (e.g. MacWrite, Word, WriteNow, etc.), you must save the file in “Text-Only” format.
  23.  
  24. ***
  25. *** To batch-render a series of individual scene files…
  26. ***
  27. If you are rendering a few files of different output sizes/parameters, open each file in POV-Ray and set up its “Rendering Options” the way you want, and close each file when done.  There should be no POV-Ray Source file window open now.  Don't quit POV-Ray, but instead just switch to the System 7 Finder.  Select all the files which you just opened and set options for.  Now drag them over onto the POV-Ray application icon (or convenient application alias) and drop them on it.  POV-Ray will (by default) render each file with its own option settings, and save each image before starting the next.
  28.  
  29. If during this batch rendering process, you want to add more files to the list, just drag the new files onto POV-Ray just like before.  These new files will be added to the end of the list of files to batch-render.
  30.  
  31. To stop the batch rendering in progress, just choose "Stop Rendering" from the Render menu, or press command-period.  The current scene will be interrupted, and all remaining scenes will not render.  To resume, you will have to drop the remaining scene files onto POV-Ray again.
  32.  
  33. If you want a series of images to all be rendered, but with identical settings, then do this:  Open any one of the files to be rendered, and set up its Rendering Options the way you want all the files to be done.  Now choose “Application Preferences” from the File menu.  Turn on the “Use Application Default Options” radio button, and turn on the “Save current file's rendering options as the default” checkbox, and click the Save button.  Close the source window, but DON'T QUIT POV-RAY YET!  Now switch back to the Finder, select all the files, and drag them onto the POV-Ray application icon, just like before.  This time, all the files will ignore their individual settings, and use the default application setting.
  34. NOTE: In the interest of safety and user sanity, POV-Ray doesn't remember this override state, but always returns to “…each file's settings…” when it is first run.
  35.  
  36. ***
  37. *** To generate a QuickTime movie from POV-Ray…
  38. ***
  39. Use the “clock” variable in expressions in your scene, to scale, translate, or rotate objects.  Then use the “Rendering Options” menu item, turn on the “Animate” checkbox, and click the “Settings” button to set the number of frames and the range of the clock variable.  When you render the file, it will render multiple times and generate a series of PICT files.  You can then use MacroMind Director, Apple's Convert-to-Movie, my FreeWare "MooVer" utility, or some other application to “import” the series of PICT files, and save the result as a QuickTime movie.  
  40.  
  41. To stop the animation rendering in progress, just choose "Stop Rendering" from the Render menu, or press command-period.  The current scene frame will be interrupted, and all upcoming frames will not render.
  42.  
  43. To resume from some frame, you can choose "Animation Settings" from the Rendering Options dialog, and set the "Start At:" to start where you left off.  POV-Ray will then begin rendering from that frame to the "End At:" frame.
  44.  
  45. An example of a spinning box and a moving sphere is shown below:
  46.     box { <-1,-1,-1> <1,1,1> rotate clock*y }
  47.     sphere { <0,0,0> 2 translate clock*z/36-5 }
  48. If you set up the frames to go from 1 to 20, and the clock value to go from 0 to 360, then the above box will make one complete revolution, and the sphere would move from -5 z to +5 z.  The math is left as an exercise to the reader :-)
  49.  
  50. Animation tip:  If you are creating an animation that you want to smoothly loop, there is a subtle problem you might run into.  If you set up the animation to go from 0.0 to 360.0 degrees, you will notice that the first and last frames are the same, since in the 
  51. "polar regions", zero is the same as 360.  This means that at the loop point of the movie, there will be a slight stall because the same frame is displayed twice.  To get around this problem, you must do the following:
  52. Set the Final frame to be one more than you actually want (e.g., 101), and set the "End At:" frame at one less than this (e.g., 100).  Now set the "Start At:" frame number to 1, and set the Initial and Final clock values to the full range (e.g., 0.0 to 360.0)... whew, now you are ready to make a movie!  Of course, you could just delete one of the frames and have a 99 frame movie, but that would be too easy.
  53.  
  54.  
  55. Bugs, Quirks, and Future Directions
  56. -----------------------------------
  57.  
  58. The Bad News...
  59. ************
  60. *  There is a maximum limit of 32,000 characters (approx. 32K bytes) in source files in the built-in text editor window.  The text editor will not allow you to open or create files bigger than this.  This is due to a limitation of the Macintosh TextEdit package (i.e., Programmer Laziness.)  Although the main file to be rendered must be less than 32K in size, any #included (.INC) files may be of any size.  You will just need to use some other editor or word processor to edit those.  If you do use a word processor to edit them, remember to save your files in TEXT-only format.
  61.  
  62. *  There is this same 32K limit in the Status window text.  When the Status Window gets close to this limit, it just drops things off the top as it adds to the bottom.  So you always have the last 32K of text in the window.
  63.  
  64. *  If you create and render a scene file with nothing in it, it will display an error "no objects found in scene."  If you try to run the same scene again, you will get some odd error messages.
  65.  
  66. * After each rendering job, POV-Ray "loses" about 1 KByte of RAM memory.  This sloppy phenomenon, sometimes known in programming circles as a "memory leak", is not harmful.  However, after you've done a large number of renders without quitting the application, you may eventually get an "out of memory" error.  Just quit and restart POV-Ray, and it will be fine for awhile again.  This will be more of a problem if you are doing animation renders with lots of frames.  You may have to break it into multiple runs, or increase POV-Ray's application heap size.  This was addressed prior to release, but not all leaks were found... it will be completely fixed in a future release.  All "direct" memory leaks are fixed, what's left seems to be caused by calling runtime routines that themselves leak.
  67.  
  68. *  POV-Ray should be creating the POV-Ray Virtual Image Buffer file in the Temporary Items folder if it is running under System 7, it currently does not.
  69.  
  70. *  There is still an occasional quirk in the vertical scrollbar of the Status window, where it will get out of sync if you scroll it while the window is being filled.  Nothing is lost, and if you scroll to the top and back to the bottom, all returns to normal.
  71.  
  72. * There are reports that the "Finder Balloon Help" of the POV-Ray Application (turn on Balloon Help and point at app in the Finder) does not work on some Macs.  It will report a Finder "Type -192" error.  It seems to work properly on other machines.  This may be due to a corrupt desktop database, although rebuilding the desktop was reported not to help.
  73.  
  74. *  Under System 6.x, POV-Ray will not automatically open a document that is double clicked from the Finder.  You must run POV-Ray, then open the file from the File menu.  Double-clicking documents DOES work properly in System 7, and in fact, multiple file drag-n-drop is supported.  This missing System 6 feature was an intentional omission due to time constraints and the low priority of the feature.
  75.  
  76. *  If you are using a virtual image buffer for a large image, it is not advisable to use the "Size Image to Window" mode, because the image won't display properly.  This is only a display problem, It will save properly when finished.
  77.  
  78. *  Adobe Photoshop prior to version 2.5 ignores the vertical-flipped bit of the TARGA files created by POV-Ray, and displays them upside down.  Version 2.5 fixes this problem.
  79.  
  80. *  With System 7 Virtual Memory (VM) on, and anti-alias setting on, and an anti-alias on, the VM file will do some thrashing occasionally if your rendering requires a virtual image buffer.  This will just slow things way down; it doesn't cause any crashes.
  81.  
  82. The Good News, Coming sometime after version 2.0...
  83. *****************************************
  84. *  Allow selecting an arbitrary area in Image window, and then re-rendering just that area (x1,y1 to x2,y2).. more flexible than the current start/end scanline method
  85. *  Allow user to scroll the Image window
  86. *  Let user pick file signature for PICT and Targa file formats.  Currently, PICT files are saved with TeachText's signature and Targa files are saved with PhotoShop's (PICT creator type is currently saved in scene file's fPrf resource, & could be edited with ResEdit.)
  87. *  Built-in QuickTime movie support
  88. *  TIFF and PICT image (image-map) support for POV-Ray
  89. *  TrueType font support (extruded characters.. need generic POV-Ray syntax additions for typeface import?)
  90. *  Allow saving image directly to GIF or 8 bit Mac PICT format (currently just 24 bit PICT now.)
  91. *  Mac Network (distributed) rendering
  92.  
  93. The Mac Source Editor needs a _major_ facelift, to include:
  94. *  Abandon stock TextEdit, support source files larger than 32K chars
  95. *  Support tabs
  96. *  Search and replace features should be added
  97. *  Shape prototype generation, esp. torus and other tough ones
  98. *  Add balanced curly brace checking
  99. *  Simultaneously edit multiple source files, useful for Includes
  100.  
  101. One possible way to enhance the editor is to give up on the built-in text editor altogether, and tell the user to use BBEdit or some other text editor, and we could break POV-Ray into a faceless rendering engine that accepts AppleEvents.  The options dialogs could be supported by a stand-alone application that could alter the file's settings prior to rendering.  This makes POV-Ray more loosely coupled, but paves the way for drop-in editors and network rendering.  Besides the time it would take to do this, an interesting obstacle to overcome is how the rendering engine would display its image.  If it was not so tightly integrated, quick changes and re-rendering sessions may be more awkward.  These are some interesting ideas... we are interested in hearing from users as to which way future versions of POV-Ray should head, let us know!
  102.  
  103.  
  104. The Source Code
  105. ---------------
  106. POV-Ray is a team effort, and the team members use Compuserve's Graphics Developers forum (GRAPHDEV) to keep abreast of changes and suggestions.  Before you dive in and write massive enhancements, we suggest that you contact any of the team members and get to know the guidelines.  We are an easy going bunch, and very friendly and interested in helping newcomers.  And who knows, we may be working on the very same features you want to add, or your enhancement may be one we're hoping to see done.  If you wish to make changes to POV-Ray, read the Port Guide, found in the POVSRC archive under MISC:PORTGUID.DOC.
  107.  
  108. Before you publically post altered source or executables, please review the POV-Ray legal documentation for copyright restrictions and rules of distribution.  POVLEGAL.DOC can be found in any of the archives.  To restate our position: please contact us directly with any bug fixes or enhancements.  We can then incorporate them into the next general release.
  109.  
  110. The executables released by the POV Team for the Macintosh are built using Think C 6.0.  It is possible to create even faster POV-Ray executables using a mix of Gnu C and MPW, but for a straight compilation, Think C 6.0 is a little smaller and faster than MPW 3.2 or MPW 3.3.
  111.  
  112. You will find the source code in two sections in the POVSRC archive.  The main portion of POV-Ray is in POVSRC:SOURCE:.  The additional Macintosh-specific source code is in POVSRC:MACHINE:MAC-Source:.  These two sets of source should then be put together into a single POV-Ray Source folder before building (any name is fine.)
  113.  
  114. Some Apple header files for QuickTime compression are also included.  These are mainly for the Think C 5 & 6 environment, as they are already present in MPW 3.3.  If you're trying to build a version and add newer QuickTime features (1.61 is current as of this release), you may need to get newer header files from Apple or Symantec, or whoever is doing Apple's development system these days :-)
  115.  
  116.  
  117. Think C Compiler Notes
  118. ------------------------
  119. When compiling, you must use Think C 5.0 or later (preferably 5.0.4 or 6.0.)  The enclosed Project file "POV.π" is for Think C 6.0.  To compile under Think C 5.x, you will need to throw this file away and create a new one from scratch.  Notes on how to do this are listed below.
  120.  
  121. Think C 5 & 6 don't have the following QuickTime headers, so we have provided them for now.  You will need to copy them into Think C's "Apple Includes" folder.
  122. ImageCodec.h
  123. ImageCompression.h
  124. MediaHandlers.h
  125. Movies.h
  126. MoviesFormat.h
  127. QuickTimeComponents.h
  128.  
  129. You should first make a COPY of your "Standard Libraries:ANSI" library's Project file, and rename your copy to “ANSI-020.FPU.NoConsole”.  This will be the ANSI library you'll be using for POV-Ray.  Remove the files "console.c" and "command.c" from the project.  Choose the Edit:Options menu, and change the following:  Think C:Compiler settings, turn on all checkboxes except "4 byte ints" and "8 byte Doubles".  Code Optimizations:turn on all, but not the Global Optimizations.  Debugging:turn off all.  Prefix:add a #define _NOCONSOLE_.  Choose the menu Project:Set Project Type, and turn on "Separate Strs".  Now "update" to compile all the modules.
  130.  
  131. For Think C 5 users, there are some additional steps, to create the POV.π project file from scratch.  Start up Think C, create a new project called POV.π, and add all the .c source files to the project.  Here's the current segmenting strategy:
  132. === Segment (povNEditor) ===
  133. FileQueue.c
  134. POV.c
  135. POVMalloc.c
  136. ScreenUtils.c
  137. TextEditor.c
  138. === Segment (textures) ===
  139. pigment.c
  140. texture.c
  141. txttest.c
  142. === Segment (tokenize) ===
  143. express.c
  144. matrices.c
  145. tokenize.c
  146. === Segment (macwindows) ===
  147. animate.c
  148. imagewindow.c
  149. popupmenu.c
  150. printf2window.c
  151. progressdialog.c
  152. savecmppict.c
  153. stdcompressionglue.o
  154. templatemenu.c
  155. === Segment (files) ===
  156. dump.c
  157. gif.c
  158. gifdecod.c
  159. iff.c
  160. raw.c
  161. targa.c
  162. === Segment (parse) ===
  163. parse.c
  164. === Segment (render) ===
  165. normal.c
  166. povray.c
  167. ray.c
  168. render.c
  169. vect.c
  170. === Segment (polyquad) ===
  171. poly.c
  172. quadrics.c
  173. === Segment (heightfields) ===
  174. hfield.c
  175. === Segment (cameraNlights) ===
  176. camera.c
  177. lighting.c
  178. === Segment (primparse) ===
  179. boxes.c
  180. colour.c
  181. csg.c
  182. image.c
  183. objects.c
  184. planes.c
  185. point.c
  186. === Segment (primparse2) ===
  187. blob.c
  188. bound.c
  189. cones.c
  190. discs.c
  191. === Segment (primparse3) ===
  192. spheres.c
  193. triangle.c
  194. === Segment (bezier) ===
  195. bezier.c
  196. === Segment (ansi) ===
  197. ANSI-020.FPU.NoConsole
  198. MacTraps
  199. MacTraps2
  200.  
  201. Choose the Edit:Options:Think C: menu, and change the following:  Language:turn on Check Pointer Types and Think C Language Extensions.  Compiler settings, turn on all checkboxes except "4 byte ints" and "8 byte Doubles".  Code Optimizations:turn on all.  Debugging:turn off all.  Prefix:add a #define _NOCONSOLE_.  Choose the menu Project:Set Project Type, and turn on "Separate Strs", set the Creator to "PvRy", set the Size Flags to 58E0, set the type to Application, and set the Partition to 1000.  Insert the following into the Prefix options from the Edit menu:
  202. #define SystemSixOrLater    true
  203. #define _NOCONSOLE_   // turn off Think C console I/O
  204. #include <MacHeaders>
  205. #define NEEDS_68020 1   // turn on to force 68020 or better CPU code
  206. #define NEEDS_COLORQD 1 // turn on to force Color Quickdraw ROM Support
  207. #define NEEDS_32BITQD 1 // turn on to force 32Bit Quickdraw ROM Support
  208. #define NEEDS_FPU 1     // turn on to force 68881 FPU calls
  209. #define USE_NATIVE_MALLOC 1 // turn off to use C's malloc(), on for Mac's NewPtr()
  210.  
  211. After you build the application, you must set the application's (preferred) memory size to 2500, using the Finder's "Get Info" menu item.  This is currently the only way to set the minimum and preferred memory sizes differently.
  212.  
  213.  
  214. MPW C Compiler Notes
  215. ----------------------
  216. The non-FPU version of POV-Ray was compiled under MPW, because the code generated was too big for Think C (specifically, hfield.c.)  An MPW compile of the FPU version of POV-Ray is possible, but generates a noticeably larger and slower application.
  217.  
  218. POV-Ray has been compiled and tested using Apple's MPW C compiler, version 3.2.2 and 3.3.  The make file supposedly supports MPW 3.0 and 3.1 as well, but has not been tested.
  219.  
  220. In order to compile POV-Ray with the included make file, you will first need to manually create an empty folder inside the POV-Ray Source folder called “obj”.  The object files will be stored in there, instead of being sprinkled through the source code folder.
  221.  
  222. MPW 3.2 doesn't have the following QuickTime headers, so we have provided them for now.  You will need to copy them into MPW's Interfaces:CIncludes folder.
  223. ImageCodec.h
  224. ImageCompression.h
  225. MediaHandlers.h
  226. Movies.h
  227. MoviesFormat.h
  228. QuickTimeComponents.h
  229. You will also need to put the file "stdcompressionglue.o" into MPW's :Libraries:Libraries: folder.
  230.  
  231. There are quite a few flags used to turn on and off options (FPU, native-malloc, etc.), these are in the Make file itself.
  232.  
  233. There are some warnings that show up in the POV-Ray core code, all of them are due to unused function parameters.  These are, in the immortal words of Douglas Adams, “Mostly Harmless.”
  234.  
  235.  
  236. PowerPC Compiler Notes
  237. ----------------------
  238. The PowerPC compile is being done by David Harr, and is as preliminary as the PowerPC development system for now.  David Harr can be reached at wirehead@netcom.com.
  239.  
  240.  
  241. [eof]
  242.