This tutorial will teach you about:
- The stereo camera rig
- 3-DOF Orientation Tracking
- Previewing your experience in the editor
- Scene lighting
- Stereoscopic best practices
Open the Mira101 scene in Assets -> MiraSDK -> Template Scenes -> Tutorials
Press play! If you do not have the Unity Remote App connected, you can click and drag in the game window to look around
This is great for quickly checking out your scene, but wouldn't it be awesome if you could preview your app in the headset, directly from the Unity Editor? Fortunately, you can!!
You'll need to download Unity Remote 5 directly onto your phone from the iOS App Store. The unity remote streams the editor game view to your phone screen, and gives gyroscope data from your phone to Unity. This allows you to look around the scene, and preview a 3-DOF experience in stereo!
To set up the Unity Remote App, follow the instructions on our Editor Tools Page:
Preview your App in Unity Editor
Don't worry about all the controller stuff on the editor tools page just yet - we'll get to that!
But do I need the Unity Remote App?
While the Unity remote app is not necessary, it is highly recommended. It dramatically speeds up iteration time, by not having to build to see your changes!
Once you have the Remote app set up, put your phone into the headset, plug your phone into your computer, and put it on your head! Hit play, and look around the scene
Unity Remote Orientation Gets Stuck
While using the Unity Remote App, if you turn the phone and the device orientation flips, it can get stuck in that orientation. To fix this, exit play mode and hit play again, with your phone already on your head
You'll notice that shadows look very different on the headset than they do on your screen.
The Mira display is purely additive - The brighter a pixel is, the more prominent it will appear on the display. Anything that renders as black on the phone screen becomes the absence of light - and will appear transparent
If you are utilizing tracking in your application, keep in mind that when tracking, the camera is moving around the scene (the marker is always stationary). For this reason, if the marker is spun, and the lights are not parented to anything, your lights will spin around your objects. If this doesn't make sense right now, don't worry about it - it will be discussed in greater detail in the Mira 103 tutorial.
For these reasons, we love using the Flatlighting Shader created by Bogdan Gochev. It's optimized for mobile, and the gradients and bright colors look incredible on the Prism display. We recommend setting the gradients to local space, so the object is always perfectly lit, no matter where it is in the scene.
He's licensed it to us, and it is included as a part of our SDK, to be included in your Mira Apps!
For more information on the shader, see the asset store page: https://www.assetstore.unity3d.com/en/#!/content/67730
Now go light it up!!
All components of the Mira Camera Rig are based on physically-accurate values. The right and left cameras are spaced by the user's inter-pupillary distance, so your scene scale is very important when rendering stereo images
Make sure to read the Stereo Best Practices Guide: Stereo Best Practices
The Stereo TLDR:
Keep objects in the stereoscopic comfort zone, between 0.3 meters and 4 meters. The further you move an object away, the more difficult it will be for the user to converge on it. If you would like to display text, the most clear, readable distance is 0.608 meters, or 2 feet from the camera rig
Try scaling up and down the SolarSystem GameObject, and observe the effect on scale and depth perception.
Now that you're up and running with the Mira AR camera rig, let's get the controller connected to the Unity Editor!