Search Issue Tracker
By Design
Votes
0
Found in [Package]
3.0.0
Issue ID
REC-407
Regression
No
Left and right eyes are swapped in VR headset when playing a 360-video that was recorded with the Unity Recorder
How to reproduce:
1. Open the attached project
2. In Build Settings, set the Target Platform to UWP
3. In Player Settings, enable Virtual Reality Support
4. Select "Assets/.../Materials/Video Playback" material
5. In the Inspector, change Shader to "Skybox/Panoramic Swapped Up-Down" (user-created shader)
6. Play the scene
7. Put on the VR headset
8. Observe that the spheres are displayed correctly
9. Change Shader to "Skybox/Panoramic"
10. Play the scene once again
11. Observe that while looking with both eyes opened at the spheres, it seems as if there are three of them (the middle one is of both colors)
Expected result: When using "Skybox/Panoramic" shader, left and right eye views are not swapped.
Actual result: Left and right eye views are swapped when viewing the video in a Microsoft Mixed Reality headset.
Reproducible with - 2017.4.0f1, 2017.4.13f1, 2018.2.13f1, 2018.3.0b6, 2019.1.0a5
Note: The above-mentioned shader ("Skybox/Panoramic Swapped Up-Down") was produced by modifying o.layout3DScaleAndOffset to simulate swapping left and right eyes (so that it would be displayed correctly).
Recording stereo 360-video with the Unity Recorder and playing it with Video Player swaps left and right eyes
1. What happened
I created a simple scene and captured it in a 360 video (using Unity Recorder with webm movie recorder).
Then I played the video with a Video Player and viewed it in a Microsoft Mixed Reality headset. The image looked somewhat wrong, like parts further away were coming towards me while nearer objects are further away. To test my suspicion that the eye-images are swapped, I added two colored spheres to the scene, directly in front of the eyes (left eye: green sphere, right eye: red sphere) and recaptured the video. Closing my eyes, one at a time, I saw the wrong sphere directly ahead. This also means, that you cannot focus on the spheres as you would expect.
To fix the issue, I pulled the Skybox/Panoramic shader from the builtin shaders package (I used the one from 2017.3.1f1 because I had it lying around) and swapped the eyes (by changing line 178 from o.layout3DScaleAndOffset = float4(0, 1-unity_StereoEyeIndex,1,0.5); to o.layout3DScaleAndOffset = float4(0, unity_StereoEyeIndex,1,0.5);). With that modified shader, the video is displayed correctly.
2. How we can reproduce it using the example you attached
There are two scenes in this project (2018.2.3f1): "Test - Recording" and "Test - Playback".
To test the issue, open the "Test - Playback" scene and hit play. You should see the included 5-second video with the swapped eyes. The trees look somewhat wrong and you can't focus on the colored spheres properly. Now change the shader of the "Exozet/Materials/Video Playback" material to the "Skybox/Panoramic Swapped Up-Down" shader (by default it uses the builtin "Skybox/Panoramic" shader) and look at the scene again. The trees look correct and you can focus the spheres now.
In case you want to capture the video yourself, use the "Test - Recording" scene, open the Recorder Window, load the "RecorderSettingPreset" and start the recording. I used a 5-second time interval for my tests. Don't forget to disable Virtual Reality Support before recording or it will mess up your capture camera.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
Resolution Note:
Created a task for this.
https://jira.unity3d.com/browse/REC-988