Using an orientation from O in Molscript/Raster3D
Raster3D uses a fast Z-buffer algorithm to produce high quality pixel images
featuring two light sources, specular highlighting, Phong shaded surfaces, and
shadowing. Output is in the form of a pixel image with 24 bits of color
information per pixel.
Raster3D does not depend on graphics hardware for operation. Four image output
formats are supported: AVS, TIFF, SGI libimage, and a private format which is
backwards-compatible with earlier versions of Raster3D. To actually view or
manipulate the images produced, you must also have installed an image viewing
package (e.g. John Cristy's ImageMagick or the SGI libimage utilities).
An alternate version of the rendering may be built which directly outputs
JPEG images [only].
Ancillary programs are provided for the generation of object
descriptions based on atomic coordinates stored in Brookhaven PDB format.
Although the rendering program is not specific to molecular graphics, Raster3D
is not intended as a general purpose ray-tracing program.
Some of the algorithms used have been chosen for speed rather than generality;
that is, they happen to work well for the types of images the program is
intended for, but may produce odd results if used for very different types of
image.
Raster3D currently supports rendering six object types: spheres,
triangles, planes, smooth-ended cylinders, round-ended cylinders,
and quadric surfaces.
Version 2.1 added support for two additional "object types" which are
really modifiers for characteristic properties of existing objects. One
of these allows specification of explicit surface normals at triangle
vertices; the other allows specification of surface reflectance
properties specific to individual objects.
Version 2.2 added support for transparent objects, including transparent
molecular surfaces.
Version 2.3 added support for
file indirection, additional anti-aliasing options, internal
light sources, a separate alpha blend (matte) channel in the rendered image,
and some additional properties for special materials.
There is a new shell script, stereo3d
to automatically generate a side-by-side stereo pair from a Raster3D input file.
Version 2.4
The render program
now supports generalized quadric surfaces (ellipsoids, cones, etc).
There is a new utility program rastep
which generates "thermal ellipsoid" representations of atoms based on the
Biso or Uij entries in a PDB file (ANISOU cards). The option of colouring
based on B values has been added here and elsewhere. Triangles now may be
colored by interpolation of colors assigned to the three vertices. Input
lines beginning with '#' are treated as comments.
Using only programs included in the Raster3D distribution one can create and
render space-filling models, ball-and-stick models, ribbon models, and figures
composed of any combination of these. The following set of commands would
produce a composite figure of an Fe-containing metalloprotein with a smoothly
shaded ribbon representation of the protein and spheres drawn for the Fe atoms:
#
# Draw smooth ribbon with default color scheme 2,
# save description (with header records) in ribbon.r3d
#
cat protein.pdb | ribbon -d2 > ribbon.r3d
#
# Extract Fe atoms only, and draw as spheres.
# Color info is taken from colorfile.
# Save description (with no header records) in irons.r3d
#
grep ``FE'' protein.pdb | cat colorfile - | balls -h > irons.r3d
#
# combine the two descriptions and render as AVS image file
#
cat ribbon.r3d irons.r3d | render > picture.x
One can alternatively use Molscript Version 1.4 to produce a Raster3D
input file by using the -r switch. Raster3D is not able, however, to
render any labels specified by the Molscript input. Integrated use of
Molscript/Raster3D/ImageMagick allows one to describe, render, and view 3D
representations of existing Molscript figures.
molscript -r < infile.dat | render | display avs:-
A similar example using xv as an image viewer, and assuming that
TIFF support has been built into the render program:
molscript -r < infile.dat | render -tiff image.tif
xv image.tif
The same image rendered as a side-by-side stereo pair:
molscript -r < infile.dat > input.r3d; stereo3d input.r3d; xv stereo.tiff
The
Raster3D distribution also includes a filter utility which will convert the
24-bit color output stream from render into a dithered black & white
PostScript image:
render < description.r3d | avs2ps > picture.ps
Topics covered:
- anonymous ftp site:
- ftp.bmsc.washington.edu /pub/raster3d/
- via WWW:
-
http://www.bmsc.washington.edu/raster3d/raster3d.html
- contact:
- Ethan A Merritt
Dept of Biological Structure
University of Washington,
Seattle WA 98195-7742
merritt@u.washington.edu
Required for full installation:
- TIFF
- In order to build in support for the direct output of TIFF image files,
you must separately obtain and install a copy of the TIFF library
(libtiff.a). Several implementations are available, including one by
Sam Leffler which may be obtained via anonymous ftp from
sgi.com.
- ImageMagick
- In order to view the rendered images on a workstation screen you must
also obtain and install an image viewer.
Two commonly available viewers are John Christy's
ImageMagick
(also available via anonymous ftp from
ftp.x.org )
and John Bradley's xv.
Some other programs with direct Raster3D output modes:
- Molscript
- Figures composed in Molscript can be rendered in Raster3D rather than
being printed as PostScript images. The features of Raster3D version
2.0 are supported by Moslcript version 1.4 (with a couple of additional
patches that come in the Raster3D distribution). To obtain Molscript
please contact Per Kraulis directly (Email:
pjk@avatar.se). There is now a
Molscript web page at
http://www.avatar.se/molscript.
- TkRaster3D
- an X11-based front-end (GUI) for the Raster3D programs developed by
Hillary Gilson at NIST,
http://www.carb.nist.gov/TkRaster3D
- VMD
- Biomolecular visualization tool from the Theoretical Biophysics group
at the University of Illinois,
http://www.ks.uiuc.edu/Research/vmd/
- Xfit/XtalView
- General crystallographic model building, map fitting, and
analysis program by Duncan McRee, available in both academic and
commercial versions,
http://www.scripps.edu/pub/dem-web/index.html
The avs2ps utility for direct production of black & white PostScript images
is now included in the Raster3D distribution. It replaces earlier
machine-dependent programs in the viewtools kit.
Several auxiliary programs are available from the ftp site above which may be
useful, though they have not been kept up to date with the current Raster3D
version. These include two attempts to aid in the composition of Raster3D
images (atoms, preras3d) and tools for conversion to half-toned monochrome
images and annotation and display of the images (viewtools). Most of the code
was written specifically for SGI workstations, and may not transport well to
other platforms.
Originally written by David J. Bacon and Wayne F. Anderson. Ancillary programs
by Mark Israel, Stephen Samuel, Michael Murphy, Albert Berghuis, and Ethan A
Merritt. Extensions, revisions, and modifications by Ethan A Merritt.
If you use the package to prepare figures for publication,
please give proper credit to the authors; the proper citation for the
most recent version of the package is Merritt & Bacon (1997) as given below.
Bacon, D.J., & Anderson, W.F. (1988) ``A Fast Algorithm for Rendering
Space-Filling Molecule Pictures''. (abstract of paper presented at the Seventh
Annual Meeting of the Molecular Graphics Society). J. Molec. Graphics 6,
219-220.
Kraulis, P.J. (1991) ``MOLSCRIPT: a program to produce both detailed and
schematic plots of protein structures''. J. Appl. Cryst. 24, 946-950.
Merritt, E.A. & Murphy, M.E.P. (1994) ``Raster3D Version 2.0 - A Program
for Photorealistic Molecular Graphics''. Acta Cryst. D50, 869-873.
Merritt, E.A. & Bacon, D.J. (1997) ``Raster3D
Photorealistic Molecular Graphics''. Methods in Enzymology 277, 505-524.
Back to top
Raster3D homepage