Creating Quality Animations Without Filling Your Hard Drive
FLOW-3D allows users to generate animations in AVI format for both 2D and 3D results. Animations are an excellent way of presenting simulation results since they convey much more information than a static image and can be embedded in a PowerPoint presentation. However, file size can be an issue due to the large amount of information stored in an animation. Fortunately there are a number of things that can be done to create high quality animations while minimizing their size.
The size of an animation depends on a number of factors.
- Number of time frames
- Size of the screen captured
- Compression codec chosen
- Frame rate and key frames
Below is as description of the steps which can be taken to address each of these factors.
The greater the number of time frames captured in an animation, the larger the file will be but also the smoother the playback. Most animations will provide smooth playback with around 100 time frames. More than 100 frames is usually excessive and unnecessary. The number of time frames output during a simulation is controlled on the Model Setup, Output panel in the Time Interval box for either Restart Data or Selected data.
Animations can be captured using either Full Screen or Rubber Band Area. The "Rubber band area" feature can be used to capture only the part of the display window of interest. This essentially gets rid of the extraneous portions of the display that provide no additional information but increase the size of the animation.
As an example, an animation generated from the information shown in Figure 2 (using the "Cinepak codec by Radius" ) is 9 MB but is reduced to 6MB when the capture area is limited using "Rubber band capture." For 2D displays, selecting the checkbox for Rubber Band Area (see Figure 1) allows the user to select an area of the screen to capture. In 3D displays, select the Tools menu and then select Animation, Rubberband Capture (see Figure 2). You will then be prompted to select the area of the screen to capture.
The greatest reduction in animation file size comes from video compression. Video compression is performed by utilities called codecs. The term codecs is an acronym for compression decompression. After the images of all the time frames have been created, a dialog will appear which allows a codec to be chosen.
Video compression dialog box
By default, Uncompressed video will be generated. Typically this produces very large file sizes (~100s of megabytes). Choosing common codecs such as Microsoft Video 1 or Cinepak will reduce the file size by at least a factor of 10 to 20, resulting in animations around 10 to 20 MB. The advantage of using these common codecs is that most Windows computers have them installed and will be able to play the resulting animations. The disadvantage is that the amount of compression is less than what can be achieved by more modern codecs.
Modern codecs such as DivX, XviD, and MPEG4 can be downloaded free from http://www.free-codecs.com/.
These codecs can typically reduce the animation file size by 100, so animations will often be less than 1 MB. The disadvantage of using modern codecs is that they are not installed on Windows by default so any computer you wish to play the animations on will need to download them. Animations can also be recompressed using converters such as the freeware "Any Video Converter" available from http://www.any-video-converter.com/download-avc-free.php.
Once a codec is chosen, options for Key Frame rate and Data Rate may be presented.
Key frame rate
Key frames represent the frequency at which anchor images occur in the animation. Images between key frames are more compressed than key frames to reduce the file size. The more key frames that are chosen, the larger the file size. The fewer the key frames, the smaller the animation but the images tends to be fuzzier.
|Figure 1: Rubber band capture in 2D display|
The Data Rate can be specified to reduce the file size but often creates a jumpy or fuzzy animation. It is recommended that the Data Rate checkbox be left unchecked for the best quality animation.
|Figure 2: Rubber band capture in 3D display|