vrhmd device object

An object of type vrhmd runs a virtual reality head-mounted display supported by Psychtoolbox. To use a VRHMD, add one or more columns for a vrhmd object in the optional table for objects not specific to trial (experiment, device, staircase objects). Note if you want to leave all properties at default, you can make one column and set the object heading (row 1) but leave the property heading (row 2) as well as the cell in row 3 blank. [Or in the coding method: Make a vrhmd object outside trials using function vrhmdObject, set any properties needed, and input it to addToExperiment.]

A vrhmd object is also a screen object, i.e. it has all the properties of a screen object, and some additional ones. If you use a vrhmd object, it takes the place of a screen object.

See Psychtoolbox documentation for extra requirements for VRHMDs, e.g. 
http://psychtoolbox.org/docs/OculusVR for the Oculus Rift.

‍Currently VRHMDs only work in monoscopic or 2D stereo modes (property stereo below), not 3D head tracking mode.

Input properties
Record properties
vrhmd objects

options
quality

All screen objects
n_screen
height_cm
distance_cm

doSyncTests
syncTestParams
useCompositor

multisample
bufferChannelResolution
clampChannels

gamma
showMouseCursor
flipHorz
flipVert

stereo
stereoOptions
beforeOpenCode
openCode
afterOpenCode

All objects
report
info

options
quality

Default, changeable in pb_prefs: options = Psychtoolbox default
Default, changeable in pb_prefs: quality = lowest quality, highest speed

options is a string that goes to Psychtoolbox PsychVRHMD('AutoSetupHMD') input basicRequirements. See PsychVRHMD help text for more information.

quality is a number between 0–1 setting quality/performance tradeoff: 0 = lowest quality, highest speed, 1 = highest quality, lowest speed.

Input properties all screen objects have

Notes on how some of these properties work for vrhmd objects:

n_screen
The default value (highest attached screen number) is usually the HMD.

height_cm
distance_cm

These properties retain their meanings: display panel height and distance from eye (lens) to panel.

openRect
Ignored for vhrmd objects.

stereo
stereoOptions

For vrhmd objects, stereo is just the number 0 or 1: 0 = monoscopic, 1 = 2D stereo. For stereo display, as usual you can use element property nn_eyes to set whether an element shows on left/right/both eyes.

beforeOpenCode
openCode
afterOpenCode

beforeOpenCode code runs after the HMD is opened (with the imaging pipeline).
For vrhmd objects, code in all these properties can also use variable ptbVrhmd containing the Psychtoolbox HMD handle returned by PsychVRHMD('AutoSetupHMD').

Input properties
Record properties

PsychBench uses record properties to record information during experiments. You can't set record properties but you can see them in experiment results using input property report.

All screen objects
refreshRate
refreshInterval