Platform Development -> Virtual Reality Development -> Oculus Rift Development

https://docs.unrealengine.com/latest/INT/Platforms/Oculus/QuickStart/5/index.html

Quick Start
Step 1 to 4 is installing Oculus Runtime software
Skip to Step 5. Testing out the Rift and UE4

1. Create a New Blank Blueprint Project
a. Mobile/Tablet
b. Scalable 3D or 2D
c. No Start content
d. Name the project “Rift_Test”
2. In UE, goto Play Menu -> Selected Viewport to VR Preview and put Rift On

Oculus Rift Best Practices

Oculus Rift Sanity Check

UE will try to auto use Rift if connected. To troubleshoot no connection, check if the following Virtual Reality plugins have been enabled:
– Oculus Input
– Oculus Library
– Oculus Rift

Checking your work with the Oculus Rift
In UE, goto Play Menu -> Selected Viewport to VR Preview and put Rift On

Oculus Reference

Refer to http://developer.oculus.com for Rift resources

Shipping with Oculus

You need to develop with UE4 v4.11.1 or later which has been compiled with the Oculus Libraries. This is required to appear on the Oculus Store

Enabling Unknown Sources

To develop a UE4 VR project, enable Unknown Sources in the Oculus Software Settings so that it does not have to be registered or reviewed by Oculus in advance.

Oculus Talks

Oculus Connect: integrating the Oculus Rift into UE4

https://www.youtube.com/watch?v=0oM6Xe7fT-8

Platform Development -> Virtual Reality Development -> VR Cheat Sheet

Running a VR Game

– Running from the UE
? Play Menu -> VR Preview
– Running from outside the UE
? UE4Editor.exe [My Project] [MyMap] – game
? Note – My Project = .uproject

Useful VR Console Commands

– Common Commands
? Stereo On/Off – Toggle stereo rendering for HMD
? r.screenpercentage [30-300] – Define screen %, Higher is better quality, Lower is better performance
– Oculus Specific Commands
? Stereo Show Prints list of settings to log
Stero Reset Resets IPD (Inter Pupillary Distance), clear IPD + Stereo Overrides
HMD [Enable/Disable]
HMD sp [30-300] Same as r.screenpercentage
HMD Vsync [On|Off|Reset] Control Vsync on HMD
Ovrversion Print LibOVR version and build date to the log

Platform Development -> Virtual Reality Development -> Virtual Reality Best Practices

VR Project Settings
To get your frame rate running 90fps or better, ensure your project is set to:
1. Mobile/Tablet
2. Scalable 3D or 2D graphics
3. No starter content
VR .INI Settings
Use the Showdown VR Demo’s .INI settings by adding this to your project’s Config\DefaultEngine.INI under System Settings:

[SystemSettings]
r.VolumeMultiplier=1.0
r.screenpercentage=130
r.SeparateTranslucency=0
r.HZBOcclusion=0
r.FinishCurrentFrame=1
r.MotionBlurQuality=0
r.PostProcessAAQuality=3
r.BloomQuality=1
r.EyeAdaptationQuality=0
r.AmbientOcclusionLevels=0
r.SSR.Quality=1
r.DepthOfFieldQuality=0
r.SceneColorFormat=2
r.SSSSS=0
r.TranslucencyVolumeBlur=0
r.TranslucencyLightingVolumeDim=4
r.MaxAnisotropy=8
r.LensFlareQuality=0
r.SceneColorFringeQuality=0
r.FastBlurThreshold=0
showflag.decals=0
r.SSR.MaxRoughness=0.1
r.rhicmdbypass=0
r.TiledReflectionEnvironmentMinimumCount=10
sg.EffectsQuality=2
sg.PostProcessQuality=0

VR Instanced Stereo
Instanced Stereo reduces performance impact in VR. To enable in your project:

1. Project Settings -> Rendering -> VR -> Instanced Stereo
2. Restart UE4

Video – Instanced Stereo in Action

https://www.youtube.com/watch?v=nmajnglJeyE

VR Performance Profiling

ProTip: Throughout the lifetime of the project, perform performance profiling to identify CPU + GPU expensive VR assets.

CTRL + SHIFT + “,” – Enable GPU Visualizer

CPU Profiler – Refer to https://docs.unrealengine.com/latest/INT/Engine/Performance/Profiler/index.html

VR Post Process Settings
Before starting a project, disable Post Process Settings to avoid preliminary performance problems.

1. If there is not one already, add a Post Process Volume to your level
2. Select the PP Vol and enable the Unbound checkbox
3. Go through the entire Settings of the PP Vol and disable everything, 0.0 means to disable feature.
1. The main things to disable are:
i. Lens Flares
ii. Screen Space Reflections
iii. Temporal AA
iv. SSAO
v. Bloom
vi. Any high impact Post Process

VR World Scale
IMPORTANT: Ensure you have the correct world scale. If you don’t, users might experience Simulation Sickness.

Objects are best viewed 0.75m to 3.5 Meters from the Player’s camera.

1 UU (Unreal Unit) = 1cm (Centimeter)

Objects in Unreal are best viewed from 75UU to 350UU away from the camera

In the World Settings -> World to Meters

VR and Simulation Sickness (SS)
Makes for bad VR. Very important to maintain 90fps+ framerate because low framerates trigger SS. Optimize often.

Tips:
– Get non-devs to be test users cause devs have already acclimatized
– Avoid introducing camera movement that is not in the user’s control. Other forms of camera movement would be:
? Walking bobs (up and down) that mimic human motion
? Shaking the screen because of an explosion
– Do not override the FOV. Leave this to be configured by the device’s SDK
– Use dimmer lights and colors because vibrant ones can trigger SS quickly
– Use lifts over stairs because stairs can be disorienting
– Speed should be constant, instant 0 to 100. Having gradual speed up can cause SS
– Do not use Depth of Field or Motion Blur as may trigger SS

VR Camera Setup
Is your VR experience seated or standing?
– If it’s seated, you need to compensate by making the camera origin the same height as your character standing.
– If it’s standing, place the camera component on ground level

VR Character Settings
Characters in a VR headset are not the same as a standard character. The following are guidelines parameters:
Width 176cm
Height 68cm
Movement Speed 24 m/s
Camera Location @ Character’s Eye Height 160cm

VR Content Considerations
– Scale: Mimic reality as best as you can because if diverges too much, It can trigger SS
– Missing Polygon Faces: Be prepared that users can look at the environment in almost any angle
– Preferred Lighting:
– Use Static Lighting and Lightmaps because this is the cheapest option. If you have to use dynamic lighting, limit it as much as possible and don’t let them overlap. For outdoor scenes, 1) change directional light from static to dynamic 2) Enable Cascaded Shadow Maps (CSM) and 3) Making settings simple while keeping shadows
– VR & VFX: SubUV Textures used to simulate fire and smoke don’t view well in VR. Use static meshes instead of 2d particles to recreate VFX explosions or smoke trails.
– VR & Transparency: Costs outweigh benefits. But if you have to use it, introduce “DitherTempralAA” Material function.
– Fake everything you can: Dynamic shadows and dynamic lighting are very expensive in VR. You can use hacks like applying fake blob shadows that dynamically adjusts position and intensity based on how close the character is to an object in the world. This creates the illusion that a character is casting a shadow.

VR Blueprint Functions
Head Mounted Display Blueprint Nodes
Type “Head Mounted Display” to view
Steam VR Blueprint Nodes
N/A for Rift
Known VR Issues
– Screen Space Reflections (SSR): Sometimes does not alight with what is being reflected. Use Reflection Probes instead as it is cheaper and more reliable.
– Normal Mapping Issues: Doesn’t work like it traditionally did because it’s not designed to work for stero or motion parallax. They end up looking flat in an HMD.
? Parallax Mapping Shader: Good for displaying depth information and making objects appear to have more detail they actually have. Due to the constant correction of depth information from current view point, the parallax map will always correct itself no matter what angle.
§ Ex/ Cobblestone paths and fine detail on surfaces
? Tessleation Shader Displacement: Display 3D Geometry in real time; Adds details that have not been originally modeled into the object. It can create missing detail by creating more vertices.

Share

Google+ Comments