Search Unity

[RELEASED] VR Panorama - render 360 stereo videos

Discussion in 'Assets and Asset Store' started by olix4242, Jun 25, 2015.

?

What would you like to see added in a future version of VR Panorama?

Poll closed Mar 23, 2016.
  1. Audio Capture Support

    40.4%
  2. Side By Side Stereo rendering

    28.8%
  3. Automatic 360 panorama metatagging for Youtube H.264 Video Export

    30.8%
  1. billyjoecain

    billyjoecain

    Joined:
    Jul 10, 2015
    Posts:
    10
    Yes. You are most correct! As you should be since this is your area of expertise. :)

    Now... I did everything this said: https://support.google.com/youtube/answer/6178631?hl=en

    The result is currently looking like this, where the top scene and bottom scene wrap around. I am sure I missed something.
     
  2. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Good day all. I could use a little help the rendering not working. GTX980 SLI rig. First test worked now it is not. Here is the error from the console.

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.DockArea.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:264)
    UnityEditor.EditorUtility:DisplayCancelableProgressBar(String, String, Single)
    VRPanorama.VRCapture:CounterPost() (at Assets/VRPanorama/VRCapture.cs:1118)
    VRPanorama.VRCapture:LateUpdate() (at Assets/VRPanorama/VRCapture.cs:743)

    Thank you,

    Gary Haus
     
  3. billyjoecain

    billyjoecain

    Joined:
    Jul 10, 2015
    Posts:
    10
    Hello again! I was able to get my scene rendered into TOP / BOTTOM and get it uploaded to YouTube! Thank you!!

    Now that I have that process working, here's what I'm really trying to accomplish. I'm trying to create a 360 degree video of a Unity scene so you can put on a VR headset and see it in stereo. This seems like it would be possible to create, but I have NO idea how to do it yet.

    Here's the final video


    The resolution on the YouTube video is not nearly as good as each individual frame (pretty obvious), so that's something I need to improve also.

    Two questions:
    1) How can I improve the visual quality of the final YouTube video?
    2) How can I make the video function with Left / Right stereo? Even if I could just render it with left/right on the raw frames, that would be a start?

    Any help appreciated!
     
    olix4242 likes this.
  4. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    By uploading with better compression quality (20000 K). Also, there is speed/quality slider that improoves anitaliasing issues. Export video with 4K settings for youtube.

    You don't have to do anything on video if you already exported your video. Just run Youtube app on android, and there will be a cardboard icon at a botto to the right.
     
  5. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Olix242... Any help with my above post? Thank you.
     
  6. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Sorry, didn't see it. Are are your unity build settings? You have to be in Standalone mode for it to work.
     
  7. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Yes absolutely in standalone build mode. Windows x86 64. Just removed the package. imported it again. attached the script to my camera. when it renders I get this.

    this is reduced from 4k to this low res in Photoshop.





    It should look like this:


    And still getting this error:
    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.DockArea.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:264)
    UnityEditor.EditorUtility:DisplayCancelableProgressBar(String, String, Single)
    VRPanorama.VRCapture:CounterPost() (at Assets/VRPanorama/VRCapture.cs:1118)
    VRPanorama.VRCapture:LateUpdate() (at Assets/VRPanorama/VRCapture.cs:743)
     
    Last edited: Feb 3, 2016
  8. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    This is the interior. I am building this project for Oculus, mono and stereo 360 videos. This is what the interior looks like as a screen grab.
     
  9. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Hi, to be able to help I would need some more information like Unity version, VR camera setup screenshot and if you use some image effects or anything else that can be relevant.
     
  10. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Really enjoying this - obv view on mobile youtube app really, but i figured it out more or less to start on

     
    olix4242 likes this.
  11. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Wow, I like it very much!
     
  12. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    fixed it using your camera and re-applying fx one at a time.

    Thanks.
     
    olix4242 likes this.
  13. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    It was probably some bug with image effects. It can happen from time to time also in normal viewport. Just ofr curiosity, did you use new Unity image effects (reflection or AA)?
     
  14. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Using the new Cinematics FX plus a bunch of Asset Store ones. The SuperSampling one seems to break every time I add it with the VR setup.
     
  15. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    "The SuperSampling one seems to break every time I add it with the VR setup."
    Of course it breaks. It actually isn't a real image space effect, and it's quite heavy even for a single instance on screen rendering as it renders up to 4x of a screen resolution (if I remember correctly). What happens if you turn it on? Well it creates many instances (12) at a very high resolution eating all available VRAM. But this is a normal behaviour.
    Also, there is no need to use it, as VR Panorama already does supersampling. It's enough to move a slider speed/quality to max. And this process is memory optimised because Vr Panorama tries to reuse all textures and keep Vram usage relativly low.
     
  16. gmarcano68

    gmarcano68

    Joined:
    Oct 17, 2015
    Posts:
    2
    Hello Oli, first I would like to say thank you for this amazing plugin, couldn't do a lot of things without this!
    I'm having an issue, however:

    I'm using your plugin alongside this other one: AVPRO Quicktime in order to create a 360 render inside a sphere that contains a video already.
    The video meets the avpro requirements such as using HAP codec, etc. so it can show inside unity(as unity's player can't run the video without it). The 360 video currently sits at 60 fps and its duration is about a minute(the one already recorded).

    However, when I make the 360 render with VR Panorama, the video's duration (the one inside the sphere) is only 7 seconds and looks like it's fast forwarding when its duration should be around 1 minute. I'm talking about the video that's already in the scene. When I play it in the editor the video's duration(the one with avpro quicktime), along with the camera animations, particle effects, all work correctly and with the proper duration, etc. It's only with when i try to make the 360 render that the video appears to fast forward and change its normal duration from a minute to 7 seconds.

    I can only assume it's a problem with the FPS, should I render the video inside the sphere at 30fps and the 360 render at 60fps so it doesn't seem like it's just "fast-forwarding"?

    I have no problems rendering a video of a scene with camera animations/movements, but when another video is inside the scene, its duration is a lot shorter, in this case(1 min lasts only 7 seconds for example).

    Currently, since the video in the scene is at 60fps I used the fps preset of your plugin for 60fps, but no luck on fixing this.


    Any help would be greatly appreciated, this plugin is amazing, thank you.
     
  17. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Hi, this is a known issue with AVPro plugins. I have made a solution/hack for AVPro Windows Media, but I don't have a licence for AVPro QuickTime so I can't do much. And I'm not sure if a hack would work in that case.
    What has to be done: you should scrub video manually frame by frame so that it goes in base of scaled time. This works only with HAP codec, while with others I wasn't able to do anything. This is how it's done in AVPro Windows Media:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.IO;
    4. using System.Runtime.InteropServices;
    5.  
    6. public class AVProScrubber : MonoBehaviour {
    7.  
    8.     public AVProWindowsMediaMovie _movie;
    9.     public uint frame = 1;
    10. //your framerate as in VRPanorama
    11.     public int FPS=60;
    12.  
    13.     // Use this for initialization
    14.     void Start () {
    15.         Time.captureFramerate = FPS;
    16.     }
    17.    
    18.     // Update is called once per frame
    19.     void Update () {
    20.         uint frames = (uint)Time.frameCount;
    21.         _movie.MovieInstance.Pause();
    22.         _movie.MovieInstance.PositionFrames = frames;
    23.    
    24.     }
    25. }
    Also, in this case your video should be the same framerate as exporting VR Panorama video.


    The problem is that they plays video in realtime, without considering unity's own timescale and this is something that has to be changed by developer of AVPro. What happens is that VRPanorama can't render in realtime, so it jumps thru the steps and slows down unity time (this works perfectly with unity animation and physics). This plugin on the other hand doesn't do it - and it plays video based on a realtime clock - so, when my plugin tells to unity that the time that passed from the start is 1 second, and it took 5 seconds to render, the other plugin doesn't read the time that unity sends globaly but acts as if 5 seconds has passed. This leads to faster playing of those videos.
    I suggest you to contact developer of AVPro and ask them if timeScale can be implemented.
     
  18. gmarcano68

    gmarcano68

    Joined:
    Oct 17, 2015
    Posts:
    2
    Thanks for your quick reply. Sadly we can't change to AVPWM. We made a workaround this issue and used another method due to time constraints, thanks again. Your plugin was extremely useful for the rest of the project!
     
    olix4242 likes this.
  19. davbar9

    davbar9

    Joined:
    May 19, 2014
    Posts:
    62
    How to create a circuit arround the scene to the camera move recording the scene like your videos?:
     
  20. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    You have to select your VR Camera and then window/animation. Ant use Animator to animate your camera.
     
    davbar9 likes this.
  21. Omega_21

    Omega_21

    Joined:
    Feb 11, 2016
    Posts:
    1
    Hello im having a problem, i bought this before the update and it was working fine with a previous version of my project, now that i want to render the finished result i had to download the update and it just renders black, and when i move the settings it sometimes renders just some color pixels or only the skybox, im trying to render equidistant mono for youtube, is the problem because of my laptops RAM?
     
  22. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Check a "Use Depth Buffer" checkbox. It should correct your issue.
     
  23. aldo_m

    aldo_m

    Joined:
    Jul 12, 2013
    Posts:
    3
    Hi OliVR
    great plugin

    I'm doing an animation in VR , but do not know how to synchronize and sequence different animations . I'm using Cinema Manager plugin, but adding VR panorama did not work very well. Have you tried any sequencer ? or you know the solution to this? Thank you!
     
  24. _monoflow

    _monoflow

    Joined:
    Mar 26, 2014
    Posts:
    271
    olix4242 likes this.
  25. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Do you mean Cinema Director (not Cinema Manger)? It works fine with it (I'm also using it) but not all camera functions are supported- just be sure to use only one single camera in Shot Track and instead of creating cuts - move your camera to a different position. Also, a camera fade-out and fade-in, and some other camera related stuff that doesn't have sense in 360 videos (like FOV) aren't supported. You just have to assign VRCapture script to your camera and then animate in Director as you would normaly.
     
  26. coutlass-supreme

    coutlass-supreme

    Joined:
    Feb 21, 2014
    Posts:
    22
    Hi,

    I just bought this asset and had some questions.

    I need it to render a panorama image to be used as a skybox.

    I have tried rendering at 8192 and i switch between the actual environment and the skybox and it doesnt look at all the same. The skybox is a lot more blurry. Ove tried modifiing VR quality settings and it makes it a bit better.

    I include a screenshot of a part of the scene. In the skybox this looks blurry, but when i turn off the skybox and see the actual models of buildings this is crisp again.

    An i doing something wrong or is this a limitation?

    Ive tried images generated with 3d software and look much better, but i have nothing to compare them to.

    Please tell me if im being clear.

    Thank you.
     

    Attached Files:

  27. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Well, it's hard to tell what's happening. It depends on many things. First of all, of your camera Field of View. Larger the field of view, the image is sharper (as you have more pixels of panorama vs. pixels in screenspace). For a perfect image rendered on a screen of a full HD with 90 degree camera (quite large FOV) you should have a panorama that is approximately 2 times vertical resolution. And that's a 4k mono panorama image. If you use a camera that is 45 degrees, a resolution has to be double for a optimal pixel fitting.
    Calculation is quite simple: 180 / CameraFOVdegrees x VerticalScreenResolution / 2 = Mono panorama size in K (round it to a nearest power of two). Keep in mind that Unity doesn't support textures larger than 8k.
    From your screenshot and a perspective (or crop) it looks like you are using a quite narrow FOV).

    Also, be sure that your image is loaded in 8K (unity defaults usually to 2k for large textures). To do so, go to texture setup, and set MAX SIZE to 8192. Also, check that your texture has its Filter Mode set to Trilinear. And set its aniso level to highest value of 16. Be aware that shader also has to support aniso levels or it will break down things.
    Hope this makes some things clearer.
    Let me know if this approach helps you, if it doesnt, there are some visual tricks that can be done (like image sharpening in photoshop) but they depend really much of your workflow and other settings.
     
  28. coutlass-supreme

    coutlass-supreme

    Joined:
    Feb 21, 2014
    Posts:
    22
    Thank you very much for the fast response.

    My field of view is 71. Im generating 8k images and using all of the settings you suggest with the same result.

    Maybe its another thing i should be looking at.

    i attach two image examples.

    One rendered with other software, with less resolution, in another format:
    https://www.dropbox.com/s/y75bcohyiprnbk6/3D_ARB_FULL-C01_Mentha 12-1_VR-DER.jpg?dl=0

    and the one i rendered with vr panorama:
    https://www.dropbox.com/s/q5zs4224no557xp/8192sinDB.png?dl=0

    I include them because maybe this is a matter of how im treating my unity scene. The one rendered in 3d software has less resolution and "looks" better, but maybe this is because of the details and effects.

    Can you tell the difference?

    Thank you for your time.

    JL
     
  29. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    I've looked into your images and here is my opinion:
    -first one is more realistic i terms of visual quality. You have more colors and overall more balanced image.
    -second one is too bright and overburned (you can use Tonemapping to correct this issue when rendering).
    -First one actually is techincally worse, as it features a lot of aliasing artifacts. But, as it was rendered with edges parrallel to camera, it mostly passes unnoticed. It looks precise precise with vertical and horisontal building lines. But you can see it on diagonal lines. Fortunately, there are not much of horizontal lines.

    How do you import your image into Unity? Are you using a inverted normal sphere model placed on camera or a Unity Cubemap? If you are using later, than this explains your problems. Unity limits it's cubemap size to 2048x2048. Anything larger than that will be always scaled to 2048x2048. It could be for this reason that your image looks approximately as the other at the lower size (because it actually is). Also, note that if you are creating a cubemap from existent image, it gets resampled, and this can lead to an image that is blurry. I'm suggesting you to use a inverted normal sphere technique. ;)
     
  30. coutlass-supreme

    coutlass-supreme

    Joined:
    Feb 21, 2014
    Posts:
    22
    Thank you very much for this detailed response.

    I will try your suggestion and will let you know.
     
  31. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Last edited: Feb 18, 2016
    olix4242 likes this.
  32. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Also I put together a panoramic tour as well:

    Transit Station tour!

    Thanks again for this AMAZING toolset!!!

    Gary
     
    username22222 and olix4242 like this.
  33. DCrosby

    DCrosby

    Joined:
    Jan 13, 2013
    Posts:
    86
    I'm having an odd rendering issue, when I mess with the HDR Flag on the VR Panorama Camera, I either get a Black Splotch, or a white one, any ideas on what that could be ?





    It appears only when a light is triggered in the tower.

    An idea for me to debug this might be to do a distortion, but no rendering to disk, to be able to look at what the output looks like but without incurring a 3 hour render to see anything, unfortunately this happens at the very end of a 3-4 minute experience. Maybe I'll try and render it at 1/2 res to see if that works. (Should at least save some time)

    -Derek
     
  34. DCrosby

    DCrosby

    Joined:
    Jan 13, 2013
    Posts:
    86
    I've since tried to turn off all relevant lights, and trying stereo and mono rendering, if you play the game normally, it works, no splotch, if you render it with VRPanorama, splotch appears.

    -Derek
     
  35. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Hi, try to activate Use Depth buffer. If it's what I think it is, than it should work.
     
  36. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Hello there,

    We just got this plugin and I have started to play with it.

    We basically have a "Player" that moves among a path. The Camera is a child of that Player.
    After I enabled the Depth Buffer (I think. I'm rendering can't check) it seems that I can actually see my objects and I get screenshots like this:



    I have some problems. My scene is all timed out. The camera moves on a path. When I arrive on some nodes I activate some State Machines (playmaker). At the same time I also trigger some movements that I "hardcoded". Something like "AFter 40 seconds enable X". Because of this it seems that my scene is a bit messed up. Timings are off. The guy starts walking while I am still sitting in the conversation and since I don't hear any sound I can't pinpoint the problem.

    Also... for some reason for the past 1 hour I keep rendering one after another.


    I think this is about the 5th time it's rendering.

    Any ideas why? how? I'm still a bit confused because of the lack of documentation.

    EDIT:. Rendering for about 8-9th time...
     
    Last edited: Mar 8, 2016
  37. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    You should check VRPanorama_ReadMe.txt file located in VRPanorama folder. Almost everything is explained there.
    I don't suggest using scripted behaviours - or at least, if you don't know exactly what are you doing. This is mainly because those behaviours have to be coded properly for time.TimeScale. What does this mean? It means that your scene has to work correctly with scaled time. All audio (if it triggers some actions), animations, and events have to be based on scaled time. You can sceck if this is a case by setting a value of TimeScale in Edit/project settings/Time to something different than 1. Set it for example to 0.5 and see if your scene plays in slow motion. If it does, then it should be exported correctly. If it isn't scripted correctly, you will notice that your events doesn't happen in time.
    For example, Playmaker action Wait has to have unchecked RealTime checkbox. If this box is checked, your Wait action will be activated earlier.
    Also, I would like to see a setup of your camera, and where did you place VRCapture component. If you use "follow" or "look at" script on a camera that holds VRCapture component - your scene probably won't render correctly. This type of scripts (that change camera transform) has to be added on camera parent object, ussually another deactivated camera, or empty game object.
     
  38. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    I managed to make a video out of those frames and I even uploaded it to youtube.

    I still have this out-of-sync problem. Any suggestions on what to do?
    As I have said... I have my scene timed precisely and I guess ... because the rendering is slower it makes my whole scene slower...

    EDIT: I just saw what you posted. I will replay soon.
     
  39. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Hello Olix,



    Camera is a child of the Player. The player is set up to move along a path.


    Those are my current settings. I timed out my scenario normally and it's about 2 minute and 40 seconds. However with those settings my scenario recording ends much sooner (Problem #1).

    Now I'm debugging my second problem. From what I see my characters move correctly but I stay for to long on a path node:


    Normally the "Pause Time" to 36 is perfectly fine. here however... it's way to slow. I just sit there for something like 11 extra seconds.
     
  40. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Another tip: avoid of triggering any actions on audio end, because audio will play mostly always at it's original speed. Instead, use Wait in Playmaker.
     
  41. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370


    Well, this is how I do stuff right now.

    If I could get the audio normally & video normally I could manually make the video in Adobe Premiere.
     
  42. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Not sure about your problem. Or it's probbably better to say that I don't know what PathNode script does and how it does. It this a third party script? It probably doesn't compensate correctly for a timescale. If it's third party script, I suggest you to write to a developer and ask him to implement correct timescale compensation.

    BTW, are there any other scripts on a VRPanoramaCamera?

    As said before, thry by deactivating VRCapture script, and changing time settings and see if you have problems. In this way you can maybe debug faster where does your scipts fail on syncing.
     
  43. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    It looks OK. so I think that problem lies somewhere else. But I'm not an expert with Playmaker.
     
  44. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    If I click play with my normal Main Camera everything works.
    If I click play with the VR Panorama Camera everything works.

    I think the problem arrives when I click "Render Panorama".

    Btw, what is the correct order to do things?

    1. Set up the Number of Frames
    2. Set up other quality settings
    3. Capture Audio (I have done this and the WAV was ok. Even that later after I clicked play to test stuff I coudn't open the WAV anymore)
    4. Click Render Panorama. This will create all the JPG files. First time I did this it ran for like ... 10 Renders. Dunno why. I had to click cancel.
    5. Click "Encode H.264 Video from existing sequence
    6. Inject the metadata using YouTube tool
    7. Upload and wait

    Anything else?
     
  45. Vickery

    Vickery

    Joined:
    Oct 31, 2014
    Posts:
    5
    First of all thanks for a good plugin.

    One quick thing (Sorry if this has already been asked) is there anyway to record multiple scenes. All of our content is chopped up into 10 different scenes that all play 20 seconds apart. I have tried adding a do not destroy flag to the panorama camera object but this seems to crash. One thing I will try is having a separate panorama camera in each scene although stitching the images together then becomes more tricky.
     
  46. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    hi,

    Your asset have support audio?
     
  47. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    No, you can't do this for now. I was already thinking about how to modify VR Capture to do also this kind of things. There are no technical limits on doing this, but the main problem is how it should be done in interface and workflow without making things too complicated and confusing and without breaking a simlicity of interface and usage.
    If you have some ideas how do you want it to be implemented, I'm all ears ;)
    Fro now, I'm suggesting that you run it scene by scene and save to different folders. Afterwards you can use some video editing program and put those videos together as you would do with standard videos.

    tip: you can always start a VRCapture by script at a desired point by keeping it deactivated at start, and then activate it with script. Also, you can have more than one VR Capture on a same camera (with different settings). It will work as long as you don't start more than one instance of it at a time.
     
  48. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Yes, it will capture your audio. Even in audio surround formats.
     
  49. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    thanks for reply

    I Will purchase very soon.
     
    Last edited: Mar 10, 2016
    olix4242 likes this.
  50. reset

    reset

    Joined:
    May 22, 2009
    Posts:
    393
    I love this plugin!! Thanks for such a great tool Oliver.

    I have not explored animation yet in my scene but I would like the person to look down and see a body, legs and arms - possibly moving. Should this be avoided?

    Cheers
     
    olix4242 likes this.