Graphics.DspSimdataRecord - lordmundi/wikidoctest GitHub Wiki
« Using Custom Data Formats With the Simdata Plugin | EDGE User’s Guide | Ignoring Nodes on DOV Movie Playback »
- Open the simdata dialog and connect to your simulation data source (either live or recorded)
- Queue up the portion of the simulation data you wish to record, and click the red record button to record node motion. Click it again to stop recording. This will save a .dov file.
- Load the .dov file that was just recorded as the new data source. See below for the default storage locations
- Click the down arrow next to the recording button and select "Output to jpg" or png.
- Click the folder icon to select a directory where to store the frames.
- Turn on any advanced lighting features you may want on for your movie.
- Click "Record Frames" to start the frame-by-frame rendering.
- After it has finished, click "Encode Frames" to compile the frame list into a playable movie file (this will only show up if you have the proper encoding tools installed - otherwise just use manual commands to compile the frames into a movie file).
The simdata plugin has a basic recording feature that can be used to record a Doug scene to either a Doug recording file (DOV), or to a set of individual frames (.jpg or .png) which can then be assembled into a movie. The two types of recording are intended for two different purposes.
DOV files track changes to Doug node attributes such as position and attitude. Since DOV files do not have to represent the visual sense of a scene, this information can be captured quickly, typically in real-time without adversely affecting playback of a live sim or interactive movement. Once captured, a DOV file can be loaded back into simdata and viewed from any camera or angle with full user interaction (zoom, pan, speed up, slow down etc.) and no loss of quality. Since DOV files capture only node attribute changes, however, playback requires the same set of models to be loaded into Doug that was used during initial capture.
Exporting to a set of frames allows fairly high-quality movies to be produced from within the simdata plugin, by creating an image for each frame. The images can then be strung together into a movie using a tool such as ffmpeg or mencoder. Individual frames cannot typically be produced at reasonable frame rates and sizes in real-time. The usual procedure for recording a movie is thus to capture the real-time data in a simdata-compatible file (either DOV or a supported Trick format), then load the file into simdata and generate individual frames.
Sim data visualization interface
One-touch record provides a convenient way to perform a recording with minimal user intervention. Operation is simple: click the record button to begin recording with the default settings, and click it again to end the recording and save it to disk. While recording the record button will change from a plain red disk to a red disc with a green center to indicate that recording is active. The current default settings record a DOV file with a default filename dependent on the OS. Current default filenames for EDGE v2.2 are:
- /tmp/default_movie.dov on Linux
- $HOME/default_movie.dov on OSX
- \default_movie.dov on Windows
NOTE: In EDGE v2.3, these were updated to include the username, such as "default_movie_.dov"
Once a recording has been made, it can be loaded back into simdata and played back like any other file source.
Simdata during one-touch recording
Clicking the down arrow next to the record button opens up the recording settings pane. Here you may set a recording filename, recording type, and recording options, as well as controlling more advanced options such as multi-segment recordings.
Simdata with recording setting pane
The content of the recording setting pane varies based on the recording type, which is set on the left side of the setting pane. Current options include DOV for recording real-time movies and two image formats, PNG and JPG, for creating higher-quality off-line movies. The introduction above explains the intended purposes of these formats in more detail.
For DOV (real-time) movies, the left side of the recording pane controls the output filename. The user may specify an output filename either by editing the filename and hitting Enter, or by choosing a file to overwrite using the file icon.
The right side of the recording setting pane allows recording multi-segment movies. This is analogous to recording a home movie with multiple scenes. One use case for this capability is where there are several shorter time periods of interest in a sim (e.g. a launch and a docking), separated by long periods that are not of interest (e.g. orbiting with little change in the sim parameters). Rather than record the whole sim, it may be more effective to record a segment for each period of interest, resulting in a much shorter movie.
Simdata during Segment Recording
The procedure for segment recording is as follows.
- When it is time to record the first segment, press the Segment Recording button (this is the red button labelled "S" to distinguish it from the main record button). The main record button will now have a green center to indicate that recording is active. Note that the seg time does not update while recording is taking place. This is normal. Provided the main record button shows red and green, recording is taking place.
- When the end of the segment is reached, press the Segment Recording button. The main record button and segment record button will now have a yellow square around it to indicate that we are in the process of making a recording, but the recording is "paused." The seg time will indicate the length of the segment just recorded (the "current" segment), and the three segment action buttons will become active with the following meanings.
- The segment play button will replay the current segment.
- The segment forward button will mark the current segment as completed, and move to a new segment in preparation for recording.
- The save button will end the recording and save all segments including the current segment to the output file.
- If you want to record over the current segment because you were not quite happy with its contents, simply press segment record when ready without pressing segment forward.
- If there is another segment to record, press the segment forward button to move to a new segment, then press segment record to start recording the new segment. When segment forward is pressed, the segment number will increment to indicate that you are now on a new segment.
- When all segments have been recorded, press save to save all segments to the output file.
Simdata Recording to Frames
Recording frames works from a pre-loaded source. Indeed, some members of the EDGE development team like to think of simdata off-line recording as "playing to frames" since recording in this way captures snapshots of each playback frame as an image. The snapshot images are written sequentially to a directory and can then be assembled into a movie by tools such as mencoder or ffmpeg. As noted, the output from "play to frame" is not a single file, but rather a directory of images. Thus rather than choose a filename, the user chooses a directory to which the image frames will be written.
The procedure for recording a high-quality movie is thus:
- In the Recording Settings pane, set the output type to either "jpg" or "png".
- If not using a .dov file, set the API file as appropriate for the source data file
- Load the source data file, either produced from a sim (.trk, .csv, .h5) or from an earlier DOV recording. (NOTE: The DOV recordings are preferred since they can interpolate data between frames to allow for smoother motion. It also allows you to record camera motion and reconfigs which don't usually come from the sim.)
- Select the output directory for the frames (you may want to use /tmp/ as fast disk access and a large amount of space may be needed)
- Adjust output options such as FPS and resolution to your liking
- Turn on higher quality settings, such as advanced lighting features (playback is not real-time, so turn it all on!)
- Press "Record Frames"
- Once recording is complete, you may optionally press "Encode Frames" to bring up a encoding command which will attempt to combine the frames into a movie.
Depending on the hardware configuration and the options chosen, producing the movie may take some time. Recording can be ended at any time by pressing the record button, however be aware that if you have stopped recording and wish to restart it, you will need to use the "custom start frame" option to tell simdata what frame number to begin with. The appropriate frame number can be deduced from looking at the sequence of frames already produced.
« Using Custom Data Formats With the Simdata Plugin | EDGE User’s Guide | Ignoring Nodes on DOV Movie Playback »