Saving Images
Images can be rendered directly with Chimera or
raytraced with POV-Ray
using File... Save Image
or the copy command.
See also:
tips on preparing images,
making movies,
exporting a scene
The top section of the Save Image dialog contains a file
browser for specifying output location, File name, and
File Type. Formats include:
- EPS - Encapsulated PostScript
- JPEG - see JPEG quality
- PS - PostScript
- PNG (default)
- raytracing always produces this format
- PPM
- TIFF - LZW-compressed
- TIFF-fast - uncompressed (larger files)
Additional format options for the
stereo pair mode
are stereo JPEG (*.jps) and stereo PNG (*.pns).
Viewing such files as standard JPEG and PNG shows side-by-side images,
but special viewers are available to show them as stereo.
Free viewers include
StereoPhoto Maker and
JPSViewer.
Several dialog settings such as the
supersampling level and
print resolution are saved in the
preferences file.
Image Size:
- Use print units (default off)
- whether image width and height are expressed in
in physical units of length rather than pixels
- Units (pixels by default, but
centimeters/inches/millimeters/points if
using print units)
- units in which image width and height are specified; all except pixels
are units of length (72 points = 1 inch)
- Image width - image width in units
(default is the current pixel width of the
graphics window)
- Image height - image height in units
(default is the current pixel height of the
graphics window)
- Adjust field of view
- when using print units,
whether to compute the image field of view from the specified image width
instead of the graphics window width.
This may provide a better sense of depth.
- Maintain current aspect ratio (default on)
- whether to constrain the image width/height ratio to match
the width/height ratio of the
graphics window. If so,
changing the image width automatically adjusts the height and
vice versa; if not, the width and height can be changed independently.
The Grow to Fit button resizes the graphics window
to match the image aspect ratio by increasing one window dimension
(i.e., width or height),
while Shrink to Fit resizes the graphics window
to match the image aspect ratio by decreasing one window dimension.
If the window has not been grown or shrunk to match the image aspect ratio,
a saved image will include more than what is displayed.
- Print resolution (dpi)
(default 100.0)
- when image dimensions are expressed in
print units, they are converted
to inches internally and multiplied by this value
to give the output pixel dimensions.
Image Options:
- JPEG quality (integer value in the range 5-95, default 90)
- quality setting for JPEG output;
higher values give larger files
- Supersample
(1x1/2x2/3x3/4x4)
- how many pixels are sampled in the X and Y dimensions for each pixel in
the final saved image.
Higher values increase the smoothness of edges in saved images
and increase calculation time with little effect on file size.
- Image camera mode - stereo/mono options
- same as screen (default) - use the current
camera mode of the graphics window
for the image. If the mode is sequential stereo,
two separate image files (left-eye and right-eye views) will be saved.
- lenticular - regardless of the graphics window camera mode,
save multiple separate images of views from slightly different angles
for combination into a lenticular image;
how many images to save is set below
- stereo pair - regardless of the graphics window camera mode,
save a cross-eye stereo pair as a single image
twice as wide as the
specified size, optionally using one of the
special stereo formats.
(To save a wall-eye stereo image, set the graphics window
to that camera mode and use the
same as screen image mode instead.)
- Number of lenticular images
(default 12) - number of separate images to save when using the
lenticular mode.
The files will be named by appending
a number to the specified file name, before any file type suffix.
- Raytrace with POV-Ray (true/false)
- whether to raytrace with POV-Ray
rather than rendering directly with Chimera. If so, the image
will be saved in PNG format.
First, POV-Ray input files containing the scene (*.pov)
and raytracing options (*.ini) are generated, and then
the raytracing calculation is run as a background job
that can be monitored or canceled using the
Task Panel.
The POV-Ray Options button opens the
POV-Ray Options
preferences.
- Save temp session in case of image-save crash
- whether to save a temporary session
file in case of image-saving failure or crash. If there is no failure,
the temporary file will be removed automatically; if there is a failure,
at the next Chimera startup, the user will be given the option of
restoring the session.
Image Description
- text annotation to be placed in the saved image file (does not affect
image appearance).
Clicking Image Credits opens the
Image Credits preferences.
Clicking Save dismisses the dialog and initiates saving the image,
whereas Close simply dismisses the dialog.
Clicking Citing Chimera shows
how to credit Chimera,
Tips shows the tips on preparing images, and
Help opens this manual page in a browser window.
Chimera performs offscreen rendering as permitted by the system.
Offscreen rendering is not supported by
certain older machines. On those systems,
the image will be redrawn in the graphics window, piece by piece
depending on the specified image size
and degree of supersampling;
during this process,
the graphics window should not be obscured by other windows or moved
offscreen, even partially.
Tips on Preparing Images
The following mostly pertain to rendering high-quality images
directly with Chimera.
While raytracing
can give a more dramatic appearance,
it is often the case that clearer and more illustrative images
can be obtained by rendering directly with Chimera.
The tutorials
include step-by-step examples of preparing images in Chimera.
Many display styles and
colors are available.
Presets
are predefined combinations of display settings.
A preset can be applied by choosing it from the
Presets menu
or by using the preset command.
Further changes can be made after a preset has been applied.
Two categories of presets are available:
interactive - for interactive viewing in Chimera
publication - for making publication/presentation images
Publication presets make the background white, increase smoothness,
and adjust display styles, without changing which items are displayed
or their colors. Currently presets cannot be user-defined,
but a similar result can be achieved by creating an
alias from commands that specify
the desired settings.
Background color is set to white by the
publication presets mentioned above,
but can be set to any color
with the Color Actions dialog,
the background command, or
the Background preferences.
The latter two can also set the background to a gradient of multiple colors
or to an image read from a file.
If system hardware permits, background transparency can be enabled with
the Effects tool.
Silhouette edges
are outlines that emphasize borders and discontinuities.
Although shown in the interactive display, these are mainly intended
for output images (supersampling
makes them look much smoother in the image than on the screen).
Silhouette edges and their thickness and color can be controlled
with the Effects tool or
the set command.
Publication presets #1 and #2 turn on silhouette edges
and turn off depth cueing.
Depth cueing is progressive shading from front to back,
also known as fog.
It can be controlled
with the Effects tool or
the set command.
The depth cueing color tracks the background color by default,
but it can be changed independently with
the Color Actions dialog,
the Effects tool, or
the set command.
Publication presets #3 and #4 turn on depth cueing
and turn off silhouette edges.
Lighting. Chimera lighting modes may include
ambient (nondirectional) light and/or up to three directional lights:
ambient - ambient-only, giving an unshaded, flat appearance
single - single directional light + ambient
two-point - two directional lights + ambient
three-point - three directional lights
A simple, line-drawing-like appearance can be achieved by combining the
ambient mode with publication preset #1 or #2
(white background, silhouette edges).
Lighting mode, brightness, contrast, and light directions can be controlled
with the Lighting tool and
lighting command.
Shininess.
Setting quality to glossy
in the Intensity
section of the Lighting tool
makes everything look smoother and shinier;
whether this option is available depends on the graphics driver.
Even if glossy lighting is not available,
specular highlights can be adjusted in the
Shininess section.
Lighting and shininess can also be adjusted with the
lighting command.
Smoothness
can be increased by increasing the pixel dimensions
of an image (its resolution). Additionally, independent of resolution:
- Atoms, bonds, ribbons.
Display styles
other than wire (which is not recommended for publication images)
can be smoothed by raising the subdivision quality
with the Effects tool or
the set command.
This setting also affects curved geometric objects
defined in BILD format.
- Surfaces. The smoothness of a
molecular surface
can be increased by increasing its vertex density
with the command setattr,
the Selection Inspector,
or the molecular surface attributes panel
(see also the New Surfaces
preferences.) Separate smoothing options are available in
Multiscale Models and
Volume Viewer for the surfaces they create.
- Supersampling.
The smoothness of edges in saved images can be increased by supersampling,
where Chimera automatically saves an image at higher resolution (larger
pixel dimensions) than requested and then samples it back down
to the requested final size. The default level of supersampling, 3x3, is
usually recommended for publication images and gives much smoother edges
than no supersampling (1x1). For individual images, the supersampling level
is specified in the Save Image dialog
or with the copy
command's supersample keyword.
The command movie record,
the Movie preferences, and
the MD
Movie recording dialog also include supersampling options.
Supersampling increases calculation time with little effect on file size.
A potential disadvantage of over-supersampling is that lines
such as silhouette edges
or hydrogen-bond representations in the
final images may become unacceptably thin because there is a limit
to how wide they can be in the initial images.
The File... Save Image dialog reports the effective maximum linewidth.
It may be possible to achieve the desired thickness by reducing
the supersampling level and/or the pixel dimensions of the image.
Transparency.
By default, only the topmost layer of all transparent items is shown.
This is recommended because it simplifies the display and effectively
de-emphasizes those parts. Whether a single transparent layer or multiple
layers is shown can be controlled
with the Effects tool
and the command set.
- Surfaces
(surface models)
can be made transparent without otherwise changing their colors using
the Actions... Surface menu.
Setting quality to glossy
in the Lighting tool
gives angle-dependent transparency, i.e., makes surface triangles
appear more opaque when viewed edge-on;
whether this option is available depends on the graphics driver.
- Atoms, bonds, and ribbons
can be made transparent without otherwise changing their colors using
the command transparency,
or they can be assigned transparent colors directly.
These more general approaches also work for surfaces.
A transparent color can be defined in the
Color Editor and applied using the
Actions... Color menu or
various coloring commands.
Transparent colors can also be specified in commands by name
(previously assigned with colordef)
or as four comma-separated values (red, green, blue, and opacity
components, each in the range 0-1).
- Geometric objects defined in BILD format
can be made transparent with the .transparency directive.
Clipping planes
cut away portions of structures, surfaces and objects.
The global clipping planes
shown in the Side View
affect all models and can only be perpendicular
to the line of sight. In addition, each model can have a
per-model clipping plane
oriented at any angle.
Surface
Capping controls whether clipped surfaces appear solid or hollow.
Labels and Arrows.
2D text, symbols,
and arrows of multiple colors and sizes can be added to the display with the
2D Labels
tool (or command 2dlabels).
Such 2D annotations are drawn in front of any displayed objects
and do not move when the objects are moved.
By contrast, the standard Chimera labels (shown with the
Actions... Label menu or
commands label and
rlabel)
are tied to atoms in 3D, and their font and size can only be set collectively,
in the Background preferences.
The spatial offsets of these “3D” labels can be controlled with
label/rlabel and
adjusted interactively with the mouse.
However, by default (see the
Background preferences),
they will be drawn in front regardless of their Z-offsets.
Spacefilling 3D objects including arrows can be created
with the command shape
or in BILD format.
Color Keys.
A color key shows how a coloring scheme relates to quantities.
Such coloring schemes are applied by various tools, including
Render by
Attribute.
Color keys suitable for publication images can be created with the
Color
Key tool.
Ribbon path. By default, the ribbon path is a smoothed spline
that may deviate from the true positions of the backbone atoms,
making bonds to sidechains appear unnaturally short or long
(details...).
The path calculation can be adjusted with the command
ribspline,
the molecule model attributes panel,
and the Selection Inspector.
For proteins,
a cardinal spline without smoothing is constrained to pass through
α-carbon coordinates, but gives a very rumpled ribbon;
a cardinal spline with strand-only smoothing may be a useful compromise.
Shadows and raytracing.
Shadowed (noninteractive) images can be produced by
raytracing with POV-Ray.
Shadows can make a scene more dramatic and enhance the sense of depth,
but they can also make images harder to interpret by increasing
complexity and/or obscuring parts of the scene.
Scenes with surfaces may benefit more than “busy” scenes
with ribbons and sticks, and raytracing tends to make surfaces very shiny.
Raytracing can be quite slow,
among other limitations.
Apart from raytracing, alternatives for producing noninteractive
shadowed images are conic and
neon
(the latter is not available on Windows), and
if system hardware permits, interactive shadows can be enabled with
the Effects tool
or the set command.
There are also ways to increase shininess
without raytracing.
Stereo.
Wall-eye, cross-eye, and red-cyan stereo
images can be saved by changing the graphics window to the
corresponding camera mode with the
Camera tool
(or the command stereo)
and using the same as screen
Image camera mode
in the Save Image dialog.
Another way to save cross-eye stereo images is
with the stereo pair Image camera mode;
in that case, it does not matter what
camera mode
is being used in the graphics window, but the resulting image
will be twice as wide as the specified size.
Color space.
Some publications require images to be in the CMYK color space.
Chimera currently saves images in only the RGB color space, so
a separate application such as Adobe Photoshop®
must be used to switch between the two.
Choosing colors.
Several factors should be considered in choosing colors, including
what the colors are meant to indicate, their distinguishability from
each other and from the background,
and whether viewers may have color vision deficiencies.
Useful Web sites include:
- ColorBrewer
- multipurpose color-scheme picker; 3- to 12-color schemes are displayed
on a map and rated by suitability for red-green colorblind viewers,
projection, color printing, black-and-white photocopying, etc.
(Note: hex color specifications at this site can be converted to
Tk codes
by replacing the leading 0x with #; for example,
hex 0xe78ac3 corresponds to Tk code #e78ac3. In Chimera,
Tk codes can be used in coloring commands
and entered into the Color Editor.)
- Vischeck
- simulates the effects of color-blindness on your own uploaded image
or a specified Web page
- IDEA vision demo
- simulates several types of color-blindness using images already at the site
See also: Color Editor,
Palette Editor
UCSF Computer Graphics Laboratory / May 2012