(c) 1999 By Chris Hernandez.
Note that these docs are very *INCOMPLETE* and only in a preliminary stage. I will complete them once I get a break from my studies.
I would like as much feedback as possible... so please feel free to e-mail me. Let me know what you you think, and of your successes and failures using the script. If you make a really cool image, please give me a URL to download it from (please, no binaries in the mail, I'm only connected via a 28.8 modem!). I would especially like to hear from those who use POV on platforms other than Win95 and Linux. Please, let me know!
POV-Blur is a motion blurring system for the Persistance of Vision Raytracer. It lets anyone with a copy of POV 3.1 add motion blur to their scenes and animations.
The main advantage of POV-Blur over other current motion blur solutions is that all of the processing is done inside POV itself; no need for third party image averagers or patches to the POV executables. Simply customize the settings in the POV-Blur script, run it, and then render the two generated .INI files!
.
A quick overview of what you need to start making your own motion blurred scenes:
(a) Modify your scene file(s).
(b) Customize and run POV-Blur.
(c) Render the two generated .INI files
Note that this quick start assumes that you already have your own clock-dependant POV source file to use. If you don't, then use the default "sample.pov" file that is distributed with POV-Blur.
(a) Modify your scene file(s).
Only minimal modification is needed to your current scene. Fistly, go through and change all references to the clock variable to instead refer to PBclock. A good text editor should be able to do this automatically for you using a global search/replace. For example:
translate x*50*clock would be changed totranslate x*50*PBclock Next, insert the following line at the beginning of your source file(s):
#ifndef (IMPORT_POVBLUR) #declare PBclock = clock; #end This ensures that all of your your source files will still run normally on their own when not being used to create motion blur frames.
NOTE: If you are having trouble with the variable name PBclock (or would prefer to use something else), the name of the clock variable that POV-Blur uses can be changed. See the section on Advanced Options for details.
.
(b) Customize and run POV-Blur.
For the moment, you only need to worry about changing the parameters in the Standard Options part of the script. If you're using the sample file, just accept the default values. For more information on what each of these paraemeters do, see Part 3 of this document. Here is what that section looks like:
//------------------------------------------------------------------------- // STANDARD OPTIONS. //------------------------------------------------------------------------- #declare Input_File_Name = "sample.pov" #declare Output_File_Name = "output" #declare Start_Clock = 0.50; #declare End_Clock = 0.55; #declare Start_Frame = 1; #declare End_Frame = 1; #declare SamplesPerFrame = 7; #declare BlurLength = 0.65; #declare DisplayWhileDoingFrames = false; #declare DisplayWhileDoingBlur = true; Set your input and output file names using Input_File_Name and Output_File_Name. Note that there is no file extension on the output file name.
Since we're generating only a single frame, the start frame and end frame are both equal to 1. You can change this later if you're wanting to render an animation. Set Start_Clock and End_Clock so that there is only a modest difference between them, such as 0.05 if your clock runs from 0.0 to 1.0 (enough to give a little bit of movement in the scene, but not too much for now).
SamplesPerFrame is the number of renders that will be combined to make your final frame. Set this to a medium amount, such as 5 or 7. Remember, render times rise linearly with this number - when doing rough or small renders, *start low*. Of course, the lower the setting, the lower the quality of the final blur.
BlurLength is the amount of time that the shutter is open for each frame. In the example above, the clock runs from 0.50 to 0.55 during the one and only frame. With blur length set at 0.5, the images going into the frame will be blurred across (0.55-0.50)*0.65=0.0325 time units. You can use this parameter to control how much blurring occurs in the frame. This will come in more handy when doing animations.
The final two parameters control the displaying of images during rendering. In the example above, POV-Ray will display its progress only when rendering the final pass to combine the frame, and not when rendering each individual sub-frame.
(c) Render the two generated .INI files.
After having run the POV-Blur script, you will notice several new files have been created. All that is left to do now is to run the files that were created by POV-Blur. The two files that you need to run are DoFrames.ini and DoBlur.ini (in that order).
Presto! You (hopefully) now have a motion blurred image. You may now want to go back and experiment with different settings to tweak what your scene looks like. If you would like to try and render an animation using sample.pov, change Start_Clock to 0.0, End_Clock to 1.0 and End_Frame to 10 and re-run povblur.pov.
.
Standard Options:
These are the options that you will need to change most often when producing your renders.
Input_FileName and Output_File_Name are pretty self explanatory. Input_File_Name is the name of your POV-Ray source file, and Output_File_Name will be the name of the final generated frame(s). In animations, Output_File_Name will be the base name of the frame, which is followed by the number of the frame (eg "out" will produce "out001.tga", "out002.tga" etc. See the POV-Ray docs on Output files for more info). Note the there is a file extension on Input_File_Name, but no extension on Output_File_Name.
Start_Clock, End_Clock, Start_Frame and End_Frame work pretty much in the same way as the internal POV-Ray animation loop. The clock variables determine how much time flows during your scene, and the frame variables determine how many snapshots are taken during this time period. Note that Start_Clock should not equal End_Clock - motion is time dependant and if this is the case, no blurring will occur in the scene. For a single frame, set Start_Frame equal to End_Frame.
SamplesPerFrame is the number of sub-frame samples done for each frame (ie, the number of rendered images combined to make one frame). The lower the number, the quicker the render, but the lower the quality of the blurring. You really need to watch this one, as render times can blow up if this is left too high. To put it in perspective, a five minute render will turn into one hour with this parameter set at 12. An animation that takes 4 hours to do normally will now take 2 days to do at the same setting. This is the greatest weakness with POV-Blur - since all blurring is done outside of the renderer, no optimizations can be applied and render times rise linearly with the number of samples.
Always start with a conservative value, such as 5, and work your way up if needed. This may also need to be changed depending on the resolution of the final render - larger renders will generally need more samples in order to avoid banding in the image. Using POV-Blur may prove to be prohibitive if rendering large or long animations unless you have some brute CPU power to spare.
BlurLength can be thought of as the shutter time for each frame. The time that passes (by which I mean the amount the clock variable is incremented) between each successive frame can be thought of as the Clock Delta. This Clock Delta is multiplied by the Blur Length to find the amount of time across which each frame is blurred.
The sampling for each frame is arranged (time-wise) so that each frame is centred on where the normal (un-blurred) frame would be if produced using the internal POV-Ray animation loop. ie, each frame is made up of samples coming from (Clock_Delta*BlurLength)/2 on either side of where the normal clock value for that frame. Because of this, when rendering animations you will find that some samples will come a little before your Start_Clock and a little bit after your End_Clock ((Clock_Delta*BlurLength)/2 on either side to be precise). This behaviour may be changed in the future depending on feedback.
This can actually be controlled directly with the Start_Clock and End_Clock parameters when doing single frames. However, when doing animations, no other controls exist. Without this parameter, animations will smear across the entire Clock Delta for each frame and will produce overly streaky and blurred images. Also for this reason, setting BlurLength higher than 1.0 would not be a good idea (unless it's what you're purposely after).
See the Quick Start section for a small example.
My apologies if this explanation is a little vague. It will (hopefully) be much clearer when I do some diagrams, which I will include in the final set of docs. If anyone has any questions (or ideas on how I can explain this better), then please feel free to email me.
DisplayWhileDoingFrames and DisplayWhileDoingBlur controls whether or not POV-Ray will show a graphic display of its progress during the two phases of rendering, namely the sub-frame sampling and the final integration pass. It works exactly like setting the Display variable in an INI file or on the command line. You may wish to turn off the display if doing many samples for a frame but have it display the final pass.
.
By Chris Hernandez. Last updated Monday, 21 June 1999.