Console Variables and Commands Reference

This document reviews useful console variables and commands available for Unreal development.

Unreal Console Variables (1.15 or later)

Oculus integration 1.15 and later replace our previous console command model with console variables. For a complete description of available console variables, see UE4-Oculus.txt in the root folder of your Unreal installation.

Legacy Unreal Console Commands (1.14 or earlier)

These commands are available in Unreal versions using Oculus integration 1.14 or earlier.

Oculus Rift: Press the tab keys while your game is running to bring up the console.

Gear VR: To bring up the console on a mobile device, set it to developer mode, launch the application, and tap the screen with four fingers.

To specify console commands to be loaded on startup, in most cases you should add them to Engine/Config/ConsoleVariables.ini. See Loading Console Variables in Epic’s Console Manager: Console Variables in C++ for more information.

For more information, see “Useful VR Console Commands” in Unreal’s VR Cheat Sheet.

Configuration Commands

CommandDescription
stereo on/offEnables/Disables stereo mode.
stereo e=0.064Eye distance (m).
stereo w2m=100Overrides default world-units-to-meters scale.
stereo ncp=10 fcp=10000Overrides near clipping and/or far clipping planes for stereo rendering (in cm).
stereo cs=1 ps=1Overrides camera and position scale.
stereo showShows current ipd and head model offset.
stereo resetResets stereo settings.
hmd enable/disableEnables/Disables HMD.
hmd pd [0..3.0]Sets pixel density in the center (default is 1.0).
hmd pdadaptive on/offEnables/Disables adaptive pixel density (see Oculus Rift: Adaptive Pixel Density for more details).
hmd pdmax [0.5..2.0]Sets maximum adaptive pixel density (ignored if hmd pdadaptive is off).
hmd pdmin [0.5..2.0]Sets minimum adaptive pixel density (ignored if hmd pdadaptive is off).
hmd sp [30..300]Overrides screenpercentage for stereo mode. (Deprecated, use ‘hmd pd xxx’ instead).
hmd hqdistortion on/offEnables/Disables high-quality distortion.
hmd mirror on/offEnables/Disables mirroring to the desktop window.
hmd mirror mode [0..4]Sets mirror mode: 0=Distorted, 1=Undistorted, 2=SingleEye, 3=SingleEye Letterboxed, 4=SingleEye Cropped
hmdpos on/off/toggleEnables/Disables/Toggles positional tracking.
hmdpos enforce on/offEnables/Disables head tracking even if not in stereo (for testing purposes).
hmdpos reset {yaw}Resets position and rotation, applies yaw (in degrees) if provided.
hmdpos resetrot {yaw}Resets rotation only, applies yaw (in degrees) if provided.
hmdpos resetposResets position only.
hmdpos showOutputs status of positional tracking to log.
hmdpos floor/eyeSelects tracking origin.

Mixed Reality Commands

CommandDescription
oculus.mr.OverrideParameters [0/1]Use the Mixed Reality console variables.
oculus.mr.ChromaKeyColor_RChroma Key Color R
oculus.mr.ChromaKeyColor_GChroma Key Color G
oculus.mr.ChromaKeyColor_BChroma Key Color B
oculus.mr.ChromaKeySimilarityWhen the distance between pixel color and chromaKeyColor is less than chromaKeySimiliarity, the pixel is hidden. Increase this value if the green screen is partially visible, and reduce this value if the person in the scene partially disappears.
oculus.mr.MixedReality_ChromaKeySmoothRangeDefines a small range of color distance between the pixel and the green screen in which the video frame pixel will be rendered as semi-transparent. Increase this value to make the person image more smooth, and decrease it to sharpen.
oculus.mr.ChromaKeySpillRangeDefines a small range of color distance between the pixel and the green screen in which the video frame pixel will be desaturated. Increase this value to reduce green edges around the persons image. Decrease it if the person image looks overly desaturated.
oculus.mr.CastingLantency <float>The casting latency in Multi-View mode.

Miscellaneous Commands

CommandDescription
hmd statsShows HMD-related stats.
hmd gridToggles lens-centered grid.
hmd updateongt on/offEnables/Disables updating HMD pose on game thread. On by default.
hmd updateonrt on/offEnables/Disables updating HMD pose on render thread, for lower latency. On by default.
hmd cubemap [gearvr] [xoff=N] [yoff=N] [zoff=N] [yaw=N]Generates a cube map image of your application. May be used for VR app previews in the Oculus Store. Cube map PNGs will be saved in the directory GameDir/Saved/Cubemaps. [gearvr]: If specified, cube map size will be 6x1024x1024, otherwise it will be 6*2048x2048. [xoff], [yoff], [zoff]: Offset from the current player’s location. [yaw]: override yaw rotation (degrees).
hmd setint PerfHUDMode [0..4]Selects performance HUD mode, set to 0 to disable.
hmd setint DebugHudStereoMode [0..3]Selects debug HUD stereo mode, set to 0 to disable.
hmdversionPrints Oculus SDK version used and Oculus Plugin info.