Advanced Animations
Introduction
This tutorial deals with advanced topics in animations.
The Animation View
- Open a data set. This example uses the training data disk_out_ref.exo, which can be downloaded at http://www.paraview.org
- On the Properties tab, select all variables and press the Apply button.
- Drag the cylinder around with the left mouse button.
- On the Display tab, select Color by V
- From the menu, select View, then Animation View. This will display the animation window on the GUI display. On the picture below, the animation view is highlighted in blue.
Camera Animation
- Open your data set and select the Animation View as described above.
- In the Animation View window, select the Camera option in the pull down menu and click the Plus icon next to it. This will add a time chart to the view which will allow you to manipulate the camera settings.
- Double click on the time chart. This will open an editing window for the camera. There should be two entries in the table. These indicate the starting and finishing times and positions of the camera.
- Click on the New button. This will add a keyframe between the start and the finish.
- You may change the time value of this keyframe by double clicking on the time entry and manually changing the time. This can be done for any of the keyframes.
- Let us change the camera value of the second entry. Keeping this window open, go back to the data set and move the disk to a desired position.
- Next, return to the Editing Camera table and double click on the second entry under the Camera Values column.
- Click on the Use Current button. This will set the camera values to the position that you manually moved the disk to. Alternatively, you may specify the values by populating the various fields. Press OK. Press OK again to close the Animation Keyframes window.
- Next, back at the Animation View, specify the Mode. If your dataset already has time steps built into the model you may want to select Snap to TimeSteps. If it does not you will have to select either Sequence, or Real Time. If you select Real Time you may want to modify the Duration setting. Similarly, if you selected the Sequence mode you will want to modify the No. Frames setting.
- Play the animation.
- Experiment by adding more keyframes and different camera angles.
Temporal Interpolator
- Open can.exo.
- Filters → Temporal → Temporal Interpolator. Apply.
- On the Animation View, change Mode to Real Time.
- Change the Duration to 100.
- Click the Play button.
Data Animation
In the previous example we showed how to manipulate the camera using the Animation View tools, in this example we will show how to animate your data set.
- Open your data set and select the Animation View as described above.
- In our example we are using the data set disk_out_ref.exo.
- This data set does not contain any time steps so it cannot be immediately animated.
- There are many ways to animate your data set. One simple way is to apply a Warp Vector.
- From the Filters menu option select Common → Warp Vector.
- On the Properties tab, select a Scale Factor of 0.5. Press Apply.
- In the Animation View window, select the WarpVector option in the pull down menu along with Scale Factor in the pull down menu to the right of it and click the icon. This will add a time chart to the view which will allow you to manipulate the data set.
- Double click on the new created time chart. It should be labeled WarpVector1 – Scale Factor. This should open the Animation Keyframes window containing two keyframe entries indicating the first and last keyframes.
- Press the New button to create another keyframe. By default ParaView adds the new keyframe with a time value in the middle of the two previous keyframes. You may modify that value to whatever you wish. The Value column is the Scale Factor of the Warp Vector filter that we are animating on. Try changing that value to 1. Change the interpolation to Sinusoid. Experiment changing the interpolation values and see what effects it has on the data set. Press OK. Press OK.
- Linearly (Ramp) interpolate from one key frame value to the next.
- When using Exponential interpolation, the key frame value will be interpolated from this key frame to the next one according to the specified exponential function. The Base, Start Power, and End Power must be specified; user interface controls for this appear when Exponential interpolation is chosen. The interpolation of the exponents is linear, so the interpolation from Base ^ Start Power to Base ^ End Power is exponential.
- The Sinusoidal interpolation type varies the value from this key frame to the next one according to the specified sine function. The Phase, Frequency, and Offset must be specified from the user interface controls that appear when Sinusoidal interpolation is selected.
- For Step interpolation, use the key frame value from the time this key frame takes effect until the time for the next key frame is reached. At that point, immediately use the next key frame value.
- Back at the Animation View window you will need to change the Mode to either Sequence or Real Time if you data set does not contain time steps. You also may want to change the No. Frames or Duration depending on the mode you selected.
- Play the animation.
- You may also combine multiple animations. Try adding a camera animation to make the camera pan around the data set as the warp vector animation is running.
Saving Animations
Once an animation has been created in ParaView, the animation may be saved as an AVI file or as a series of image files (JPEG, TIFF, or PNG), one image per animation frame. This functionality is available by choosing Save Animation from the File menu. When a movie file or series of images is saved, all of the views in the ParaView application window are captured. Additionally, the geometry per animation frame may be saved by selecting Save Geometry from the File menu. The data will be written out using ParaView's PVD file format.
Acknowledgements
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear Security Administration under contract DE-AC04-94AL85000.