A Curve File Animation tool can be used to play back a viewpoint keyframe sequence, such as created by the Viewpoint Curve Editor tool. Play backs can be recorded to make Vrui movies and other videos. A Curve File Animation tool is bound to a single input device button. When first bound, the tool will pop up a file selected dialog where the user can select the curve file to play back (unless a fixed curve file name is pre-configured, see below). As soon as a curve file is loaded, the tool begins playback. Playback can be paused at any time by pressing the button to which the Curve File Animation tool was bound, and can be resumed by pressing the same button again. It is also possible to insert pre-defined pauses at certain times in the curve playback by preparing a pause file (see below).
All other navigation tools are disabled while a Curve File Animation tool is active, i.e., playback is not paused. Other navigation tools can be used while the tool is paused, and the tool will snap back to its current view when playback is resumed. Pauses allow a user to stop the predefined viewpoint path, explore at the current position, and then continue along the predefined path.
Curve File Animation tools can be configured by inserting a subsection into Vrui's configuration file; either by editing the main or user configuration files directly, or by merging a patch configuration file. The tool's subsection must be called “ViewpointFileNavigationTool,” and must be inserted as a subsection of the environment's tool subsection. For example, the proper subsection position when using the default Desktop environment is
section Vrui section Desktop section DesktopTools section ViewpointFileNavigationTool endsection endsection endsection endsection
The Curve File Animation tool will look for the following configuration file tags:
viewpointFileName
: The name of the viewpoint file to load when a Curve File Animation tool is created. If this tag has an empty value (the default), a newly created Curve File Animation tool will pop up a file selection dialog to select a viewpoint file.showKeyframes
: If this tag is set to true
(the default), the tool will draw an L-shaped icon for the next viewpoint keyframe in the sequence.pauseFileName
: The name of a file containing a sorted sequence of parameter values at which the Curve File Animation tool will automatically pause during playback, with one parameter value in seconds per line. The tool will resume playback if the button to which the tool is bound is pressed.autostart
: If this tag is set to true
, playback will start immediately when a Curve File Animation tool is created, or when a viewpoint file is loaded. If the tag is false
(the default), the tool will start in pause mode and wait for a press of its button to start playback.To hide the keyframe markers during curve playback, create a new section Tools somewhere inside section Vrui/Desktop:
section Vrui section Desktop ... section Tools section ViewpointFileNavigationTool showKeyframes false endsection endsection ... endsection endsection
This section Tool can be utilized in several ways. The new section Tool can be used to remove the keyframe markers while playing back the curve.
Here is Dawn's patch configuration file for doing so:
section Vrui section Desktop section DesktopTools section ViewpointFileNavigationTool endsection endsection section Tools section ViewpointFileNavigationTool showKeyframes false endsection endsection displaySize 7.5 inputDeviceAdapterNames (PlaybackAdapter) section PlaybackAdapter inputDeviceAdapterType Playback inputDeviceDataFileName Gale10001.dat # fakeMouseCursorDevice 0 mouseCursorSize (0.125, 0.2, 0.0) mouseCursorHotspot (0.03, 0.94, 0.0) mouseCursorNominalSize 36 # soundFileName SoundData0001.wav quitWhenDone true synchronizePlayback true saveMovie true movieFileNameTemplate /Users/sumner/Documents/Gale/gale%06d.png movieWindowIndex 0 movieFrameRate 30.0 endsection section Screen origin (-6.0, 0.0, -4.5) width 12.0 height 9.0 endsection section Window windowPos (0, 0), (1024, 768) autoScreenSize false panningViewport false navigate false endsection section Tools section ViewpointFileNavigationTool showKeyframes false endsection endsection endsection endsection