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)
When the Image type
is a stereo pair, the possible formats also include:
- Stereo JPEG (*.jps)
- 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 (no/yes/stereo cameras)
- 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. The stereo cameras setting
(default) indicates making the adjustment for stereo modes only (not when
the Image type
is same as screen and the graphics window
camera mode is mono).
- 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, image 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)
- number of pixels per inch in the final image;
image dimensions in print units are converted
to inches internally and multiplied by the dpi to give the output
dimensions in pixels
Image Options:
-
JPEG quality (integer value in the range 5-95, default 90)
- quality setting for JPEG output;
higher values give larger files
-
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.
- POV-Ray
- raytrace with POV-Ray
rather than rendering directly with Chimera.
Raytracing can be very slow but includes fancier effects such as
high-quality shadows.
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.
Raytraced images are saved in PNG format.
-
Supersample
(1x1/2x2/3x3/4x4) - for Chimera rendering,
how many pixels to sample in the X and Y dimensions for each pixel in
the final saved image. 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.
A potential disadvantage of supersampling is that lines
such as silhouettes
may become unexpectedly thin in the final image because there
is a system-dependent limit on how wide they can be drawn
in the initial image. The effective maximum linewidth
is reported at the bottom of the dialog.
It may be possible to achieve the desired linewidth by reducing
the supersampling level and/or the pixel dimensions of the image.
-
Image type - stereo/mono options
for Chimera rendering
- 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
-
Lenticular images (default 12)
- how many images to save in the lenticular mode.
The files will be named by appending
a number to the specified file name, before any file type suffix.
- 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 a
stereo format
- wall-eye stereo pair
- regardless of the graphics window camera mode,
save a wall-eye stereo pair as a single image
twice as wide as the
specified size, optionally using a
stereo format
- Transparent background
- whether to include opacity values (alpha) in the output file
(PNG or TIFF only), to facilitate
combining the image with different backgrounds in image-editing applications.
With background transparency,
if the Chimera background
is a single solid color, it will be completely invisible in the saved images.
(Note: TIFF images with background transparency may not be
interpreted correctly by Adobe Photoshop.)
Background transparency can also be enabled with the command
set bgTransparency or the
startup option --bgopacity.
For background transparency in raytraced images,
see the POV-Ray Options
preferences.
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.
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 tips mainly apply to high-quality rendering directly in Chimera.
Images rendered in Chimera are often clearer and more illustrative than those
made with the (noninteractive) raytracing option,
and can even include shadows.
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.
Types of presets:
interactive - for interactive viewing in Chimera
publication - for making publication/presentation images
custom - defined by the user in a script, see the
Presets preferences
Publication presets make the background white,
increase smoothness,
and adjust display styles, without changing which items are displayed
or their colors.
See also: alias
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, images can be saved with a
transparent background.
Silhouettes
are outlines that emphasize borders and discontinuities.
Although shown in the interactive display, these are mainly intended
for output images, as supersampling
makes them look much smoother in the image than on the screen.
Whether silhouettes are shown and their linewidth and color can be controlled
with the Effects tool or
the set command.
Publication presets #1 and #2 turn on
silhouettes and turn off depth cueing.
Silhouettes can also be combined with depth cueing,
as in publication preset #5.
This silhouettes setting is global (applies to all models),
but when it is on, the silhouettes for an individual model can be toggled
with the command setattr,
the Selection Inspector,
or the molecule model attributes panel.
If outlines are desired but the silhouettes seem to highlight too many contours,
a trick is to use the selection outline instead,
as it is limited to the perimeters of selected objects.
The selection outline color can be changed, e.g to black, in the
Selection preferences.
Although the linewidth is not adjustable, a thicker line relative to the
selected object(s) can be obtained by resizing the
graphics window smaller; a large output image
can still be obtained by specifying larger dimensions when saving the image.
Depth cueing is progressive shading from front to back,
also known as fog or mist.
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 silhouettes.
Depth cueing can also be combined with silhouettes,
as in publication preset #5.
Lighting. Chimera lighting modes may include
ambient (nondirectional) light and 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 + ambient
A simple, line-drawing-like appearance can be achieved by combining the
ambient-only mode with publication preset
#1, #2, or #5 (white background, silhouettes).
Lighting mode, brightness, contrast, light directions,
and shininess can be controlled
with the Lighting tool and
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 level
with the Effects tool or
the set command.
This setting also affects curved geometric objects
defined in BILD format.
The publication presets increase
subdivision to 5.0 if the current value is lower.
- 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). This parameter can also be specified when a
surface is displayed with the surface
command. The publication presets
raise vertex density to 10.0 for any existing molecular surfaces
with lower values. Separate smoothing options are available in
Multiscale Models and
Volume Viewer for the surfaces they create
(see also the command sop smooth).
- 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
and dialogs for recording movies
also include supersampling options.
Supersampling increases calculation time with little effect on file size.
A potential disadvantage of supersampling is that lines
such as silhouettes
or hydrogen-bond representations
may become unexpectedly thin in the final image because there is a
system-dependent limit to how wide they can be drawn in the initial image.
The File... Save Image dialog reports the effective maximum linewidth
given the current supersampling level and image size.
It may be possible to achieve the desired linewidth by reducing
the supersampling level and/or the pixel dimensions of the image.
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
(e.g.,
ribspline cardinal smooth strand).
Shadows.
Shadows can make images more dramatic and enhance the sense of depth.
However, they can also make images more complex and darken areas of interest;
surfaces may benefit more from shadows than would “busy” images
with ribbons and sticks.
If system hardware permits, interactive shadows can be enabled with
the Effects tool
or the command set shadows.
Shadow locations and darkness are controlled by the
lighting directionality and contrast, respectively.
Interactive shadows are often good enough for presentation images,
and their appearance can be improved by increasing the shadow quality
setting in the Effects tool
(albeit at the cost of increased graphics memory usage).
They can also be used to preview shadow locations for noninteractive rendering.
High-quality, noninteractive shadowed images can be produced by
raytracing with POV-Ray.
Raytracing can be quite slow, among other
limitations.
Noninteractive shadowed images can also be generated with
the commands conic and
neon.
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.
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 singleLayer.
Transparency is normally angle-dependent, such that transparent triangles
(forming objects as well as surfaces)
appear more opaque when viewed edge-on than when viewed face-on.
However, the angle dependence can be turned off
with the Effects tool
or the command
set flatTransparency.
- Surfaces
(surface models)
can be made transparent without otherwise changing their colors using
the Actions... Surface menu
or the command transparency.
- 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).
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 “3D” labels (shown with the
Actions... Label menu or
commands label and
rlabel) are associated with atoms
and move along with them. The font and size of all 3D labels collectively
and whether they should always be drawn in front are set in the
Labels preferences.
Geometric Objects.
Spacefilling objects including 3D arrows can be created arbitrarily
with the command shape
or in BILD format.
Axes (cylinders), planes (discs), and centroids (spheres)
can be defined from sets of atoms using
Axes/Planes/Centroids
or the command define, and ellipsoids
using measure inertia.
The
PipesAndPlanks tool
shows protein helices and strands as cylindrical “pipes”
and rectangular-box “planks,” respectively, with thin connectors.
Axis, plane, and centroid objects as well as those from
shape
and measure inertia
are surface models,
which have the following advantages over the VRML models
from BILD format and
PipesAndPlanks:
Markers (spheres) can be placed and paths between them drawn with
Volume Tracer.
Markers are implemented as atoms and thus also respond to
the Actions menu
and various commands.
See also:
Cage
Builder,
Thermal
Ellipsoids,
hkcage,
Nucleotides,
Scale Bar
Color Keys.
A color key shows how a coloring scheme relates to quantities.
Such coloring schemes are applied by various tools and commands, including
Render by
Attribute,
Surface
Color, and rangecolor.
Color keys suitable for publication images can be created with the
Color
Key tool or colorkey command.
Stereo.
Wall-eye, cross-eye, red-cyan,
and green-magenta 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 Image type: same as screen
in the Save Image dialog.
Another way to save stereo images is by setting the
Image type
to stereo pair (cross-eye) or wall-eye stereo pair;
in that case, 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 websites 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,
printing, and/or photocopying. The HEX color specifications at this site
are Tk codes,
which can be used as color names in many Chimera commands
and in the Color Editor.
- Vischeck
- simulates the effects of color-blindness on your own uploaded image
or a specified web page
See also: Color Editor,
Palette Editor
UCSF Computer Graphics Laboratory / August 2015