Search Unity

Active Stereoscopy using DLP TV

Discussion in 'Editor & General Support' started by CFSystems, Aug 15, 2010.

  1. CFSystems

    CFSystems

    Joined:
    Jun 4, 2010
    Posts:
    1
    I've found a pretty reasonable solution for active stereoscopy that I've been using with my Mac using Quartz Composer and now am making it work in Unity.

    I bought a brand new 60" Mitsubishi DLP (3d Ready) TV for $900. That is the smallest one believe it or not. They have a 73" for $1500 and even an 82".
    They use the checkerboard interlaced method which is more forgiving if frame rates drop since both right and left and drawn at the same time in my Mac and the DLP TV takes care of the rest. Video input standard is 1920x1080p @60hz.

    I also bought a pair of shutter glasses and emitter. These work fine but are a little heavier than I would like and eventually bother the bridge of my nose.
    http://www.i-glassesstore.com/dlp3d-wireless-2set.html


    I'm still quite new to Unity but have got Unity outputting the correct format thanks to a post and project upload by Ekzuzy.
    http://forum.unity3d.com/viewtopic.php?t=33761&highlight=stereoscopy

    His project outputted stereo in interlaced format. I just tweaked his shader to make it a checkerboard pattern which works with my DLP TV.

    from this (interlaced)
    int x = fmod( IN.uv.y, 2 );

    to this (checkerboard)
    int x = fmod(floor( IN.uv.x) + floor(IN.uv.y),2) <1;

    Although this method works, it doesn't appear to be drawing each camera in sync with the other which makes panning in the scene hard to look at. I believe every other frame is left eye and every other is the right.

    I've currently been experimenting with the Anaglyph Camera script that has been building in the "Stereo - Anagylph Rendering HELP!!! ;)" thread and have been pretty happy with it since it now has the correction for the projection matrix and is quite elegant how it just has to be attached to one camera and handles the rest. Big props to all those who contributed to that thread

    here's the current Anaglyph script I'm using

    Code (csharp):
    1.  
    2. var anaglyphMat;
    3.  
    4. var leftEyeRT;    
    5. var rightEyeRT;
    6.  
    7. var leftEye;
    8. var rightEye;
    9.  
    10. var enableKeys             : boolean    = true;
    11.  
    12. var downEyeDistance       : KeyCode    = KeyCode.O;
    13. var upEyeDistance          : KeyCode    = KeyCode.P;
    14. var downFocalDistance       : KeyCode    = KeyCode.K;
    15. var upFocalDistance       : KeyCode    = KeyCode.L;
    16.  
    17. var zvalue               : float      = 0.0; // original: 1.0
    18.  
    19. class S3DV extends System.Object {
    20.    static var eyeDistance = 0.035;
    21.    static var focalDistance = 6.5;
    22. };
    23.  
    24. function Start () {
    25.    leftEye = new GameObject ("leftEye", Camera);
    26.    rightEye = new GameObject ("rightEye", Camera);
    27.    
    28.    leftEye.camera.CopyFrom (camera);
    29.    rightEye.camera.CopyFrom (camera);
    30.    
    31.    leftEyeRT = new RenderTexture (Screen.width, Screen.height, 24);
    32.    rightEyeRT = new RenderTexture (Screen.width, Screen.height, 24);
    33.    
    34.    anaglyphMat = new Material
    35.    (    
    36.       "Shader \"Hidden/Anaglyph\"" +
    37.       "{" +
    38.       "    Properties" +
    39.       "    {" +
    40.       "        _Color (\"Main Color, Alpha\", Color) = (1,1,1,1)" +
    41.       "        _LeftTex (\"Left (RGB)\", RECT) = \"white\" {}" +
    42.       "        _RightTex (\"Right (RGB)\", RECT) = \"white\" {}" +
    43.       "    }" +
    44.       "    Category" +
    45.       "    {" +
    46.       "        ZWrite Off" +
    47.       "        ZTest Always" +
    48.       "        Lighting On" +
    49.       "        Tags {Queue=Transparent}" +
    50.       "        SubShader" +
    51.       "        {" +
    52.       "            Pass" +
    53.       "            {" +
    54.       "               ColorMask R" +
    55.       "               Cull Off" +
    56.       "               Material" +
    57.       "               {" +
    58.       "                   Emission [_Color]" +
    59.       "               }" +
    60.       "" +              
    61.       "              SetTexture [_LeftTex]" +
    62.       "               {" +
    63.       "                   Combine texture * primary, texture + primary" +
    64.       "               }" +
    65.       "           }" +
    66.       "" +            
    67.       "           Pass" +
    68.       "            {" +
    69.       "               ColorMask GB" +
    70.       "               Cull Off" +
    71.       "               Material" +
    72.       "               {" +
    73.       "                   Emission [_Color]" +
    74.       "               }" +
    75.       "" +            
    76.       "               SetTexture [_RightTex]" +
    77.       "               {" +
    78.       "                   Combine texture * primary, texture + primary" +
    79.       "               }" +
    80.       "           }" +
    81.       "       }" +
    82.       "    }" +
    83.       "}"
    84.    );
    85.    
    86.    leftEye.camera.targetTexture = leftEyeRT;
    87.    rightEye.camera.targetTexture = rightEyeRT;
    88.      
    89.    anaglyphMat.SetTexture ("_LeftTex", leftEyeRT);
    90.    anaglyphMat.SetTexture ("_RightTex", rightEyeRT);
    91.      
    92.    leftEye.camera.depth = camera.depth -2;
    93.    rightEye.camera.depth = camera.depth -1;
    94.    
    95.    leftEye.transform.position = transform.position + transform.TransformDirection(-S3DV.eyeDistance, 0, 0);
    96.    rightEye.transform.position = transform.position + transform.TransformDirection(S3DV.eyeDistance, 0, 0);
    97.    
    98.    leftEye.transform.rotation = transform.rotation;
    99.    rightEye.transform.rotation = transform.rotation;
    100.    
    101.    leftEye.transform.LookAt (transform.position + (transform.TransformDirection (Vector3.forward) * S3DV.focalDistance));
    102.    rightEye.transform.LookAt (transform.position + (transform.TransformDirection (Vector3.forward) * S3DV.focalDistance));
    103.    
    104.    leftEye.transform.parent = transform;
    105.    rightEye.transform.parent = transform;
    106.    
    107.    //camera.cullingMask = 0;
    108.    //camera.backgroundColor = Color (0,0,0,0);
    109.    //camera.Render();
    110.    //camera.clearFlags = CameraClearFlags.Nothing;
    111.    //camera.enabled = false;
    112. }
    113.  
    114. function Stop () {
    115. }
    116.  
    117. function UpdateView() {
    118.    leftEye.camera.depth = camera.depth -2;
    119.    rightEye.camera.depth = camera.depth -1;
    120.    
    121.    leftEye.transform.position = transform.position + transform.TransformDirection(-S3DV.eyeDistance, 0, 0);
    122.    rightEye.transform.position = transform.position + transform.TransformDirection(S3DV.eyeDistance, 0, 0);
    123.    
    124.    leftEye.transform.rotation = transform.rotation;
    125.    rightEye.transform.rotation = transform.rotation;
    126.    
    127.    leftEye.camera.projectionMatrix = projectionMatrix(true);
    128.    rightEye.camera.projectionMatrix = projectionMatrix(false);
    129.    
    130.    leftEye.transform.LookAt (transform.position + (transform.TransformDirection (Vector3.forward) * S3DV.focalDistance));
    131.    rightEye.transform.LookAt (transform.position + (transform.TransformDirection (Vector3.forward) * S3DV.focalDistance));
    132.    
    133.    leftEye.transform.parent = transform;
    134.    rightEye.transform.parent = transform;
    135.  
    136. }
    137.  
    138. function LateUpdate() {
    139.    UpdateView();
    140.    
    141.    if (enableKeys) {
    142.       // o and p
    143.       var eyeDistanceAdjust : float = 0.01;
    144.       if (Input.GetKeyDown(upEyeDistance)) {
    145.          S3DV.eyeDistance += eyeDistanceAdjust;
    146.       } else if (Input.GetKeyDown(downEyeDistance)) {
    147.          S3DV.eyeDistance -= eyeDistanceAdjust;
    148.       }
    149.        
    150.       // k and l
    151.       var focalDistanceAdjust : float = 0.5;
    152.       if (Input.GetKeyDown(upFocalDistance)) {
    153.          //Debug.Log("focal up");
    154.          S3DV.focalDistance += focalDistanceAdjust;
    155.       } else if (Input.GetKeyDown(downFocalDistance)) {
    156.          S3DV.focalDistance -= focalDistanceAdjust;
    157.       }
    158.    }
    159. }
    160.  
    161. function OnRenderImage (source:RenderTexture, destination:RenderTexture) {
    162.    RenderTexture.active = destination;
    163.    GL.PushMatrix();
    164.    GL.LoadOrtho();
    165.    for(var i:int = 0; i < anaglyphMat.passCount; i++) {
    166.       anaglyphMat.SetPass(i);
    167.       DrawQuad();
    168.    }
    169.    GL.PopMatrix();
    170. }
    171.  
    172. private function DrawQuad() {
    173.    GL.Begin (GL.QUADS);        
    174.       GL.TexCoord2( 0.0, 0.0 ); GL.Vertex3( 0.0, 0.0, zvalue );
    175.       GL.TexCoord2( 1.0, 0.0 ); GL.Vertex3( 1.0, 0.0, zvalue );
    176.       GL.TexCoord2( 1.0, 1.0 ); GL.Vertex3( 1.0, 1.0, zvalue );
    177.       GL.TexCoord2( 0.0, 1.0 ); GL.Vertex3( 0.0, 1.0, zvalue );
    178.    GL.End();
    179. }
    180.  
    181. function PerspectiveOffCenter(
    182.     left : float, right : float,
    183.     bottom : float, top : float,
    184.     near : float, far : float ) : Matrix4x4
    185. {        
    186.     var x =  (2.0 * near) / (right - left);
    187.     var y =  (2.0 * near) / (top - bottom);
    188.     var a =  (right + left) / (right - left);
    189.     var b =  (top + bottom) / (top - bottom);
    190.     var c = -(far + near) / (far - near);
    191.     var d = -(2.0 * far * near) / (far - near);
    192.     var e = -1.0;
    193.  
    194.     var m : Matrix4x4;
    195.     m[0,0] = x;  m[0,1] = 0;  m[0,2] = a;  m[0,3] = 0;
    196.     m[1,0] = 0;  m[1,1] = y;  m[1,2] = b;  m[1,3] = 0;
    197.     m[2,0] = 0;  m[2,1] = 0;  m[2,2] = c;  m[2,3] = d;
    198.     m[3,0] = 0;  m[3,1] = 0;  m[3,2] = e;  m[3,3] = 0;
    199.     return m;
    200. }
    201.  
    202. function projectionMatrix(isLeftEye : boolean) : Matrix4x4 {
    203.    var left : float;
    204.    var right : float;
    205.    var a : float;
    206.    var b : float;
    207.    var fov : float;
    208.    
    209.    fov = camera.fieldOfView / 180.0 * Mathf.PI;  // convert FOV to radians
    210.  
    211.    var aspect : float = camera.aspect;
    212.  
    213.    a = camera.nearClipPlane * Mathf.Tan(fov * 0.5);
    214.    b = camera.nearClipPlane / S3DV.focalDistance;
    215.    
    216.    if (isLeftEye)      // left camera
    217.    {
    218.       left  = - aspect * a + (S3DV.eyeDistance) * b;
    219.       right =   aspect * a + (S3DV.eyeDistance) * b;
    220.    }
    221.    else         // right camera
    222.    {
    223.       left  = - aspect * a - (S3DV.eyeDistance) * b;
    224.       right =   aspect * a - (S3DV.eyeDistance) * b;
    225.    }
    226.  
    227.     return PerspectiveOffCenter(left, right, -a, a, camera.nearClipPlane, camera.farClipPlane);
    228.      
    229. }
    230.  

    My hope is to embed the CG shader fragment from the one project with the Anaglyph Camera script and I've made several attempts. Here's what I have currently. I does not run correctly and has the following errors. (see attachment) Unfortunately I'm still very new to Unity, Shaderlab, and shader writing in general and can't get figure out the errors.


    Code (csharp):
    1.  
    2. var checkerMat;
    3.  
    4. var leftEyeRT;    
    5. var rightEyeRT;
    6.  
    7. var leftEye;
    8. var rightEye;
    9.  
    10. var enableKeys             : boolean    = true;
    11.  
    12. var downEyeDistance       : KeyCode    = KeyCode.O;
    13. var upEyeDistance          : KeyCode    = KeyCode.P;
    14. var downFocalDistance       : KeyCode    = KeyCode.K;
    15. var upFocalDistance       : KeyCode    = KeyCode.L;
    16.  
    17. var zvalue               : float      = 0.0; // original: 1.0
    18.  
    19. class S3DV extends System.Object {
    20.    static var eyeDistance = 0.035;
    21.    static var focalDistance = 6.5;
    22. };
    23.  
    24. function Start () {
    25.    leftEye = new GameObject ("leftEye", Camera);
    26.    rightEye = new GameObject ("rightEye", Camera);
    27.    
    28.    leftEye.camera.CopyFrom (camera);
    29.    rightEye.camera.CopyFrom (camera);
    30.    
    31.    leftEyeRT = new RenderTexture (Screen.width, Screen.height, 24);
    32.    rightEyeRT = new RenderTexture (Screen.width, Screen.height, 24);
    33.    
    34.    checkerMat = new Material
    35.    (    
    36.       "Shader \"Hidden/CheckerStereocopy\"" +
    37.       "{" +
    38.       "    Properties" +
    39.       "    {" +
    40.       "        _LeftTex (\"Left (RGB)\", RECT) = \"white\" {}" +
    41.       "        _RightTex (\"Right (RGB)\", RECT) = \"white\" {}" +
    42.       "    }" +
    43.  
    44.       "    SubShader" +
    45.       "     {" +
    46.       "     Pass " +
    47.       "     { " +
    48.       "         ZTest Always " +
    49.       "         Cull Off " +
    50.       "         ZWrite Off" +
    51.       "         Fog " +
    52.       "         {  " +
    53.       "             Mode off " +
    54.       "         } "+
    55.       ""+
    56.       "         CGPROGRAM" +
    57.       ""+
    58.       "         #include \"UnityCG.cginc\" "+
    59.       "         #pragma vertex vert_img "+
    60.       "         #pragma fragment frag "+
    61.       "         #pragma fragmentoption ARB_precision_hint_fastest "+
    62.       ""+
    63.       "         uniform samplerRECT _LeftTex; "+
    64.       "         uniform samplerRECT _RightTex; "+
    65.       ""+
    66.       "         float4 frag( v2f_img IN ) : COLOR0 "+
    67.       "         { "+
    68.       "             float3 left = texRECT( _LeftTex, IN.uv ).rgb;   "+      // Sample scene texture
    69.       "             float3 right = texRECT( _RightTex, IN.uv ).rgb; "+  // Sample scene texture
    70.       ""+          
    71.       "             int x = fmod(floor( IN.uv.x) + floor(IN.uv.y),2) <1; "+
    72.       ""+          
    73.       "             return float4( lerp( left, right, x ), 0.0 ); "+
    74.       "          }  "+
    75.       ""+
    76.       "         ENDCG  "+
    77.       ""+
    78.       "         } "+
    79.       "   }"+
    80.       "  Fallback Off "+
    81.       "}"
    82.    );
    83.    
    84.    leftEye.camera.targetTexture = leftEyeRT;
    85.    rightEye.camera.targetTexture = rightEyeRT;
    86.      
    87.    checkerMat.SetTexture ("_LeftTex", leftEyeRT);
    88.    checkerMat.SetTexture ("_RightTex", rightEyeRT);
    89.      
    90.    leftEye.camera.depth = camera.depth -2;
    91.    rightEye.camera.depth = camera.depth -1;
    92.    
    93.    leftEye.transform.position = transform.position + transform.TransformDirection(-S3DV.eyeDistance, 0, 0);
    94.    rightEye.transform.position = transform.position + transform.TransformDirection(S3DV.eyeDistance, 0, 0);
    95.    
    96.    leftEye.transform.rotation = transform.rotation;
    97.    rightEye.transform.rotation = transform.rotation;
    98.    
    99.    leftEye.transform.LookAt (transform.position + (transform.TransformDirection (Vector3.forward) * S3DV.focalDistance));
    100.    rightEye.transform.LookAt (transform.position + (transform.TransformDirection (Vector3.forward) * S3DV.focalDistance));
    101.    
    102.    leftEye.transform.parent = transform;
    103.    rightEye.transform.parent = transform;
    104.    
    105.    //camera.cullingMask = 0;
    106.    //camera.backgroundColor = Color (0,0,0,0);
    107.    //camera.Render();
    108.    //camera.clearFlags = CameraClearFlags.Nothing;
    109.    //camera.enabled = false;
    110. }
    111.  
    112. function Stop () {
    113. }
    114.  
    115. function UpdateView() {
    116.    leftEye.camera.depth = camera.depth -2;
    117.    rightEye.camera.depth = camera.depth -1;
    118.    
    119.    leftEye.transform.position = transform.position + transform.TransformDirection(-S3DV.eyeDistance, 0, 0);
    120.    rightEye.transform.position = transform.position + transform.TransformDirection(S3DV.eyeDistance, 0, 0);
    121.    
    122.    leftEye.transform.rotation = transform.rotation;
    123.    rightEye.transform.rotation = transform.rotation;
    124.    
    125.    leftEye.camera.projectionMatrix = projectionMatrix(true);
    126.    rightEye.camera.projectionMatrix = projectionMatrix(false);
    127.    
    128.    leftEye.transform.LookAt (transform.position + (transform.TransformDirection (Vector3.forward) * S3DV.focalDistance));
    129.    rightEye.transform.LookAt (transform.position + (transform.TransformDirection (Vector3.forward) * S3DV.focalDistance));
    130.    
    131.    leftEye.transform.parent = transform;
    132.    rightEye.transform.parent = transform;
    133.  
    134. }
    135.  
    136. function LateUpdate() {
    137.    UpdateView();
    138.    
    139.    if (enableKeys) {
    140.       // o and p
    141.       var eyeDistanceAdjust : float = 0.01;
    142.       if (Input.GetKeyDown(upEyeDistance)) {
    143.          S3DV.eyeDistance += eyeDistanceAdjust;
    144.       } else if (Input.GetKeyDown(downEyeDistance)) {
    145.          S3DV.eyeDistance -= eyeDistanceAdjust;
    146.       }
    147.        
    148.       // k and l
    149.       var focalDistanceAdjust : float = 0.5;
    150.       if (Input.GetKeyDown(upFocalDistance)) {
    151.          //Debug.Log("focal up");
    152.          S3DV.focalDistance += focalDistanceAdjust;
    153.       } else if (Input.GetKeyDown(downFocalDistance)) {
    154.          S3DV.focalDistance -= focalDistanceAdjust;
    155.       }
    156.    }
    157. }
    158.  
    159. function OnRenderImage (source:RenderTexture, destination:RenderTexture) {
    160.    RenderTexture.active = destination;
    161.    GL.PushMatrix();
    162.    GL.LoadOrtho();
    163.    for(var i:int = 0; i < checkerMat.passCount; i++) {
    164.       checkerMat.SetPass(i);
    165.       DrawQuad();
    166.    }
    167.    GL.PopMatrix();
    168. }
    169.  
    170. private function DrawQuad() {
    171.    GL.Begin (GL.QUADS);        
    172.       GL.TexCoord2( 0.0, 0.0 ); GL.Vertex3( 0.0, 0.0, zvalue );
    173.       GL.TexCoord2( 1.0, 0.0 ); GL.Vertex3( 1.0, 0.0, zvalue );
    174.       GL.TexCoord2( 1.0, 1.0 ); GL.Vertex3( 1.0, 1.0, zvalue );
    175.       GL.TexCoord2( 0.0, 1.0 ); GL.Vertex3( 0.0, 1.0, zvalue );
    176.    GL.End();
    177. }
    178.  
    179. function PerspectiveOffCenter(
    180.     left : float, right : float,
    181.     bottom : float, top : float,
    182.     near : float, far : float ) : Matrix4x4
    183. {        
    184.     var x =  (2.0 * near) / (right - left);
    185.     var y =  (2.0 * near) / (top - bottom);
    186.     var a =  (right + left) / (right - left);
    187.     var b =  (top + bottom) / (top - bottom);
    188.     var c = -(far + near) / (far - near);
    189.     var d = -(2.0 * far * near) / (far - near);
    190.     var e = -1.0;
    191.  
    192.     var m : Matrix4x4;
    193.     m[0,0] = x;  m[0,1] = 0;  m[0,2] = a;  m[0,3] = 0;
    194.     m[1,0] = 0;  m[1,1] = y;  m[1,2] = b;  m[1,3] = 0;
    195.     m[2,0] = 0;  m[2,1] = 0;  m[2,2] = c;  m[2,3] = d;
    196.     m[3,0] = 0;  m[3,1] = 0;  m[3,2] = e;  m[3,3] = 0;
    197.     return m;
    198. }
    199.  
    200. function projectionMatrix(isLeftEye : boolean) : Matrix4x4 {
    201.    var left : float;
    202.    var right : float;
    203.    var a : float;
    204.    var b : float;
    205.    var fov : float;
    206.    
    207.    fov = camera.fieldOfView / 180.0 * Mathf.PI;  // convert FOV to radians
    208.  
    209.    var aspect : float = camera.aspect;
    210.  
    211.    a = camera.nearClipPlane * Mathf.Tan(fov * 0.5);
    212.    b = camera.nearClipPlane / S3DV.focalDistance;
    213.    
    214.    if (isLeftEye)      // left camera
    215.    {
    216.       left  = - aspect * a + (S3DV.eyeDistance) * b;
    217.       right =   aspect * a + (S3DV.eyeDistance) * b;
    218.    }
    219.    else         // right camera
    220.    {
    221.       left  = - aspect * a - (S3DV.eyeDistance) * b;
    222.       right =   aspect * a - (S3DV.eyeDistance) * b;
    223.    }
    224.  
    225.     return PerspectiveOffCenter(left, right, -a, a, camera.nearClipPlane, camera.farClipPlane);
    226.      
    227. }
    228.  
    If someone could help get this script running, I believe it would be useful to many that go with the DLP 3d TV screen option. It's fairly affordable $1000 for a 60" and shutter glasses and this system also works with the 3d ready games on the XBox 360 such as Avatar. Even though it's not really mentioned on the box, there is a setup parameter that makes the game output in the various 3d formats including the checkerboard method.


    Also, I second rahuxx request for native options for active stereoscopy in Unity 3.0. There's a huge push towards stereoscopic displays. Some built in Stereoscopic camera scripts/shaders would be an awesome addition to Unity 3.0x.

    Thanks again to all that have contributed their great work.

    cheers

    Stuart
     

    Attached Files:

  2. Wolfram

    Wolfram

    Joined:
    Feb 16, 2010
    Posts:
    261
    Not sure about that syntax error. I would suggest to extract the shader from that script and place it in an individual myname.shader file. Then you can access that shader via Shader.Find("Hidden/Stereocopy"), or assign it in the Inspector.

    One other problem, which is intrinsic to both your checkerboard shader, and the original line-interlaced shader: they cannot work this way. IN.uv contains normalized coordinates (0..1), but the fmod() line needs pixel coordinates.

    So instead of
    Code (csharp):
    1. int x = fmod(floor( IN.uv.x) + floor(IN.uv.y),2) <1;
    you would need something like
    Code (csharp):
    1. int x = fmod(floor( IN.uv.x*1920) + floor(IN.uv.y*1080),2) <1;
    (in this case, hardcoded to 1920x1080 HDTV).
     
  3. Ekzuzy

    Ekzuzy

    Joined:
    May 28, 2008
    Posts:
    34
    Hi!

    If You are still interested we have managed to fix the problem we had with interlaced stereoscopy shader. So now it works both on MacOS and Windows and both on OGL and D3D.
    CFSystems, I think I could also add the option to sync both frames (for left and right eye) so they both would be changed at the same time - and after that displayed on screen (not one eye changed -> display, second eye changed -> display).
     
  4. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    share it if possible, may be it will be helpful to many like me.
     
  5. phoberman

    phoberman

    Joined:
    Jan 16, 2008
    Posts:
    75
    ???

    I'm a bit surprised by this thread.

    Why? Because more than a month ago I posted a stereo 3D package with a shader that does anaglyph, side by side, over/under, interlaced and checkerboard (fully adjustable to any resolution). Left and right views are fully synchronized. Parallax convergence are easy to set and change. You can switch between parallel and converged cameras. (I'm not taking credit for everything, to a large extent I just cleaned up and combined stuff from these forums).

    I assume it works for people who have downloaded it, because no one's posted any complaints. You can find it here:

    http://forum.unity3d.com/threads/63874-stereo-3D-in-Unity-3D?p=416458#post416458

    The only thing my project DOESN'T do is 120Hz active stereo, which was what I assumed rahuxx has been railing about all these months. But his last post makes me wonder. Synchronizing the views interlacing them = not a problem. Alternating left/right and syncing to a 120Hz video output = the problem.

    Anyway, I've been bugging the Unity folks for months now to support active stereo, without much response.

    And I've done a ton of work on my stereo project over the last month or so - cleaned it up a lot, it now has a custom editor window for all settings, does automatic floating stereo windows, has a stereo 3D pointer with a parallax readout, plays billboarded stereo movies INSIDE the game world, etc. etc.

    But I haven't posted it. Why not? Well, first of all, no one's posted a single comment on the version that's already up. Second, once Unity announced the Asset Store I figured that would be the best way to distribute it. But even though I've submitted it multiple times over the last month I've gotten absolutely NO response from Unity.

    It's bizarre to me that Unity doesn't seem to care about stereo 3D; whether you like it or not, it's coming to games, and those of us working in other areas like simulation and VR have been using it for years, and we need it in Unity.

    And as far as I can tell, it would be relatively trivial for the Unity team to add native support for active stereo.

    In any case, everyone on this thread, please take a moment to look at my project and see if it solves your interlacing and sync problems - it might save you from having to reinvent the wheel. If it doesn't work for you, please let me know why not. Rahuxx, please clarify what you're all about. Everyone, please bug Unity about 3D via the wish list or whatever.

    And if someone asks real nice, maybe I'll post the latest version of my project, asset store or no.

    Sorry for ranting, but I hate to watch everyone spinning their wheels, and I'd love to see Unity finally get on the ball on this.
     
  6. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537

    phoberman, sorry if you have been hurt by me at any place.
    as you mentioned above in your post that your script/package does not support 120 Hz active stereoscopy, i would like to say that is the main thing that i am currently searching all over the unity forum for last few months. Asking for free support, putting request in collaboration and also putted it as a wish on unity wish list. Even tried some peoples, send PM and asked for support as i am very very need ful person for this, may be more then any one in unity forum.
    But my bad that people makes jokes on my comment and asks for billions and millions of $, but i am still on it and one day i will solve it, any way if you can help please come ahead and provide support.

    I had your package (last one you mentioned above), but it also not so helpful. If you have more improvements to it and want me to check if it works for 120 HZ active stereo then let me know, please PM as i do not like funny jokes made on my work and my requirements.

    thanks
    rahu
     
  7. Ekzuzy

    Ekzuzy

    Joined:
    May 28, 2008
    Posts:
    34
    Phoberman, I have to say that I understand Your thoughts. In some areas Unity Team is very ignorant. I know that they are probably very busy. But everything has its limits.
    I have posted a bug and for over a year (YEAR) I didn't get any response from them. Second thing, I placed on the forum a project presenting interlaced stereoscopy which was working fine in the editor, but didn't in the built app on Windows. And also nobody responded why it is not working. We have found a solution to this problem but why this particular example doesn't work I still don't know. Unity claims they have great feedback, great forums but something just isn't right.
    All in all, I hope they will finally include quad buffering in Unity. I don't think it would be hard to include it inside Unity. In OpenGL it is very easy to enable it. The only problem can be some kind of interface for the users and proper API for programmers. Many companies could use Unity in their professional, stereo visualizations, if support for quad buffering would be added.
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    bring 10 companies to UT that are interested in quad buffering and willing to proof that interest with money and I'm sure it will be in within 3-6 months.

    Keep the "there are companies" interested on the level of "yeah just another blurp" (anything where real businesses "want" something but aren't willing to pay their desire is technically blurp) and exactly nothing will change not even if you get 200 people to agree with you as its just a mini-minority userbase feature as such those working in that field will be financing it or will have to get the source license and add it themself. Thats just the nature of "not business wise viable" as tuxies will tell you
     
    Last edited: Dec 17, 2010