VR Console Commands

From Epic Wiki


Overview

Unreal Engine 4 has various console commands that effect and interact with various VR specific functionality.
Pre 4.16 these commands followed little structure however now they all start with the "vr." prefix making them easier to document and use.
Although descriptions can be found in the engine I found it easier to have all the commands along with their description in one place.

Commands

General VR Commands

Command Description
vr.bEnableHMD Enables or disables the HMD device. Use 1, True, or Yes to enable, 0, False or No to disable.
vr.bEnableStereo Enables or disables the stereo rendering. Use 1, True, or Yes to enable, 0, False or No to disable.
vr.HMDVersion Prints version information for the current HMD device.
vr.WorldToMetersScale Get or set the current world to meters scale.
vr.HiddenAreaMask Enable or disable hidden area mask 0: disabled 1: enabled
vr.Debug.bEnableDevOverrides Enables or disables console commands that modify various developer-only settings.
vr.StereoLayers.bMixLayerPriorities By default, Face-Locked Stereo Layers are always rendered on top of any other layer position types. Set this to a non-zero value to disable this behavior (not supported on all platforms.)
vr.Debug.VisualizeTrackingSensors Show or hide the location and coverage area of the tracking sensors Use 1, True, or Yes to enable, 0, False or No to disable.
vr.TrackingOrigin Floor or 0 - tracking origin is at the floor, Eye or 1 - tracking origin is at the eye level.
vr.SpectatorScreenMode (vr.MirrorMode pre 4.17) Changes the look of the spectator if supported by the HMD plugin. 0: disable mirroring\n 1: single eye 2: stereo pair. Numbers larger than 2 may be possible and specify HMD plugin-specific variations.Negative values are treated the same as 0.
vr.HeadTracking.ResetPosition Reset the position of the head mounted display.
vr.HeadTracking.ResetOrientation Reset the rotation of the head mounted display.\nPass in an optional yaw for the new rotation in degrees.
vr.HeadTracking.Reset Reset the rotation and position of the head mounted display. Pass in an optional yaw for the new rotation in degrees.
vr.HeadTracking.Status Reports the current status of the head tracking.

Rendering VR Commands

Command Description
vr.InstancedStereo Enable instanced stereo rendering (only available for D3D SM5 or PS4).
vr.MultiView Enable multi-view for instanced stereo rendering (only available on the PS4).
vr.MobileMultiView Enable mobile multi-view rendering (only available on some GearVR Android devices using OpenGL ES 2.0).
vr.MobileMultiView.Direct Enable direct mobile multi-view rendering (only available on multi-view enabled GearVR Android devices).
vr.MonoscopicFarField Enable monoscopic far field rendering (only available for mobile).
vr.AllowMotionBlurInVR For projects with motion blur enabled, this allows motion blur to be enabled even while in VR.

Oculus VR Commands

Command Description
vr.oculus.PixelDensity Pixel density sets the render target texture size as a factor of recommended texture size. Since this may be slightly larger than the native resolution, setting PixelDensity to 1.0 is usually not the same as setting r.ScreenPercentage to 100
vr.oculus.PixelDensity.min Minimum pixel density when adaptive pixel density is enabled.
vr.oculus.PixelDensity.max Maximum pixel density when adaptive pixel density is enabled.
vr.oculus.PixelDensity.adaptive Enable or disable adaptive pixel density.
vr.oculus.bHQBuffer Enable or disable using floating point texture format for the eye layer.
vr.oculus.bHQDistortion Enable or disable using multiple mipmap levels for the eye layer.
vr.oculus.Debug.Property Read or write an OVR property.
vr.oculus.Debug.bShowStats Enable or disable rendering of stats. (Such as pixel density and latency.)
vr.oculus.Debug.bDrawGrid Enable or disable rendering of debug grid.
vr.oculus.Debug.CaptureCubemap Captures a cubemap for Oculus Home. Optional arguments (default is zero for all numeric arguments):

xoff=<float> -- X axis offset from the origin
yoff=<float> -- Y axis offset
zoff=<float> -- Z axis offset
yaw=<float>  -- the direction to look into (roll and pitch is fixed to zero)
gearvr -- Generate a GearVR format cubemap (height of the captured cubemap will be 1024 instead of 2048 pixels)

vr.oculus.bUpdateOnRenderThread Enables or disables updating on the render thread.
vr.oculus.bUpdateOnGameThread Not available in UE_BUILD_SHIPPING builds. Enables or disables updating on the game thread.</span>
vr.oculus.Debug.PositionOffset Not available in UE_BUILD_SHIPPING builds. Add an offset tp the current position.</span>
vr.oculus.Debug.EnforceHeadTracking Not available in UE_BUILD_SHIPPING builds. Set to on to enforce head tracking even when not in stereo mode.</span>
vr.oculus.Debug.Show Shows the current value of various stereo rendering params. (Such as IPD and clipping planes.)
vr.oculus.Debug.Reset Resets various stereo rendering params back to the original setting.
vr.oculus.Debug.IPD Shows or changes the current interpupillary distance in meters.
vr.oculus.Debug.FCP Shows or overrides the current far clipping plane.
vr.oculus.Debug.NCP Shows or overrides the current near clipping plane.

Gear VR Commands

Command Description
vr.oculus.EnableMSAA Enable 4xMSAA when rendering on GearVR.
vr.oculus.EnableQueueAhead Enable full-frame queue ahead for rendering on GearVR
vr.oculus.HandleBackButton GearVR plugin will handle the 'back' button
vr.oculus.Dev.HFOV The current horizontal field-of-view setting. (vr.Debug.bEnableDevOverides needs to be > 0.)
vr.oculus.Dev.VFOV The current vertical field-of-view setting. (vr.Debug.bEnableDevOverides needs to be > 0.)
vr.oculus.ShowGlobalMenu Opens the global menu.
vr.oculus.ShowQuitMenu Opens the quit menu.
vr.oculus.Debug.ToggleLoadingIconMode Toggles loading icon mode.

Steam VR Commands

Command Description
vr.SteamVR.UsePostPresentHandoff Whether or not to use PostPresentHandoff.  If true, more GPU time will be available, but this relies on no SceneCaptureComponent2D or WidgetComponents being active in the scene.  Otherwise, it will break async reprojection.
vr.SwapMotionControllerInput This command allows you to swap the button / axis input handedness for the input controller, for debugging purposes.

0: don't swap (default)
1: swap left and right buttons

Google VR Commands

Command Description
vr.googlevr.ViewerPreview Change which viewer data is used for VR previewing.

0: No viewer or distortion
1: Google Cardboard 1.0
2: Google Cardboard 2.0
3: ViewMaster (default)
4: SnailVR
5: RiTech 2.0
6: Go4D C1-Glass

vr.googlevr.PreviewSensitivity Change preview sensitivity of Yaw and Pitch multiplier. Values are clamped between 0.1 and 10.0</span>
vr.googlevr.DistortionCorrection.bEnable Enable or disable lens distortion correction.
vr.googlevr.DistortionCorrection.Method Set the lens distortion method.
vr.googlevr.RenderTargetSize Set or reset render target size.
vr.googlevr.NeckModelScale Set the neck model scale.
vr.googlevr.DistortionMesh Set the size of the distortion mesh.
vr.googlevr.bShowSplash Show or hide the splash screen.
vr.googlevr.SplashScreenDistance Set the distance to the splash screen.
vr.googlevr.SplashScreenRenderScale et the scale at which the splash screen is rendered.
vr.googlevr.bEnableSustainedPerformanceMode Enable or Disable Sustained Performance Mode.

Original Author: