Rendering a Movie
Creating a movie requires two components: the visualization program and the flythrough path.
GraphicalProgramming describes the former, and
CreatingASimpleMovie and
MoviePathEditor describe the latter. This document describes how to put the two together.
A simple visualization program might look like this:
The Flythrough box will handle reading the movie file and determining the camera location. Create one from the "util" menu, and then open its command control panel:
In the "set file" command, press the "Browse..." button and select the flythrough file. Press the "Go" button to the left to load the file.
Notice that the Flythrough box now has four outputs. These correspond to the four streams in this particular movie file. Each stream output should be connected to the input it is designed to control. The connections to make are highlighted in red, and they are listed in the bottom pane of the window:
In this example, the simulation time output is connected to the Stars extractor and the Camera3D (to display it on the image). The "location" and "look" outputs are connected to the corresponding inputs on the camera, which will produce the desired camera motion. Pressing "Update" will display the initial state of the movie (time 0). Now we need to make the Flythrough's time input change, so that it will produce data that changes over time along the flythrough path. This is done using a Clock function, again found in the "util" menu. This will only control the movie time (not the simulation time), so it should be connected only to the Flythrough's "time" input.
To test it, we can change the time on the clock, press "Update," and see the result on the camera. So far, the camera's output is only seen on the screen. To save it to a file, create a
SaveImage? box from the "image" menu, and connect it to the camera, in parallel with the
DisplayImage?. This will allow us to both see the image and save it at the same time.
Two commands are provided. If you have multiple camera images to be saved for the same flythrough you may want to change the "id" parameter, which distinguishes the cameras in the resulting filenames. (The ID should automatically be set appropriately in most cases.) If you want to restart the movie, use the "reset" command to set the image numbering back to 0.
Now that everything is set up, we can render the movie. To do this, select the Clock and navigate to its "continue" command. Convert the framerate of your movie into a fraction of a second and enter this as the interval. For instance, if the movie were 10 seconds long at 25 frames per second (and 1/25 = 0.04), the final command should read "continue to 10 by 0.04". Press "Go" to generate the images, and then go to the next step,
GeneratingMovies.
--
TimPeterson - 13 Jun 2006