Recording and playing camera paths

Gaia Sky offers the possibility to record camera paths out of the box and later play them. These camera paths are saved in a .gsc (for Gaia Sky Camera) file in $HOME/.gaiasky/camera.

Camera path file format

The format of the file is pretty straightforward. It consists of a .gsc file with white spaces as delimiters, each row containing the state of the camera and the time for a given frame. The state of the camera consists of 9 double-precision floating point numbers, 3 for the position and 3 for the direction vector and 3 for the up vector.

The reference system used is explained in the Internal reference system section. The units are 1*10^{-9} m.

The format of each row is as follows:

  • long - Time as defined by the getTime() function of java.util.Date (here).

  • double x3 - Position of the camera.

  • double x3 - Direction vector of the camera.

  • double x3 - Up vector of the camera.

Recording camera paths

Gaia Sky offers two possibilities as to how to record a camera path: real time recording and keyframes.

Real time recording

In order to start recording the camera path, click on the rec-icon-gray REC button next to the Camera section title in the GUI Controls window. The REC button will turn red rec-icon-red, which indicates the camera is being recorded.

In order to stop the recording and write the file, click again on the red REC button. The button will turn grey and a notification will pop up indicating the location of the camera file. Camera files are by default saved in the $HOME/.gaiasky/camera directory.

Keyframe system

The keyframe system offers the possibility to create keyframes at specific positions from which the camera file will be generated. In order start creating a keyframed camera path, click on the |rec-key-icon-tray| REC button. A new window will pop up from which you’ll be able to create and manage the keyframes.

Keyframes can be saved and loaded to and from .gkf files. These files only contain the information on the keyframes themselves. Once the keyframes have been created, they can be exported export to a .gsc camera path file.

A graphical representation of keyframes is displayed in the 3D world. Keyframes can be selected and dragged with the right mouse button.

In order to generate the camera file, two types of interpolation are available: Catmull-Rom splines and linear interpolation. Catmull-Rom splines produce smoothed paths which hit every keyframe. In this mode, keyframes can be seams seam, meaning that the path is broken at that point.

Playing camera paths

In order to play a camera file, click on the play-icon PLAY icon next to the REC icon. This will prompt a list of available camera files in the $HOME/.gaiasky/camera folder.

You can also combine the camera file playback with the frame output system to save each frame to a JPEG image during playback. To do so, enable the Activate frame output automatically checkbox in the preferences dialog as described in the Camera recording section.