collapse

Welcome to VRTITTIES

A place for VR Porn Games, Oculus Rift Porn Games, Vive Porn Games, VR Porn Game Downloads & VR Sex Games.

Please feel free to discuss anything about Oculus Rift Porn Games, Vive Porn Games and VR Porn Games.

The answer to the anti spam question is facebook. If you have any issues registering then flick me an email or post as a guest. If you make an account you do not have to answer any anti spam questions after 10 posts.

You will need to sign up to the forum and make a number of posts before you can post links to other websites.

If you are ever looking at buying some VR Porn please use my affiliate links on the right sidebar.

Thanks,

VRTITTIES, New Zealand

Chelsearift@gmail.com


Author Topic: Tutorial - Creating a new VR scene from Scratch in Unity3D 4.5  (Read 9065 times)

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Hi everybody,

Here's a quick Getting Started tutorial for creators just getting started making VR scenes in Unity. It assumes some basic familiarity with the Unity3D editor, but not much more.

Here's what to do:

Download the latest Oculus VR Unity3D integration from here: https://developer.oculus.com/downloads/
  • As of this writing, that's version 4.4.
  • Unzip it wherever you'd like.
Create a new project in Unity3D.
  • With the new project open, run OculusUnityIntegration.unitypackage from wherever you extracted the OVR Unity integration.
  • A confirmation window will open asking what you'd like to import from the package - let it import everything.
  • You'll now see a new OVR directory and a new Plugins directory in your Assets folder.

Set up a test scene to make sure everything is working.
  • Create a plane to keep us from falling out of the world by selecting GameObject->Create Other->Plane.
  • For simplicity's sake, let's make sure its Transform Position is (0,0,0).
  • Your scene has a Main Camera object already created. Select it and delete it.
  • From your Assets folder, select OVR/Prefabs/OVRPlayerController.prefab, and drag it into your scene. This prefab contains the Oculus camera rig. Let's set its Transform Position to (0,1,0) to line the base of the capsule up with the plane. If it's too low, it'll fall through the world.
  • Let's create something to look at by adding a sphere to the world. Select GameObject->Create Other->Sphere. Set its Transform Position to (0,1,3).
  • Finally, let's add a light. GameObjects->Create Other->Directional Light. Its location doesn't matter, but its rotation will determine the angle of the lighting for your scene.
« Last Edit: December 07, 2014, 12:51:25 PM by Syncret »

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Re: Tutorial - Creating a new VR scene from Scratch in Unity3D 4.5
« Reply #1 on: December 07, 2014, 11:54:07 AM »
With this, we have the basics we need for a VR scene: The OVRPlayerController prefab acting as our camera and player object, a plane to give us something to walk on, and the sphere and the light to give us something to look at. Now let's build it and run it in the Rift.

Save your scene. I created a Scenes subdirectory from my Assets directory, and put it there: \UnityProjects\OVRTest\Assets\Scenes\SimpleTestScene.unity

Build your executable.
  • Select File->Build Settings to open up the build settings dialog for your scene.
  • Leave the Platform set to PC, Mac & Linux Standalone.
  • Hit Add Current to add your new scene to your build.
  • Leave your target platform as Windows.
  • Set your architecture to x86_64.
  • Hit Build.
  • It'll ask you where you want to save your exported scene. I like to create an Exported directory in my project directory, and create a subdirectory for each scene I'm exporting: \UnityProjects\OVRTest\Exported\SimpleTestScene
  • Your filename can be whatever you want, but I usually use the name of my scene when I'm doing a simple 1-scene build, so I named mine SimpleTestScene.exe.
  • Hit Save, and Unity will build your scene.
  • You should now see the following in your export folder: SimpleTestScene.exe, SimpleTestScene_DirectToRift.exe, and a SimpleTestScene_Data subdirectory.
Try running SimpleTestScene_DirectToRift.exe. You should now be able to walk around your sphere and look at it in the Rift. If you're using a gamepad, it'll work with your scene.

That's it! You've made a simple Unity scene and gotten it running in the Rift. Now replace that sphere with something more interesting and share it with us! ;)
« Last Edit: December 07, 2014, 12:02:47 PM by Syncret »

PornulusRift

  • VR Porn Fiend
  • ***
  • Posts: 91
    • PornulusRift
Re: Tutorial - Creating a new VR scene from Scratch in Unity3D 4.5
« Reply #2 on: December 07, 2014, 12:23:25 PM »
If you just have 1 model point lights can be okay, but I prefer using a directional light for larger scenes.  It gives uniform lighting (like an outdoor environment for example) over everything.
« Last Edit: December 07, 2014, 12:35:30 PM by PornulusRift »

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Re: Tutorial - Creating a new VR scene from Scratch in Unity3D 4.5
« Reply #3 on: December 07, 2014, 12:51:47 PM »
Good call! Edited.

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Re: Tutorial - Creating a new VR scene from Scratch in Unity3D 4.5
« Reply #4 on: December 07, 2014, 02:28:57 PM »
Also, one change you'll want to make immediately to your OVR camera will be to reduce its near clipping plane.
Just select the OVRCameraRig's LeftEyeAnchor and RightEyeAnchor, and set the Near clipping plane to something small, like 0.01.

This will keep the camera from looking through your character when the viewer gets close.

Testease

  • VR Porn Fiend
  • ***
  • Posts: 75
  • Procrastination: working tomorrow 4 a better today
Re: Tutorial - Creating a new VR scene from Scratch in Unity3D 4.5
« Reply #5 on: December 07, 2014, 09:24:12 PM »
This is just what I needed to get my feet wet, thanks for the training wheels! My sphere is so pretty, all the other spheres are jealous.
If you build a man a fire you keep him warm for a day. If you set a man on fire you keep him warm for the rest of his life.

Syncret

  • VR Porn Fiend
  • ***
  • Posts: 54
Re: Tutorial - Creating a new VR scene from Scratch in Unity3D 4.5
« Reply #6 on: December 07, 2014, 11:40:00 PM »
:) That's my hope. We all win when more of us learn how to make good VR experiences. Looking forward to seeing your stuff!

 

* Download VRtitties

* VRtitties Affiliate Links

* Forum Staff

Will admin Will
Administrator