Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Stereoskopix FOV2GO v3: Stereo 3D VR for Unity!

Discussion in 'Assets and Asset Store' started by phoberman, Jan 9, 2013.

  1. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    Stereoskopix FOV2GO v3: Stereo 3D VR for Unity!



    NEW - VERSION 3!!
    Completely updated, lots of new features, full documentation!
    Now includes scripts for dynamic control of all stereoscopic parameters!
    Create and play Unity games in full immersive stereoscopic 3D!

    • Full control of all stereoscopic parameters!
    • Supports nearly any kind of stereo 3D display system including anaglyph (red/blue)* and side-by-side** for 3DTVs!
    • Works on desktop, web and mobile. Now making a stereoscopic game can be as simple as dropping a script onto your camera setting a few parameters!
    • Has extensive capabilities as a key component of a virtual reality system, using smartphones and tablets with a FOV2GO (or other) stereoscope. Uses gyroscope for untethered, portable VR!
    • Full documentation, example scenes, tutorials, prefabs!
    • With the new S3D Depth Info and S3D Auto Depth scripts, you can visualize and control interaxial and convergence dynamically, keeping parallax within fixed limits (and thereby avoiding eyestrain)!
    • With the new S3D Window script, you can create masking for a dynamic stereo window that automatically takes care of stereo window violations!

    * Unity iOS and/or Unity Android required for mobile platforms. For FOV2GO information, links downloads, visit diy.mxrlab.com
    ** Unity Pro required for formats other than side-by-side.
     
  2. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Hi,
    Thanks for the useful update. I am going to buy it today. But i still have few questions,

    1. If I have multiple cameras working at same time in post process-scene how to apply stereo?
    2. On mobile platform if I have build side-by-side apps, how to have different touch event work in divided screen?

    dev
     
  3. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    @devang_xprt:

    It's definitely possible to have multiple stereo cameras, but the procedure for doing it isn't well documented yet. Can you describe what you want to do in a little more detail I'll try to help you out.

    As far as touch events with side-by-side for mobile platforms, this is covered in the documentation, you can have a cursor that appears for both eyes that is controlled by a single virtual touchpad. Is that what you mean?
     
  4. felix_berninger

    felix_berninger

    Joined:
    Aug 19, 2011
    Posts:
    30
    is there any chance to get the scripts in c#? i need to integrate your plugin into a running c# environment.

    thx in advance
    felix
     
  5. cynel

    cynel

    Joined:
    Apr 18, 2012
    Posts:
    734
    a free upgrade to me but 10 $ for those who didn't download the old versions when it was free
     
  6. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    I'm using unity pro 3.5.7. Is this current system only for unity 4.0? I know the free one you had to upgrade. If it is for 3.5 I definately will get this. Thanks.
     
  7. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    Migueljb: The current version will work with 3.5 and 4.0, but the Asset Store will only let you download it if you have 4.0. I've written to Unity about this problem, but I haven't heard back from them.

    xfelalx: I started to convert the package to C# some time ago, but got busy with other projects and never completed it - I'll get back to it see if I can't get it finished soon.
     
  8. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    This isn't really fair to everybody Unity is doing this. They want everyone to upgrade to 4.0 I get it its business and its a great product. Not everybody is able to or want's to upgrade right now. They should give the asset store developers 2 choices to upgrade both 3.5.7 and 4.0 packages that way you can still make money off both markets and not be forced to chose one. Anyway sorry to get off topic.

    Phoberman any way to buy the Version 3 off you for 3.5.7 instead. Can you email me at mjbenitez001@msn.com so we can discuss how to paypal you the money to get this package. Thanks.
     
  9. indygamer

    indygamer

    Joined:
    Jan 25, 2013
    Posts:
    2
    I agree and go one step further. I would wish for the Stereo3D and VR plugins to come into open source domains so that they get widely adopted and are self sustainable as donationware and serviceware, like the existing Cocos2d, Cocos3d frameworks.
     
  10. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736


    this video help to undestand what to i say.

    thanks in advanced
     
  11. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    @devang_xprt:

    From the video, it looks like you're interested in putting GUI elements on top of the stereo 3D scene. This gets a little more complicated in a stereoscopic scene, because you have to make sure that the GUI elements are closer in stereo space than anything in the scene.

    To do this, you have to create two copies of each GUI element, one for each eye. If you were to simply put a standard GUI element on top of your scene, you would generally get a spatial contradiction that would ruin the 3D stereo effect.

    Fortunately, this is exactly what the s3dGuiText and s3dGuiTexture scripts are designed to do. Check out the section in the manual entitled Script: s3dGuiTexture.js (around page 21), and also the section entitled Script: s3dGuiText.js (around page 25).
     
    Last edited: Jan 28, 2013
  12. UnityCoder

    UnityCoder

    Joined:
    Dec 8, 2011
    Posts:
    534
    I tried your new plugin, its really look very good, one of the cool thing is a auto seperation. I like that feature very much.

    Now i having some problem when i imported your plugin in my projects. I tried it importing in my four projects, three of them works fine but in one project its gives me only mono effect. I done so many experiments but still no luck. I also added all layers and a tag suggested in a documentation.

    So please tell me here i m doing something wrong? Please help me.
     
  13. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    @UnityCoder -

    It's difficult to troubleshoot your project without more details - is there anything different about that project than the other three? Are you using any postprocessing fx? Is there another camera in your scene? One thing to try: if you select leftCam and then select rightCam, do you see a small shift in the little Camera Preview window in the Scene view? Have you tried switching to a different stereo mode (side by side or anaglyph)?
     
  14. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    with this script can i use my computer monitor and a 3d glasses?
     
  15. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    @atmuc:

    With any monitor, Unity Pro, and red/blue glasses, you can view your projects in (anaglyph) 3D.

    With any 3D TV, Unity (free or pro) and appropriate 3D glasses (active or passive), you can view your projects in 3D (the TV decodes side-by-side format into full-screen 3D).

    With a mobile device, appropriate optics (a stereoscope like an FOV2GO viewer) and Unity (free or pro), you can view your projects in 3D (side-by-side format).
     
  16. mengu

    mengu

    Joined:
    Jun 23, 2011
    Posts:
    5
    We have a HTC EVO 3D device, which has an autostereoscopic screen. To run an app in stereo, one has to render their scene as side-by-side stereo and execute a piece of code using HTC's SDK to switch the screen to the autostereoscopic mode. It seems like we can use your plugin to easily render side-by-side stereo, but I'm wondering if your plugin, by any chance, also has the necessary code to interface with the HTC hardware to switch the screen to the autostereoscopic mode.
     
  17. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    i bought it and tried with red/blue glasses, it works well :) i have another glass which i used at cinema. it works on some tv. it is a passive glasses. is it possible to use this glasses on my monitor?
     
  18. U2

    U2

    Joined:
    Aug 12, 2008
    Posts:
    216
    I just bought your asset but all the demos have compilation errors..

    Assets/FOV2GO/Scripts/core/s3dSmoothMouseLook.js(16,19): BCE0004: Ambiguous reference 'Axes': Axes, Axes.

    I just updated to Unity 4.0.1. Maybe that has something to do with it?
     
  19. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    @mengu: Sorry, no. Information on what it would need to do is here: http://www.htcdev.com/devcenter/s3d - if anyone has any idea how this would be implemented in a Unity project, please weigh in.

    @atmuc: No, the cinema glasses require a compatible passive 3D monitor, such as an LG or Vizio 3D TV.

    @U2: Sorry about that. Unfortunately when I tried to upgrade to 4.0.1, it killed my license, and I'm currently unable to run Unity 4 at all. As soon as I get the issue resolved, I'll fix it and post an update - hopefully within a couple of days.
     
  20. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    @U2: I've got Unity 4 working again. I checked, and I can't replicate your error, so it's probably not a problem with the package.

    I would guess that you probably have another script in your project with an enumeration of "Axes" (the line would be "enum Axes [..]" which is conflicting with FOV2GO's enum.js script (in Scripts/Core/).

    To check, you should create an empty Unity project, and then import only the FOV2GO package. The error should go away.
     
  21. Chief73

    Chief73

    Joined:
    Feb 20, 2013
    Posts:
    1
    Hi,

    My 3D-Display support the OVER-UNDER mode. But it need a "Active Blanking Space" between the two sub-frames.
    How can I implement this?

    Regards
    Chief73
     
  22. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,151
    have you tried this package on 3d tvs that uses active and passive glasses? is there any significant difference? nowadays i will buy a 3d tv and try to choose active or passive glassed one.
     
  23. felix_berninger

    felix_berninger

    Joined:
    Aug 19, 2011
    Posts:
    30
    we have a problem with the OnGUI system.

    we are using ONGUI and GUIStyle to create an input textfield.
    Right now the GUI is simply placed over all cameras and it ruins the stereo-picture.

    is there any possibility to get this working with multiple stereo-cameras?
     
  24. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    @Chief73: Sorry, this isn't possible with the current version, but I will add it to the next update, coming soon.

    @atmuc: The package will work with either active or passive sets. The advantage of active 3DTV is full HD resolution; passive 3DTVs alternate pixel rows for the left right views, so you're only getting 1/2 HD resolution. But personally, I much prefer the passive sets: they're brighter, have less ghosting, and the glasses are cheaper and more comfortable.

    @xfelalx: Unfortunately, there really isn't anything I can do about this: OnGUI ignores the camera.rect settings - it always draws across the whole window, so it's basically incompatible with side-by-side stereo.
     
  25. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    340
    Just double checking on this: I need to run my application on an LG 4k TV (reference 84LM9600). The LG documentation states that the monitor's 3D technology is FPR (passive). Can you confirm that your package will work on such screen?

    Tks
     
  26. cyraxchel

    cyraxchel

    Joined:
    Jul 10, 2012
    Posts:
    3
    Hi
    Will your package work in side-by-side mode when project run in the web player?
     
  27. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    @unisip: Yes, I've tested the package on an LG passive TV and it works just fine (in side-by-side/squeezed mode).

    @cyraxchel: Yes, it will run in side-by-side mode in the web player.
     
  28. UnityCoder

    UnityCoder

    Joined:
    Dec 8, 2011
    Posts:
    534
    We tested this package with LG, Samsung (passive) TV's and its works fine with topbottom and sidebyside formats. We also tested it with topbottom and sidebyside projects and its work fine.
     
  29. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    74
    Version 3.0.5 now live on the Asset Store!
    • Now compatible with Unity 3.5, 4.0 and 4.1.
    • Fixed Android gyroscope bug (Unity 4).
    • Over/Under mode now available in Unity Free.
    • Over/Under can be customized just like Side-by-Side.
    Link
     
  30. Yuki-VR

    Yuki-VR

    Joined:
    Apr 25, 2013
    Posts:
    1
    i am a new hand on S3d, mac unity4.1 user.
    With this script, could i use 2 projectors to project the S3d game image on wall?
    Thanks for help anyway^^
     
  31. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Hi


    Can new ver... of fov 2 go is work with multi-camera.i need it.help me. Because i used to camera 1 for UI and 1 for all objects and 2 camera also have some color-correction. If i use 1 camera than color correction also effects the UI that's why i used 2 camera but i don't know it's work with fov 2 go or not. Plase help me.


    play_edu
     
    Last edited: Jul 20, 2013
  32. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    +1
     
  33. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Hi,
    I have no issue if UI(NGUI) always remain front but get me help for malti -camera. because 2 copy of UI is no solution for it.If you solved this problem. I'll ready to buy your update next time but get me help. Because Render to texture not overlap itch-other(alpha problem) that's way i got this type of problem.help me.


    regards,
    play_edu
     
    Last edited: Jul 29, 2013
  34. zlSimon

    zlSimon

    Joined:
    Apr 11, 2013
    Posts:
    31
    Hi,
    Great work on the plugin!
    I am using your plugin with a autostereoscopic display and it just works very good out of the box! I was trying to setup my camera
    the way it was in the Demo_3DTV_Plus and I get a nice 3D effect. However I want to enhance the 3D effect even more
    and I was wondering if you could give me some hints.
    I have a static camera and a scene with some small objects in it. Those objects should appear "in front of" the monitor as
    close to the user as possible and I don't know which values I have to tweak to enhance this effect.
    At the moment when I start the scene those object are just "behind" the monitor and only if I get very close to them
    (and they get bigger of course) parts of the object appear in front of the monitor.

    So my question is how to place small object as close to the user as possible.

    Any help is highly appreciated.
     
  35. mysterben

    mysterben

    Joined:
    Jun 19, 2012
    Posts:
    7
    Hi there, I've updated an older project I created with Unity 3 to Unity 4.3 using your latest version 3.06 and the gyro no longer works on both my iPhone5 and iPad3 (ios 7.0.2). None of the demo scene's gyro function either. Is there any help you could provide please?
     
  36. mysterben

    mysterben

    Joined:
    Jun 19, 2012
    Posts:
    7
    Anyone there? I'm dead in the water at the moment so could really do with your help thanks:)
     
  37. oogawagga

    oogawagga

    Joined:
    Nov 8, 2013
    Posts:
    5
    Hi,

    I'm in the same boat as mysterben. The gyro doesn't seem to work on the mobile devices I tested either. How can we get that operational?

    Also, for some reason the view gets distorted when the SBS prefab is connected to the generic first person controller... Anybody else experience that?

    Thanks!
     
    Last edited: Jan 5, 2014
  38. kaushik-d

    kaushik-d

    Joined:
    Aug 25, 2011
    Posts:
    19
    This is more of an FYI, thought it might help others that might face the same problem.
    Everything was working well with Unity 4.5.0. But Side-by-Side stereo stopped working on some 3D TVs (particularly LG) after upgrading to 4.5.3. It turns out that Unity has introduced a new option in PlayerSetting for Windows builds - "D3D9 Fullscreen Mode". By default this is set to "FullScreenWindow". This needs to be changed to "ExclusiveMode" for the troublesome 3DTVs to detect the game output as 3D.
     
  39. psychicvrlab

    psychicvrlab

    Joined:
    Oct 29, 2014
    Posts:
    14
    Hi,
    As other people said, I have the same problem. Gyro functions don't work on my iOS devices. None of demo scenes works with gyro on my iPhone 5s and iPad mini2.
    Unity 4.6.2 pro + iOS pro
    FOV2GO 3.06
    iOS 8.1.3
     
  40. psychicvrlab

    psychicvrlab

    Joined:
    Oct 29, 2014
    Posts:
    14
    Hi,
    I found the reason why gyro doesn't work on mobile devices.
    The code was not expected to work with higher than Unity 4.1

    I deleted some lines regarding to version check. (So the modified code doesn't work with Unity 3.5)

    Replace the following code to
    /Assets/FOV2GO/Scripts/core/s3dGyroCam.js

    It should work.

    Code (JavaScript):
    1. #pragma strict
    2.  
    3. static var gyroBool : boolean = false;
    4. private var gyro : Gyroscope;
    5. private var compass : Compass;
    6. private var quatMult : Quaternion;
    7. private var quatMap : Quaternion;
    8. private var prevScreenOrientation: ScreenOrientation;
    9.  
    10. // camera grandparent node to rotate heading
    11. private var camParent: GameObject;
    12. private var camGrandparent : GameObject;
    13. public var heading : float = 0;
    14. public var Pitch : float = 0;
    15. public var setZeroToNorth : boolean = true;
    16. public var checkForAutoRotation : boolean = false;
    17.  
    18. // mouse/touch input
    19. public var touchRotatesHeading : boolean;
    20. private var headingAtTouchStart : float;
    21. private var pitchAtTouchStart : float;
    22. private var mouseStartPoint: Vector2;
    23.  
    24. private var screenSize : Vector2;
    25. @script AddComponentMenu ("Stereoskopix/s3d Gyro Cam")
    26.  
    27. function Awake() {
    28.     // find the current parent of the camera's transform
    29.     var currentParent = transform.parent;
    30.     // instantiate a new transform
    31.     camParent = new GameObject ("camParent");
    32.     // match the transform to the camera position
    33.     camParent.transform.position = transform.position;
    34.     // make the new transform the parent of the camera transform
    35.     transform.parent = camParent.transform;
    36.     // instantiate a new transform
    37.     camGrandparent = new GameObject ("camGrandParent");
    38.     // match the transform to the camera position
    39.     camGrandparent.transform.position = transform.position;
    40.     // make the new transform the grandparent of the camera transform
    41.     camParent.transform.parent = camGrandparent.transform;
    42.     // make the original parent the great grandparent of the camera transform
    43.     camGrandparent.transform.parent = currentParent;
    44.      
    45.     // check whether device supports gyroscope
    46.         gyroBool = SystemInfo.supportsGyroscope;
    47.  
    48.         if (gyroBool) {
    49.         prevScreenOrientation = Screen.orientation;
    50.         gyro = Input.gyro;
    51.         gyro.enabled = true;
    52.      
    53.         if (setZeroToNorth) {
    54.             compass = Input.compass;
    55.             compass.enabled = true;
    56.         }
    57.  
    58.         fixScreenOrientation();
    59.      
    60.     }
    61.     Screen.sleepTimeout = SleepTimeout.NeverSleep;
    62. }
    63.  
    64. function Start() {
    65.     if (gyroBool) {
    66.         if (setZeroToNorth) {
    67.             turnToFaceNorth();
    68.         }
    69.     }
    70.     screenSize.x = Screen.width;
    71.     screenSize.y = Screen.height;
    72.     #if (UNITY_IPHONE || UNITY_ANDROID) && ! UNITY_EDITOR
    73.         if (checkForAutoRotation) {
    74.             InvokeRepeating("checkAutoRotation",1.0,1.0);
    75.         }
    76.     #endif
    77. }
    78.  
    79. function turnToFaceNorth() {
    80.     yield WaitForSeconds(1);
    81.     heading = Input.compass.magneticHeading;
    82. }  
    83.  
    84.  
    85. function Update () {
    86.     if (gyroBool) {
    87.         #if UNITY_IPHONE || (UNITY_ANDROID
    88.             quatMap = gyro.attitude;
    89.         #endif
    90.         transform.localRotation = quatMap * quatMult;
    91.     }
    92.  
    93.     if (touchRotatesHeading) {
    94.         GetTouchMouseInput();
    95.     }
    96.     camGrandparent.transform.localEulerAngles.y = heading;
    97.     // only update pitch if in Unity Editor (on device, pitch is handled by gyroscope)
    98.     #if UNITY_EDITOR
    99.         transform.localEulerAngles.x = Pitch;
    100.     #endif
    101. }
    102.  
    103. function checkAutoRotation() {
    104.     // check if Screen.orientation has changed
    105.     if (prevScreenOrientation != Screen.orientation) {
    106.         // fix gyroscope orientation settings
    107.         fixScreenOrientation();
    108.         // also need to fix camera aspect
    109.         fixCameraAspect();
    110.     }
    111.     prevScreenOrientation = Screen.orientation;
    112. }
    113.  
    114. function fixCameraAspect() {
    115.     var theCamera : s3dCamera;
    116.     yield WaitForSeconds(1);
    117.     theCamera = GetComponent(s3dCamera);
    118.     if (!theCamera.useStereoShader) {
    119.         if (theCamera) theCamera.fixCameraAspect();
    120.     }
    121. }
    122.  
    123. function fixScreenOrientation() {  
    124.     #if UNITY_IPHONE
    125.         camParent.transform.eulerAngles = Vector3(90,90,0);
    126.         quatMult = Quaternion(0,0,1,0);
    127.     #endif
    128.  
    129.     #if UNITY_ANDROID
    130.         camParent.transform.eulerAngles = Vector3(90,0,0);
    131.          quatMult = Quaternion(0,0,1,0);
    132.     #endif
    133. }
    134.  
    135. function GetTouchMouseInput() {
    136.     if(Input.GetMouseButtonDown(0)) {
    137.         mouseStartPoint = Input.mousePosition;
    138.         headingAtTouchStart = heading;
    139.         #if UNITY_EDITOR
    140.             pitchAtTouchStart = Pitch;
    141.         #endif
    142.     } else if (Input.GetMouseButton(0)) {
    143.         var delta : Vector2;
    144.         var mousePos = Input.mousePosition;
    145.         delta.x = (mousePos.x - mouseStartPoint.x)/screenSize.x;
    146.         heading = (headingAtTouchStart+delta.x*100);
    147.         heading = heading%360;
    148.         #if UNITY_EDITOR
    149.             delta.y = (mousePos.y - mouseStartPoint.y)/screenSize.y;
    150.             Pitch = (pitchAtTouchStart+delta.y*-100);
    151.             Pitch = Mathf.Clamp(Pitch%360, -60, 60);
    152.         #endif
    153.     }
    154. }
    155.  
     

    Attached Files: