ChimeraX docs icon

Command: device, vr

device  device-typestatus ]  device-options

The device command sets modes for certain external devices, where the device-type can be:

The status of a mode can be on (synonyms true, True, 1) or off (synonyms false, False, 0). Device-specific options are described below.

device snavstatus ] [ fly  true | false ] [ speed  factor ]

The command device snav enables manipulation with a SpaceNavigator® 3D mouse from 3Dconnexion. The fly option indicates whether the force applied to the device should be interpreted as acting on the camera (true), where pushing forward zooms in because it moves the camera viewpoint toward the scene, or as acting on the models in the scene (false, default), where pushing forward zooms out because it pushes the models away. In either case, however, it is the camera that actually moves. The speed option sets a sensitivity factor for motion relative to the device (default 1.0). Decreasing the value (for example, to 0.1) reduces sensitivity to give slower motion, whereas increasing the value has the opposite effect. See also: mousemode

vrstatus ] [ display  mirror | independent | blank ] [ showControllers  true | false ] [ clickRange  r ] [ toolbarPanels  true | false ] [ gui  tool-title | all ] [ simplifyGraphics  true | false ] [ multishadowAllowed  true | false ] [ roomPosition  matrix | report ] [ icons  true | false ]

The vr command (same as device vr) enables a virtual reality mode for systems supported by SteamVR, including HTC Vive, Oculus Rift, and Samsung Odyssey. SteamVR must be installed separately by the user and started before the mode is enabled. In addition, Oculus Rift users should start the Oculus runtime before starting SteamVR. For details and related issues, see ChimeraX virtual reality. See also: camera, view, meeting, making movies

The display option indicates what to show in the ChimeraX graphics window on the desktop:

Updating the graphics window can cause flicker in the VR headset because refreshing the computer display (nominally 60 times per second) slows rendering to headset. ChimeraX turns off syncing to vertical refresh if possible. Another way to mirror is to use SteamVR's menu entry to display mirror window.

The showControllers option (default true) shows representations of the hand controllers in the scene. Not showing the representations may be useful to avoid time-consuming calculations of the shadows they cast.

The clickRange option sets the depth range for picking objects with the hand-controller cones, where r (default 5.0) is the maximum distance from the tip of the cone to the object in scene distance units, typically Å. Limiting the range prevents accidentally picking far-away objects.

The toolbarPanels option (default true) indicates whether to hide icon toolbars (Mouse Modes for Right Button, Molecule Display Toolbar, etc.) and instead show them as tool panels. This is useful for consolidating the controls in VR.

By default, pressing the Vive hand-controller menu button (similar for other systems) shows all the tools that are on the right side of the desktop interface as a control panel in VR. However, the gui option allows showing the single tool with title bar contents tool-title instead. Subsituting all (or any other string that is not a tool title) for tool-title restores the default behavior of showing all righthand tools. The tool can be a custom panel created with the buttonpanel command.

The simplifyGraphics option (default true) reduces the maximum level of detail in VR by limiting the total atom and bond triangles to one million each. This helps to maintain full rendering speed. The previous total-triangle limits are restored when the VR mode is turned off. Normally, the maximum atom and bond triangles are set to five million each. See also: graphics

Ambient shadowing or “ambient occlusion” requires calculating shadows from multiple directions, which may make rendering too slow for VR and cause stuttering in the headset. By default (multishadowAllowed  false), if the multiShadow lighting parameter is > 0, enabling VR switches to the simple lighting mode. With multishadowAllowed  true, the lighting mode is left unchanged.

When the mode is enabled, the roomPosition option can be used to specify the transformation between room coordinates (in meters, with origin at room center) and scene coordinates (typically in Å) or to simply report the current transformation in the Log. The transformation matrix is given as 12 numbers separated by commas only, corresponding to a 3x3 matrix for rotation and scaling, with a translation vector in the fourth column. Ordering is row-by-row, such that the translation vector is given as the fourth, eighth, and twelfth numbers. Example:

vr  room  20,0,0,0,0,20,0,0,0,0,20,0

The icons option (default false) indicates whether to show a panel of icons when the controller trackpad is touched. This user interface is deprecated, replaced by pressing the hand controller menu button which shows the standard ChimeraX user interface in VR.

UCSF Resource for Biocomputing, Visualization, and Informatics / February 2019