Making my Unity Game with Stereoscopic View (VR) - unity3d

I have built a Unity3D + Google Tango based game on the NVidia Dev. device. Everything seems to work fine, but now I would like to play this game in stereoscopic view (For Dive Goggles). I looked at the ExperimentalVirtualReality example (https://github.com/googlesamples/tango-examples-unity/tree/master/UnityExamples/Assets/TangoExamples/ExperimentalVirtualReality) and was successfully able to port all the prefabs into my game, but for some reason the experience is not satisfactory.
The stereoscopic view of my game tends to over lap with each other when I look through the Dive goggles. The experience is a quite off.
I noticed that there are some public parameters on the TangoVR Player Object in Unity Project for 'IPD in MM', 'Screen Width in MM', 'Eye Offset in MM', etc. Do I have to play around with any of these. What does these values even represent?
Any help or pointers will be greatly helpful and appreciated.

IPD would be Inter-Pupillary Distance, while offset is the distance from your eye to the 'point of articulation' when you move your head.
This describes it (with pictures!): http://gamasutra.com/blogs/NickWhiting/20130611/194007/Integrating_the_Oculus_Rift_into_Unreal_Engine_4.php

I've found when trying to use cardboard lenses on devices with wider displays than the fov of the lenses you get an unsatisfactory experience.
This has to do with the lenses not being in the center of the frame, when focused at the display.
To circumnavigate this with larger devices you can push in the margins of the stereoscopic views. For the tango, with testing standard cardboard lenses I found that things work nicely if they were pushed in about an inch. The apps on the play store, Tango Mini Town and Tango Mini Village do a nice job of demonstrating this work around.
The ideal way to get this working would be with google cardboard and a proper tango tablet 7 inch view controller, but currently the cardboard app is incompatible with the tango. Fingers crossed for cardboard support.
As far as simply playing around with an optimal view points in unity, one can modify the view port rect on the stereo camera inspector menu in unity to get the ideal experience for a specific device with what ever controller you choose.

Thanks for all those who helped answer this. Many of my concepts definitely got cleared but nothing got me close to an actual solution. After researching a lot, I finally found this article (http://www.talkingquickly.co.uk/2014/11/google-cardboard-unity-tutorial/) super useful. it basically tells me to implement the Durovis SDK (https://www.durovis.com/sdk.html) with its Unity package.
Everything was pretty straightforward and experience I got from it was so far the best.

Related

Can you use the headset camera on the HTC Vive in Unity

I'm working in unity(2018) and building for the HTC Vive VR headset. I had an idea to use the small camera on the front of the headset to make an AR system, as in run the video from the headsets camera to the headset view to then be able to overlap things from a unity environment. But unfortunately, I can't seem to find any examples of others doing this (other than the Tron blue outline system that the Vive comes with) though perhaps I'm not looking with the right keywords.
If anyone has seen something like this or know if it can be done I'd greatly appreciate it.
It is registered as a standard WebCam, so you should be able to use Unitys WebCamTexture.
But the resolution of the cameras is very low.

Unity game flipped after deploying

I havea game that uses ARCamera from Vuforia. When running in Unity the game works no problem. After I deploy the game to UWP, however, it seems that every thing has flipped. Almost as if I was looking at the game from the back. Even the writing is reversed. when deploying the game to android devices this does not happen. Does anyone have an idea how to solve this?
Thanks in advance
There is a ReflectionMode which flips the view horizonally. This is used when using a front facing camera.
If you look at the 'Vuforia Core Samples Example' from the asset store, they have a CameraManager script that shows how to handle camera configuration.

Unity: 3D screen resolution android

So far I have only encountered tutorials and stackoverflow answers that address 2D and UI issues. Mine is a bit different I feel because it pertains to 3D games. I have a 3D game that I try to build on android using Unity remote, but for some reason it comes out being stretched out on my phone. How do I go about addressing this? Does it have to do with the camera?? Does the Fit All Screen Size asset resolve this (https://www.assetstore.unity3d.com/en/#!/content/22132) or is it only for 2D things? Thanks for your time! :)
Screen shot from Unity Remote via mobile phone. You can see how it's quite stretched out here:

Unity gear VR reticle pointer shows double when focusing on close objects

I'm developing a VR app in Unity for the Samsung Gear VR and I'm trying to implement a pointer so the user can interact with the objects in the scene. When you look at distant objects it looks fine, but when you focus on close objects (which is highly needed for the app mechanics) the pointer appears to be duplicated, so you need to center the desired object in the middle of the points :P
What I've tried
-Using the GvrReticlePointer that comes with the GoogleVR package for cardboard
-Creating my own pointer by adding a canvas to the main camera with an image in the center
-Changing some of the Camera settings like field of view, stereo separation, etc.
-Configure my phone via a QR code http://imgur.com/fVrNrQk
Steps to reproduce (With canvas added to camera)
1.- Create a simple scene with a few objects to look at in Unity
2.- Set build settings for android
3.- Configure player settings to enable "Virtiual Reality Supported"
4.- Add Oculus as Virtual Reality SDK
5.- Set package name and minimum API level
6.- Add a canvas to the camera
7.- Add an image to the canvas, a cross will do the job
Observations
I'm using Unity 5.6.0b10 since google cardboard's site recommends using this version for the GoogleVR package. And I'm using the Samsung Gear VR with a Samsung Galaxy S6 edge + phone.
Solved
Apparently this is a well documented issue called voluntary Diplopia, and it's a human bug not a software one (read here, Unity's documentation, section The Reticle Interaction in VR).
The problem is trying to put the reticle at a fixed point in the user interface, like traditional 3D games. When looking at closer objects in VR this is going to cause this seeing double problem.
The solution is to position the reticle at the point in the 3D space the user is looking at. If he's looking closer, the reticle is drawn closer. Of course now you also have to scale the reticle accordingly, so the users can see it the same size no matter where they're looking at.
Unity also provides some example scripts about this, you can find them in the assets store, is called VR Samples.
Now I have performance issues (I'm working on mobile platforms): sometimes, when you turn your head fast you can see the reticle where it was drawn before. But looks way better than the double reticle version.

How can I calibrate the accelerometer?

I'm using the accelerometer to move an object on my screen.
It's only working when the iphone is flat.
If I use the iPhone in another position, the object is not moving like I want
(the Y axis is not well managed).
So, I've to calibrate the position of the accelerometer, I guess.
But I've no idea how to do this.
Please help me.
Thanks in advance.
Regards,
ALpesH
hi hope all is well.
A simple google search came up with this beautiful post.
It is exactly what you wanted. A tutorial on Accelerometer Calibration & Optimizations.
This tutorial assumes you know the basics of the accelerometer. If not there are plenty of tutorials on google that will help get you accustomed to the accelerometer basics.
This tutorial will focus on 3 things:
Calibrating the accelerometer so the user can play your game from any
position.
Changing the "sensitivity" of your object's movement.
Adding the option to "invert" the controls.
First off, why bother adding these features? Simple. Launch your accelerometer based game and try the following tests:
Play sitting up in perfect position.
List item
Play it slouched over.
Play it lying down on your side.
Play it lying on your back with the device parallel to the floor and
the screen facing you.
Obtained from this website:
http://www.iphonedevsdk.com/forum/iphone-sdk-tutorials/39833-tutorial-accelerometer-calibration-optimizations.html
Let me know if this helps if it does choose this as the answer.
Other than that if you need any more help let me know
Ive implemented this tutorial code in my own app and i am not playing a simple ping pong game upside down and also playing it on the side whilst lying on the bed. :D
Pk