Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

The process of rendering out 360 stereoscopic videos and then importing into a new scene

Discussion in 'AR/VR (XR) Discussion' started by pshort, Mar 10, 2016.

  1. pshort

    pshort

    Joined:
    Mar 10, 2016
    Posts:
    6
    I have a Unity scene which is quite detailed and causing lag when running on the GearVR. Since the viewer does not interact with the environment I want to render this to a 360 stereoscopic video and then import it into a new Unity scene where it is projected onto the inside of two spheres (one for each eye). That way I can re-introduce audio tracks to allow for spatial audio through head tracking. If that makes no sense, I've attached a little diagram.

    I have found bits and pieces of information on the forum but I'm wondering if anyone has a consolidated approach?

    There are a few things I am having difficulty with (the last one is the main issue):
    • What is the best setup to render out the scene as a 360 stereoscopic video? I have tried both 'VR Panorama' and '360 Capture Panorama' but both have a few flaws and I am yet to find a good balance between quality and render time.

    • Once the image sequence is rendered out, what settings I use to create the video file. I have tried both Premiere and ffmgeg. Ffmpeg seems to reduce the quality to really poor.

    • To make things more complex, my scene contains a screen with a video texture using Easy Movie Texture (see attached image). When I do my render export, the video on the screen does not pause for each image render which means that when I compile my 360 video the screen looks like it is playing in fast forward.

    • And finally the big one: I want to bring in this stereoscopic video back into to a new Unity scene and project this on to the inside of TWO spheres (one for each eye). I have managed to get a video to project on the outside of one sphere but not the inside. I have tiled the video so that the top half of the stereoscopic video so that it only shows the left eye. Once I have it projecting on the inside I intend to tile the right eye on the second sphere.
    Has anyone successfully done this? Any assistance would be greatly appreciated.
     

    Attached Files:

    Last edited: Mar 10, 2016
  2. mikewarren

    mikewarren

    Joined:
    Apr 21, 2014
    Posts:
    103
    I recently looked into rendering on the inside of a sphere. You could model an inside out sphere in a modeler, but the easiest way I found was to use a shader that reverses mesh normals. I'm afraid I don't still have the script, but it was posted in answers or the forum, so you can probably find something useful with a little searching.
     
  3. jesusrg

    jesusrg

    Joined:
    Dec 12, 2012
    Posts:
    27
    1- VR Panorama works perfect for what you want.
    2-Media Encoder works fine h264 or h265, 30fps, 50mb/s or so depending on the content, you have to keep the resolution to 3840x1920 note 4 or try 3840x2160 for S6 or S7.
    3-mmm i think you can solve this with a script that seek the frames of the easy movie texture with a timing coroutine.
    4- In 3D studio Max make a shpere, invert the normals, unwrap the uvs to cover half top of the uvmap, duplicate that sphere and change the unwrap to cover the bottom of the uvmap, one sphere is for left and one for right, apply the same material for both spheres, use culling in unity for each eye and thats it. And you have to change a little the easy movie texture to work with materials and not with meshes.
    Hope this help you.
    Best regards.
    Jesus.
     
    Nuitari likes this.
  4. Nuitari

    Nuitari

    Joined:
    Oct 24, 2013
    Posts:
    25
    EasyMovieTexture comes with a sphere prefab that has the normals on the inside. Look at the sphere demo scene.

    http://bernieroehl.com/360stereoinunity/ describes how to set everything up for stereo 360 video in Unity.

    I'm currently doing the same, my only issue is that having two video materials - one for each eye/sphere as they need a different tiling offset to play different parts of the video - I get sync issues. The left and right eye videos are slightly out of sync, which looks horrible.

    So the solution that @jesusrg suggests with using two different UV maps on the spheres is probably better, as you can use a single material then. I haven't tried it yet, as I'm a programmer and have no idea how to use 3DStudioMax.

    [Edit] To follow up, I did this and it works. For details check the post by Thiago in this thread http://forum.unity3d.com/threads/projecting-a-360-degree-vr-video-on-a-sphere.376522/
     
    Last edited: Aug 23, 2016
  5. elena-amanita

    elena-amanita

    Joined:
    Nov 11, 2014
    Posts:
    3
    Hello there, does anyone knows how to playback a stereoscopic video on a cylinder instead of a sphere?
    When i project the stereoscopic video on a sphere works perfect but when i project the stereoscopi video on a cylinder i see the same video repeated on the top and the bottom. Has anyone tried? Any help?
     

    Attached Files:

  6. Martinez-Vargas

    Martinez-Vargas

    Joined:
    Jun 24, 2016
    Posts:
    39
    hello, the sphere is a single 3D model, so the videos play without any problem, the cylinders are forming by 3 different parts (half and both sides of the cover), so the video will play in 3 different parts...
     
  7. Nuitari

    Nuitari

    Joined:
    Oct 24, 2013
    Posts:
    25
    Change the UV map of the cylinder (using 3D Studio Max or similar). It determines how your video texture is mapped to the object.

    Why would you want to use a cylinder, though?
     
    Martinez-Vargas likes this.
  8. Nuitari

    Nuitari

    Joined:
    Oct 24, 2013
    Posts:
    25
    The cylinder is a single mesh in Unity, not "3 different parts". The way the material texture is mapped to the mesh is the problem.
     
  9. ChaiWarrior

    ChaiWarrior

    Joined:
    Feb 11, 2017
    Posts:
    2
    How do I set up the spheres UV for Top-Bottom Stereoscopic projection? I too don't use 3d modelling software so I am a bit lost at this point.
     
  10. Nuitari

    Nuitari

    Joined:
    Oct 24, 2013
    Posts:
    25
    I asked someone with 3DSMax experience to do it for me, it took her only a couple of minutes to set up the UV maps for two spheres. Maybe that's an option for you.
    You basically need one sphere with a UV map that maps the top half of a texture to the entire sphere, and another sphere with a UV map that maps the bottom half of a texture to the entire sphere.
     
    ChaiWarrior likes this.
  11. truebototics

    truebototics

    Joined:
    Jan 2, 2016
    Posts:
    22
    • Did you ever find a solution for the movie textures to match up with the scene on export? I'm having the challenge.
     
unityunity