introductory virtual reality in unity3d
TRANSCRIPT
![Page 1: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/1.jpg)
Introductory VR in Unity 3d
Dr James Birt
![Page 2: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/2.jpg)
Requirements• Unity 5.3 or higher• Oculus runtime 0.8 installed
![Page 3: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/3.jpg)
Create new Project
![Page 4: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/4.jpg)
Enable VR Mode
![Page 5: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/5.jpg)
Simple Test – View a Cube
Press Play - if everything is setup correctly you should see a cube through your VR headset
![Page 6: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/6.jpg)
FPS Controller
• Open Unity3d Asset Store• Type first person controller – Press Enter• Click FREE ONLY• Click Standard Assets• Download• In the Import Window Select None - then
Select FirstPersonCharacter; CrossPlatformInput; Utility & click Import
![Page 7: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/7.jpg)
FPS Controller
• Drag FPSController Prefab into Hierarchy• Remove Main Camera from Hierarchy• Add a 3D Plane to the Scene• Create a contrasting material color for your cube and apply• Position Cube; Controller and Plane in the scene• Press Play• Using your Keyboard and Mouse you can now walk around the
game scene
![Page 8: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/8.jpg)
Optimising for Framerates & Quality• Select Project Settings – Quality• Select Simple and change Anti
Aliasing to 4x Multi Sampling• Anti Aliasing is very important in
VR and where possible should be enabled
• Increase Default Render Scale from 1.0 to 1.5 which increases object sharpness – see next slide
• Avoid Dynamic Lighting where possible – best to bake lights
![Page 9: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/9.jpg)
How to Increase Render Scale• Create new C# file called RenderScale• Add the following code and attach script to FPSController• Code is from Unity Getting Started Tutorial - http://tinyurl.com/j2elrjt
![Page 10: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/10.jpg)
If Dynamic Sun Required!• Click Windows – Lighting• Add Directional Light to the Sun• Ambient GI – Baked• Create C# Script – AutoIntensity• Add the following modified code
from Glen Rhodes tutorial on realtime day night cycles and GI Lighting http://tinyurl.com/ju9z8b4
• Change day & night rotation speed• Suggest changing Y rotations
![Page 11: Introductory Virtual Reality in Unity3d](https://reader036.vdocuments.mx/reader036/viewer/2022062522/58a9ac771a28ab9c758b59b9/html5/thumbnails/11.jpg)
Final Scene
https://dl.dropboxusercontent.com/u/9011716/VRDEMO.unitypackage