Ray

From PyMOLWiki
Revision as of 01:56, 22 December 2005 by Inchoate (talk | contribs)
Jump to navigation Jump to search

DESCRIPTION

"ray" creates a ray-traced image of the current frame. This can take some time (up to several minutes, depending on image complexity).

USAGE

ray [width,height [,renderer [,angle [,shift ]]] 

angle and shift can be used to generate matched stereo pairs

Settings

Ray-trace modes:

set ray_trace_mode, 1 # (or 2 or 3; best with "bg_color white;set antialias,2")

EXAMPLES

ray
ray 1024,768
ray renderer=0

PYMOL API

cmd.ray(int width,int height,int renderer=-1,float shift=0)

FEATURES

Perspective

Perspective Example Images
Example with Perspective Turned Off
Example with Perspective Turned On
Example with Perspective Turned On and Field of View Set High (70).












Notes

PyMol 0.97 and prior used orthoscopic rendering -- that is, no perspective. Upon the arrival of 0.98 and later, we get perspective based rendering at a cost of a 4x decrease in render speed. If you want perspective

set orthoscopic, off

Otherwise

set orthoscopic, on

To magnify the effect of perspective on the scene,

set field_of_view, X

where 50<X<70. Default is 20. 50-70 gives a very strong perspective effect. Nb. the field of view is in Y, not X as one would expect.

Renderer

renderer = -1 is default (use value in ray_default_renderer)

renderer = 0 uses PyMOL's internal renderer

renderer = 1 uses PovRay's renderer. This is Unix-only and you must have "x-povray" in your path. It utilizes two temporary files: "tmp_pymol.pov" and "tmp_pymol.png".

Ray Tracing Stereo Images

See Stereo_Ray.

SEE ALSO

"help faster" for optimization tips with the builtin renderer. "help povray" for how to use PovRay instead of PyMOL's built-in ray-tracing engine.

USER Comments

How do I ray trace a publication-ready (~300dpi) image using PyMol?

This answer is in the Advanced Issues (Image Manipulation Section).