User Tools

Site Tools


keckcaves:making_movies_and_animations

Making Movies and Animations with VRUI Programs

Introduction

The purpose of this manual is to provide a step-by-step set of instructions for making different kinds of animations and movies with VRUI-based programs. This manual does not go into exhaustive detail, but rather is intended to provide an introduction the process that will give users the necessary familiarity with the tools and steps to proceed on their own.

Making movies and animations is at its most basic a three-step process and is essentially the same for LidarViewer, Crusta, and 3D Visualizer. The steps are:

  1. Recording - Your actions/interactions with data in the program are recorded.
  2. Playback - The actions/interaction captured by the Recording are played back automatically, and an image sequence is produced at a specified frame rate (usually 30 frames/sec)
  3. Compile and edit the movie using third party software (e.g., QuickTime Pro, iMovie, Final Cut Pro, etc.)

This set of instructions covers the Recording and Playback steps. There are many ways to convert an image sequence to a movie depending on which software is available, so this step is left to the user to figure out.

Two types of actions/interactions can be Recorded:

  1. Your interaction with the data (as when demonstrating a complex measurement method)
  2. A pre-programmed flight path through the data called a Curve File Animation

This guide to making movies and animations using VRUI programs will include:

  1. Making Curve File Animations
  2. Recording
    1. On desktop Systems
      1. 2D movies
      2. 3D movies
    2. In the CAVE
  3. Playback
    1. On desktop Systems
      1. 2D movies
      2. 3D movies
      3. Different input devices
    2. In the CAVE
  4. Miscellaneous hints and advice

1. Curve File Animations

Curve File Animations are pre-programmed flight paths for smoothly touring a dataset. The process for making Curve File Animations is essentially the same in LidarViewer, Crusta, and 3D Visualizer because the Curve File Animation Tool is actually a VRUI tool, like the Measurement Tool, and thus works the same in in all VRUI-based programs.

The Curve in Curve File Animation is a sequence of nodes or vertices tied to the data that record viewpoints that are connected by paths calculated to smoothly transition between the different views at each vertex. Constructing and editing a Curve is completed through the Viewpoint Curve Editor dialog.

Additional information and instructions for making Curve Files can be found here.

1.1 Opening the Viewpoint Curve Editor

If you are attempting to make a Curve File Animation, then presumably you are familiar with how and why tools are assigned differently in tracked vs non-tracked visualization environments. If not, please refer to the Wiki Manual for the program you are using.

In non-tracked systems:

  1. Press and hold an open key
  2. Utility > Viewpoint Curve Editor
  3. Release key
Open Viewpoint Curve Editor Curve Editor Dialog

1.2 Creating Curves

After opening the Viewpoint Curve Editor, the basic steps for building a Curve File are:

  1. Choose first view
  2. Append vertex
  3. Choose second view
  4. Append vertex
  5. Adjust path length (flight time between the vertices)
  6. Choose third view-and so on

When the Viewpoint Curve Editor opens, a green and red 'L' will appear at the center of the crosshairs (to see the crosshairs, simply left-click in the viewer window). The green segment indicates a vertex's up direction, the red segment indicates a vertex's forward direction.

New vertices are always placed at the center of the crosshairs, so you must move the data in order to append a new vertex at a new view. If you do not move the data, or if you only zoom (without panning) and press Append Vertex multiple times, multiple vertices will be stacked in the same location.

Appending Vertices

  1. Choose first view
  2. Click Append Vertex on the Curve Editor Dialog
  3. Navigate to second view
  4. Append Vertex, and so on
1. Choose View 1 and Append Vertex 2. Choose View 2 and Append Vertex

Changing Segment Length

The flight path between the View 1 and View 2 vertices is shown in grey. The default flight time for this Segment of the curve is 60 sec. Unless you are trying to keep pace with a glacier, you probably want significantly shorter flight time. This can be adjusted for any segment at any time, but its best to adjust this first because the default length for each subsequent segment is that of the segment preceding it, so you can save editing time by setting the default segment length immediately. To do this:

Using the Curve Editor Dialog

  • Move the Parameter Value slider to the left or right so that a vertex slides along the segment, which is now highlighted red (indicating that it has been selected).
Select segment of curve to edit Selected segment is highlighted red
  • Move the Segment Length slider to the left to shorten (or the right to lengthen). The Segment Length is given in seconds in the adjacent to the slider.
Adjust segment length (flight time)

Checking Viewpoints and Deleting Vertices

You can check the view recorded by individual vertices and delete vertices using the Curve Editor Dialog. To do this:

  • Select a vertex to check or delete by clicking the [<] and [>] buttons on either side of the Parameter Value slider. The selected vertex will appear red/green. Inactive vertices are yellow.
Select a vertex to move to or delete
  • To check the view, click Snap to View on the top of the Curve Editor Dialog. When the Snap to View button is highlighted, you can use the [<] and [>] buttons to jump from view to view at each vertex.
Move to the viewpoint recorded at a vertex
  • To delete a vertex, click Delete Vertex on the top of the Curve Editor Dialog.
Delete a selected vertex

Editing and fine tuning curves

You can preview the flight path recorded by a curve in two ways:

  • Click the Scrub button adjacent to the Parameter Value slider on the Curve Editor Dialog. Then slide the Parameter Value slider back and forth.
Preview viewpoints along the curve
  • Use the Parameter Value slider to navigate to a position along the curve, and click the Play From Current Position button on the Curve Editor Dialog.
Preview all or part of the Curve

Its possible to adjust the Segment Length while the curve is playing back or any time a segment is highlighted red.

IMPORTANT You must deselect the Play From Current Position button before you can use the Parameter Value slider to navigate the curve again.

Save curves periodically, or Load saved curves and continue to build or edit them using the buttons at the bottom of the Curve Editor Dialog.

Save or Load curves

1.3 Hints and tips for making Curve Files

Users! Please add content!!

Running the same Curve over different datasets in LidarViewer (and 3d Visualizer??)

It may be desirable to run the same Curve over different datasets, for example, when zooming in from a regional scale dataset to a local subset of that dataset to speed up Playback (see Section 3). As of LidarViewer 2.8, Curve Files are in dataset coordinates, which are determined by the spatial extent of the dataset, not the georeferenced location of the data. Thus, if you want to have the same Curve File run on two datasets, the two datasets must have the same spatial extent. This can be handled in two ways:

  1. Use the Measurement Tool and Selection Tool to find and select the points defining the maximum and minimum x, y, z values in the spatially larger dataset, then add them to the spatially smaller dataset using LidarPreprocessor. (You could also filter the dataset to find the exact 2 to 6 points that define the max and min, but a selection of a several hundred points that encompasses the max and min values will have the same result and is probably faster). You can do this after you build the Curve File, as long as it was built on the spatially larger dataset.
  2. Make up a point set that encompasses both datasets (i.e., is arbitrarily spatially larger) and add these points to all datasets using LidarPreprocessor. You must do this before creating the Curve File.

2. Recording

2.1 Introduction to Recording

It possible to record two types of interactions in VRUI programs:

  1. Your normal interaction with the data (as when demonstrating a measurement method)
  2. A pre-programmed Curve File (see Section 1 above)
  3. Both, in sequence.

To do this, you must add one of the configuration files below to the Terminal command line. To do this:

$<application> <input files> -mergeConfig <config file>

For example:

$ LidarViewer /path/to/lidar_data.lidar -mergeConfig /path/to/Vrui_Recording.cfg

Then, either:

  1. Interact with the data as you normally would
  2. Run a Curve File

To load a Curve File

  1. Press and hold an open key
  2. Navigation > Curve File Animation
  3. Release key
  4. Open saved Curve File
  5. Press and release assigned key
  6. Exit program when Curve File finishes, or continue the recoding by interacting with the data, or playing a different Curve File.
Load Curve File Animation

IMPORTANT As soon as you start the program with the recording config file appended, all your actions are being recorded. So don't dilly dally, because every second of Recording translates to several seconds of Playback, and 30 still frame images.

Additional details about recording can be found here.

2.2 Sample Configuration Files

To record sessions, copy and paste the necessary config files into separate text files named something intuitive, like Vrui_Recording.cfg or 3DTV.cfg.

2.2.1 2D Desktop Recording

Before recording, check and change if needed:

  • The output location for the Recording file:
  • inputDeviceDataFileName /path/to/RecordingFile.dat
  • The screen parameters:
  • origin (-12.0, 0.0, -6.5)
    width 24.0
    height 13.0
  • Full 2D Recording config file:
  • section Vrui
      section Desktop
      	displaySize 7.5
        inputDeviceDataSaver InputDeviceDataSaver
        maximumFrameRate 60.0
        
        section InputDeviceDataSaver
          inputDeviceDataFileName /home/pogold/Desktop/baja_tls_slicer_movie/baja_tls_slicer_movie.dat
        endsection
        
        section Screen
        	origin (-12.0, 0.0, -6.5)
        	width 24.0
        	height 13.0
        endsection
        
        section Window
    			windowPos (0, 0), (1024, 768)
          autoScreenSize false
          panningViewport false
          navigate false
        endsection
      endsection
    endsection
2.2.2 3D Desktop Recording

Recording for movies that will be shown on 3D displays requires two configuration files:

  1. Config file to specify 3D TV dimensions
  2. Config file to configure Recording (similar to the 2D Recording config)

In Terminal:

$ LidarViewer path/to/.lidar file -mergeConfig path/to/3DTV.cfg -mergeConfig path/to/3DRecording.cfg

3D TV configuration file

Before recording, check and change if needed:

  • The 3DTV size
  •    section Screen
         # For 32" 3D TV:
         origin (-14.0, 0.0, -7.875)
         width 28.0
         height 15.75
       endsection
  • If you are not actually doing the recording on a 3D TV or monitor, you can un-comment (remove the #) windowType to disable stereo, but this is not required:
  •      # For session capture:
           windowType Mono
  • Full 3DTV config file:
  • section Vrui
     section Desktop
    
       displayCenter (0.0, 0.0, 0.0)
       displaySize 16.0
       glyphSize 0.5
       frontPlaneDist 24.0
       drawOverlayWidgets false
    
       uiSize 0.15
       uiFontTextHeight 0.3
       uiSliderWidth 0.45
    
       section Viewer
         headDeviceTransformation translate (0.0, -48.0, 0.0)
         leftEyePosition (-1.25, 0.0, 0.0)
         rightEyePosition (1.25, 0.0, 0.0)
       endsection
    
       section Screen
         # For 32" 3D TV:
         origin (-14.0, 0.0, -7.875)
         width 28.0
         height 15.75
       endsection
    
       section Window
         # Go to 3D TV's native window size:
    
         windowPos (0, 0), (1920, 1080)
    
         # For session capture:
         # windowType Mono
    
    
         # For 3D video capture:
         windowType SplitViewportStereo
         leftViewportPos (0, 540), (1920, 540)
         rightViewportPos (0, 0), (1920, 540)
    
         autoScreenSize false
         panningViewport false
         navigate false
         movePrimaryWidgets false
       endsection
    
       section Tools
         section UserInterfaceTool
           drawRay false
         endsection
       endsection
     endsection
    endsection

3D Recording configuration file

Before recording, check and change if needed:

  • The output location for the Recording file:
  • inputDeviceDataFileName /path/to/RecordingFile.dat
  • If you are not actually doing the recording on a 3D TV or monitor, you can un-comment (remove the #) windowType to disable stereo, but this is not required:
  •      # For session capture:
           windowType Mono
  • Full 3D Recording config file:
  • section Vrui
     section Desktop
       inputDeviceDataSaver InputDeviceDataSaver
    
       section InputDeviceDataSaver
         inputDeviceDataFileName /path/to/Recording.dat
       endsection
       
       section Window
         # Disable stereo mode for recording
         # windowType Mono
       endsection
     endsection
    endsection
2.2.3 Recording in the CAVE

Recording in the CAVE is covered here.

2.3 Recording Tips and Hints

Users please add content!!

When recording Curve File Animations in LidarViewer, the recording can be made smoother by reducing the render quality of the dataset so your machine doesn't have to think as hard. This keeps jerkiness due to large memory usage out of the Recording. The full render quality is then used during Playback.

In Terminal, do:

$ LidarViewer -memoryCacheSize 512 -graphicsCacheSize 512 -renderQuality -4.0 /path/to/.lidar file -mergeConfig /path/to/Recording.cfg

3. Playback

3.1 Introduction to Playback

The Playback step plays back the .dat file produced during Recording and saves still frames for each second of the recording at a specified rate (usually 30 frames/sec). Once the program is started everything will happen automatically and you don't need to do anything. Because of the large volume of still images being saved, Playback can often take several time longer to complete than the actual length of the Recording.

In Terminal:

$ <application> <input files> -mergeConfig <Playback.cfg>

For example:

$ LidarViewer /path/to/.lidar file -mergeConfig /path/to/Playback.cfg

Additional details about Playback can be found here.

3.2 Sample Configuration Files

To record sessions, copy and paste the necessary config files into separate text files named something intuitive, like Vrui_Playback.cfg or 3DTV.cfg.

3.2.1 2D Desktop Playback

Before starting Playback, check and change if needed:

  • The location of the Recording .dat file
  • inputDeviceDataFileName /path/to/Recording.dat
  • Choose how to display the input device (controller)
    • Show mouse cursor input device in movie:
    • 			#fakeMouseCursorDevice 0
      			mouseCursorSize (0.125, 0.2, 0.0)
      			mouseCursorHotspot (0.03, 0.94, 0.0)
      			mouseCursorNominalSize 36
      			#device1GlyphType Cone
      			#device2GlyphType Cone
    • Show cones for Razer Hydra tracked wands in movie:
    • 			#fakeMouseCursorDevice 0
      			#mouseCursorSize (0.125, 0.2, 0.0)
      			#mouseCursorHotspot (0.03, 0.94, 0.0)
      			#mouseCursorNominalSize 36
      			device1GlyphType Cone
      			device2GlyphType Cone
  • Path to export location for still images
  • movieFileNameTemplate /path/to/still_image_folder_%06d.png
  • Screen size
  •     section Screen
        	origin (-12.0, 0.0, -6.5)
        	width 24.0
        	height 13.0
        endsection
  • Full 2D Playback config file:
  • section Vrui
      section Desktop 
     	displaySize 7.5
        inputDeviceAdapterNames (PlaybackAdapter)
        
        section PlaybackAdapter
          inputDeviceAdapterType Playback
          inputDeviceDataFileName /path/to/Recording.dat
    			#fakeMouseCursorDevice 0
    			#mouseCursorSize (0.125, 0.2, 0.0)
    			#mouseCursorHotspot (0.03, 0.94, 0.0)
    			#mouseCursorNominalSize 36
    			device1GlyphType Cone
    			device2GlyphType Cone
    		
          # soundFileName SoundData0001.wav
          quitWhenDone true
          synchronizePlayback false
          saveMovie true
          movieFileNameTemplate /path/to/still_image_folder_%06d.png
          movieWindowIndex 0
          movieFrameRate 30.0
        endsection
        
        section Screen
        	origin (-12.0, 0.0, -6.5)
        	width 24.0
        	height 13.0
        endsection
        
        section Window
    			windowPos (0, 0), (1024, 768)
          autoScreenSize false
          panningViewport false
          navigate false
        endsection
        section Tools
         killZoneRender false
       endsection
      endsection
    endsection
3.2.2 3D Desktop Playback

Similar to the Recording process, Playback for movies that will be shown on 3D displays requires two configuration files:

  1. Config file to specify 3D TV dimensions
  2. Config file to configure Playback (similar to the 2D Playback config)

In Terminal:

$ LidarViewer path/to/.lidar file -mergeConfig path/to/3DTV.cfg -mergeConfig path/to/3DRecording.cfg

3D TV configuration file

Before recording, check and change if needed:

  • The 3DTV size
  •    section Screen
         # For 32" 3D TV:
         origin (-14.0, 0.0, -7.875)
         width 28.0
         height 15.75
       endsection
  • If you are not actually doing the recording on a 3D TV or monitor, you can un-comment (remove the #) windowType to disable stereo, but this is not required:
  •      # For session capture:
           windowType Mono
  • Full 3DTV config file:
  • section Vrui
     section Desktop
    
       displayCenter (0.0, 0.0, 0.0)
       displaySize 16.0
       glyphSize 0.5
       frontPlaneDist 24.0
       drawOverlayWidgets false
    
       uiSize 0.15
       uiFontTextHeight 0.3
       uiSliderWidth 0.45
    
       section Viewer
         headDeviceTransformation translate (0.0, -48.0, 0.0)
         leftEyePosition (-1.25, 0.0, 0.0)
         rightEyePosition (1.25, 0.0, 0.0)
       endsection
    
       section Screen
         # For 32" 3D TV:
         origin (-14.0, 0.0, -7.875)
         width 28.0
         height 15.75
       endsection
    
       section Window
         # Go to 3D TV's native window size:
    
         windowPos (0, 0), (1920, 1080)
    
         # For session capture:
         # windowType Mono
    
    
         # For 3D video capture:
         windowType SplitViewportStereo
         leftViewportPos (0, 540), (1920, 540)
         rightViewportPos (0, 0), (1920, 540)
    
         autoScreenSize false
         panningViewport false
         navigate false
         movePrimaryWidgets false
       endsection
    
       section Tools
         section UserInterfaceTool
           drawRay false
         endsection
       endsection
     endsection
    endsection

3D Playback configuration file

As with 2D Playback, check and modify:

  1. Path to the Recording .dat file
  2. Input device display settings (see above)
  3. Path to export location for still images
  • Full 3D Playback config file:
  • ection Vrui
     section Desktop
       inputDeviceAdapterNames (PlaybackAdapter)
    
       section PlaybackAdapter
         inputDeviceAdapterType Playback
         inputDeviceDataFileName /path/to/Recording.dat
    			#fakeMouseCursorDevice 0
    			#mouseCursorSize (0.125, 0.2, 0.0)
    			#mouseCursorHotspot (0.03, 0.94, 0.0)
    			#mouseCursorNominalSize 36
    			device1GlyphType Cone
    			device2GlyphType Cone
    
         quitWhenDone true
         synchronizePlayback false
         saveMovie true
         movieFileNameTemplate /path/to/still_image_folder_%06d.png
    
         movieWindowIndex 0
         movieFrameRate 30.0
       endsection
    
       section Window
    
         showFps false
       endsection
    
       section Tools
         killZoneRender false
       endsection
     endsection
    endsection
3.2.3 Playback in the CAVE

Playback in the CAVE is covered here.

3.2.4 Hiding Curve File vertices for Playback

To hide the green/red Curve File vertices when playing back a recording of a Curve File Animation, you must add a few line to the Playback configuration file:

	section DesktopTools
        	section ViewpointFileNavigationTool
        	endsection
    	endsection

		section Tools
			section ViewpointFileNavigationTool
				showKeyframes false
			endsection
		endsection

So the modified 2D Playback config file would be:

  • 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 /path/to/Recording.dat
    			#fakeMouseCursorDevice 0
    			#mouseCursorSize (0.125, 0.2, 0.0)
    			#mouseCursorHotspot (0.03, 0.94, 0.0)
    			#mouseCursorNominalSize 36
    			device1GlyphType Cone
    			device2GlyphType Cone
    		
          # soundFileName SoundData0001.wav
          quitWhenDone true
          synchronizePlayback false
          saveMovie true
          movieFileNameTemplate /path/to/still_image_folder_%06d.png
          movieWindowIndex 0
          movieFrameRate 30.0
        endsection
        
        section Screen
        	origin (-12.0, 0.0, -6.5)
        	width 24.0
        	height 13.0
        endsection
        
        section Window
    			windowPos (0, 0), (1024, 768)
          autoScreenSize false
          panningViewport false
          navigate false
        endsection
      endsection
    endsection

And the modified 3D Playback config file would be:

  • ection Vrui
     section Desktop
    	section DesktopTools
            	section ViewpointFileNavigationTool
            	endsection
        	endsection
    
    		section Tools
    			section ViewpointFileNavigationTool
    				showKeyframes false
    			endsection
    		endsection
       inputDeviceAdapterNames (PlaybackAdapter)
    
       section PlaybackAdapter
         inputDeviceAdapterType Playback
         inputDeviceDataFileName /path/to/Recording.dat
    			#fakeMouseCursorDevice 0
    			#mouseCursorSize (0.125, 0.2, 0.0)
    			#mouseCursorHotspot (0.03, 0.94, 0.0)
    			#mouseCursorNominalSize 36
    			device1GlyphType Cone
    			device2GlyphType Cone
    
         quitWhenDone true
         synchronizePlayback false
         saveMovie true
         movieFileNameTemplate /path/to/still_image_folder_%06d.png
    
         movieWindowIndex 0
         movieFrameRate 30.0
       endsection
    
       section Window
    
         showFps false
       endsection
    
       section Tools
         killZoneRender false
       endsection
     endsection
    endsection

3.3 Playback Hints and Tips

Users please add content!!

keckcaves/making_movies_and_animations.txt · Last modified: 2012/06/20 14:42 by pogold