Animation Animation icon
The Animation tool allows saving and restoring
scenes in Chimera, placing scenes along a
timeline, and
recording a movie of the resulting animation.
See also:
Movie Recorder,
Demos,
Rapid Access,
Chimera sessions,
making movies
** Not all aspects of Chimera are included in scenes
and/or handled correctly in Animation transitions
(see limitations). **
There are several ways to start
Animation, a tool in the Utilities category.
Clicking Preferences opens the
Animation
preferences.
Close dismisses the Animation dialog, and
Help opens this manual page in a browser window.
Scenes
A Chimera scene includes:
- locations and orientations of models and clipping planes
(etc., as in a saved
position)
- display styles, colors, and visibilities of molecule models,
molecular surfaces, and their parts
- volume
displays
- axis, plane,
and centroid representations
- 3D labels, 2D labels,
color keys
- CASTp pocket display
- certain global parameters such as
background,
lighting, and
effects
Scenes do not include all aspects of Chimera.
Scenes increase session
file size.
Clicking the plus icon in the
Scenes section of the the Animation dialog
saves the current state of Chimera as a scene and generates a thumbnail image
to represent it. Clicking the thumbnail restores the corresponding scene.
Scenes can also be saved and restored with
the scene command, or
restored from Rapid Access.
Right-clicking a scene thumbnail raises a context menu with the options:
- Add to timeline
- append the scene to the timeline
- Properties - open a dialog for editing the scene name and description
- Update - overwrite the scene with the current state of Chimera
- Delete - delete the scene*
*
Deleting a scene also removes its occurrences
from the
timeline.
Clicking a scene thumbnail not only restores the scene in Chimera
but also chooses the scene (highlights the thumbnail) in the dialog.
Multiple scenes in a contiguous block can be chosen by
clicking the first (or last) thumbnail in the block
and then Shift-clicking on the last (or first) thumbnail.
Ctrl-click toggles the state of a single scene.
The chosen scene(s) can be collectively:
- deleted* by clicking the minus icon
in the Scenes section of the dialog
- appended to the timeline by clicking the plus icon
in the Timeline section of the dialog
Keyframes, Actions, and Timeline
A keyframe is simply a scene
in the context of a timeline.
Each keyframe is associated with a preceding transition
of one or more display frames.
The timeline may also contain actions, or
operations in Chimera other than transitions between keyframes.
Available Actions:
- Rock - oscillating rotation
- Roll - continuous rotation
In Animation,
a scene or an action
can be inserted into the Timeline by drag-and-drop,
or a scene can be appended with Add to timeline in its
right-click menu.
One or more chosen scenes
(or similarly, an action chosen by clicking its thumbnail)
can be appended to the timeline by clicking
the plus icon above the timeline.
Keyframes and actions can be repositioned along the timeline by:
- dragging, where Shift-dragging also moves any
subsequent (rightward) keyframes and actions in parallel
- editing duration, which will also
move any subsequent (rightward) keyframes and actions in parallel
Giving the first (leftmost) keyframe a duration > 0 frames
indicates repeating its contents accordingly,
since there is no preceding keyframe
to define a transition; this is indicated with a gray rectangle
extending from the start of the timeline to the keyframe position.
The timeline contents can be played back to
preview the movie that would result from recording.
Right-clicking a keyframe or action thumbnail
raises a context menu with the options:
- Properties - edit properties
of the action, or for a keyframe, the preceding transition
- Delete - remove the keyframe or action from the timeline
Keyframe/action properties:
- Duration
- Duration in frames - number of frames; if changed, all
subsequent (rightward) keyframes and actions will shift accordingly
- Nth frame for discrete transitions
- frame at which discontinuous changes should occur
Properties that change continuously include: model orientations and scale;
clipping plane positions;
colors and display states (faded in/out with transparency) of atoms, ribbons,
and molecular
surfaces; colors, display states, and
positions of 2D labels.
Discontinuous changes include those in
atom/bond styles
and volume
displays.
Transitions between different frames of a
trajectory
will linearly interpolate the trajectory frame number but use only
integer values, thus duplicating or skipping trajectory frames
as needed to produce the specified duration.
- Parameters - action-specific settings
- for Rock:
- Angle to rock through (default 60°)
- Axis of rotation (x/y/z)
- Times to rock (default 1)
- for Roll:
- Degrees to rotate (default 360°)
- Axis of rotation (x/y/z)
- Precess around axis (true/false)
- whether to also rotate around a moving axis
that is carried along by the main rotation (see the
Wobble motion movie in the
Chimera Animation Gallery)
- Precession tilt (default 10°)
- the angle between the moving axis and the main axis of rotation
Clicking a thumbnail in the timeline chooses the keyframe or action
(highlights the thumbnail).
Multiple keyframes/actions in a contiguous block can be chosen by
clicking the first (or last) thumbnail in the block
and then Shift-clicking on the last (or first) thumbnail.
Ctrl-click toggles the state of a single keyframe or action.
The chosen keyframes/actions can be collectively:
- removed from the timeline by clicking the minus icon
in the Timeline section of the dialog
- dragged in parallel along the timeline
Timeline display can be:
- expanded by clicking the zoom-in icon
- subsequently restored to the original size by clicking the zoom-out icon
Playback
In Animation,
a red vertical line (the scrubber)
indicates playback position on the timeline.
Double-clicking a keyframe thumbnail moves the scrubber to that keyframe
and restores the corresponding scene in Chimera. Other playback features
are provided by clickable icons:
icon meaning
play animation; switches to a pause icon
during playback, and if playback is paused, to a resume-play icon
advance playback by a single display frame
toggle looping during playback (brighter icon when on)
During playback, the target display rate is set to 25 frames per second,
to match as closely as possible the speed of the movie
that would result from recording with default
encoding options
(details...).
Recording
Clicking the recording icon
in the Animation dialog
opens a dialog with movie settings. After the necessary inputs have been
specified, clicking Record initiates playing and recording the animation
(as defined in the timeline) from start to finish.
Recording in progress is indicated by a brighter icon,
which can be clicked to abort the process; otherwise, the resulting
series of images will be encoded into a movie file.
Settings:
- File name - name for the resulting movie file
- File type (movie format) choices:
- H.264 [.mp4]
- VP8/WebM [.webm]
- Theora [.ogv]
- Quicktime [.mov]
- AVI MSMPEG-4v2 [.avi]
- MPEG-4 [.mp4]
- MPEG-2 [.mpg]
- MPEG-1 [.mpg]
- WMV2 [.wmv]
- APNG [.png] - animated PNG
(lossless, settings for quality and
bitrate
do not apply)
- Rendering:
- Chimera (default)
- Chimera rendering, normally offscreen
(details...).
Images can be supersampled, that is, initially generated at a
higher resolution and then sampled down to the final size.
- Supersample (1x1/2x2/3x3/4x4)
- how many pixels to sample in the X and Y dimensions for each pixel in
the final saved image; thus, 1x1 corresponds to no supersampling.
Higher values increase the smoothness of edges in saved images and
increase calculation time with little effect on file size.
3x3 is generally recommended when supersampling is done.
- POV-Ray
- raytrace with POV-Ray.
This rendering option is the slowest but includes fancier effects
such as high-quality shadows.
The POV-Ray Options button opens the corresponding
preferences.
Advanced Options:
- Quality (highest/higher/high/good/medium/fair/low)
- higher quality corresponds to higher (variable) playback bit rates and
a larger movie file, assuming the same window size and movie frame rate
- Image format - image file format
(however, PNG will be used regardless of this setting if
raytracing is done):
- JPEG [.jpeg]
- PNG [.jpeg]
- PPM [.jpeg] (default)
- Additional recording options
- options are the same as for the command
movie
record; if this field is left blank, image frames will be saved
with default names in a default location
(but normally deleted after movie encoding, depending on the encoding options)
- Additional encoding options
- options are the same as for the command
movie
encode; if this field is left blank,
the movie will be encoded to play at 25 frames per second,
and image frames will be deleted after the movie has been encoded
Close closes the dialog without initiating recording.
Image Tips shows the
tips
on preparing images, and
Help opens this manual page in a browser window.
Animation Storyboard
Clicking the storyboard icon
in Animation
opens a dialog for specifying a directory in which to save storyboard files.
The files include index.html,
with HTML title as specified in the save dialog,
and three files for each scene in the
timeline:
- scene_name.html - WebGL
export
- scene_name.png - full-sized image
- scene_name_tn.png - thumbnail image
The storyboard can be viewed by opening
index.html (which embeds the
remaining files) in a browser window. A small example is shown at right.
Across the top are thumbnails of the keyframes
in the order in which they appear in the timeline, with consecutive
keyframes that are the same scene collapsed into a single entry.
The central panel shows either the static image or the 3D-manipulable
WebGL
rendering of a scene. Clicking a thumbnail or navigating the series
of thumbnails with the keyboard left and right arrows updates the central
panel to the static image of the corresponding scene.
Pressing the l (letter ell)
key or clicking Load 3D Data loads the corresponding WebGL data into
the central panel. When WebGL is shown, the corresponding static image can
be obtained again by clicking Load Image,
or by clicking in the browser window outside of the central panel
and then pressing the i key.
Limitations
Several problems with scenes and/or Animation
have been reported, including those related to:
- gradually fading out surfaces
- trajectory playback with molecular surfaces
- molecular surface if atoms added or deleted
- hiding/showing
PipesAndPlanks
representations
- Color Zone
- saving symmetry copies
(e.g. from sym)
in a scene
- saving markers
in a scene
- saving a session
with a molecular surface in a scene
UCSF Computer Graphics Laboratory / December 2021