Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How to integrate 360 video with Unity

Discussion in 'AR/VR (XR) Discussion' started by touloused, Jul 27, 2017.

  1. antics_unity

    antics_unity

    Joined:
    Jul 4, 2018
    Posts:
    1
    Hi touloused,

    thanks for the heads up on how to integrate video in a unity project and it's very cool; I have it working for android and was wondering to get it work for webgl do I need to do something special?

    I am trying to run it on my localhost, but the problem I have is that it is trying to load an sharedassets1.resource file instead of the video's that I provided. I am new in unity and have no clue how to tackle this. Does it have to do with buuildsettings compress mode or something?

    thanks
     
  2. Consort

    Consort

    Joined:
    Nov 16, 2017
    Posts:
    1
    Hi Folks!

    Firstly, thank you Unity for this fantastic addition to Unity.

    My question is this:

    I'm building a simple little app for a client which needs to play 360 videos ( which they are providing to me ) in a youtube 360 format, as shown here. The top half of the video is the left/right panorama, and the bottom half is an up/down panorama. This, I am assuming, is so that the videos don't have stitching issues at the top and bottom of the sphere.

    If I watch the video on youtube ( where the temporary, not final, videos are located ) they look fantastic, and I can look around in 3D and don't see any stitching issues anywhere.

    However Unity's panoramic skybox shader doesn't seem to have support for this layout.

    Can anyone help or suggest how I could get this to work?

    Thanks!

    Dave

    upload_2018-8-15_10-59-38.png
     
  3. JRW_WSP

    JRW_WSP

    Joined:
    Jun 26, 2017
    Posts:
    22
    I have the same question as zulaman! This shader is working great for me on the skybox but not when I apply it to an actual sphere. I can see it fine on the sphere in the scene view but when in the game view I don't see the sphere at all. Its not a normals issue either as its the same (in game) in or outside the sphere. Any ideas why this is happening? I'm hoping to combine 360 video with 3d sound so could really do with being able to teleport around to different "bubbles" rather than always being at the origin...
     
  4. unity_WLLuu-hXxoSJRA

    unity_WLLuu-hXxoSJRA

    Joined:
    Jul 9, 2018
    Posts:
    1
    Hello!
    We're using this to display stereo (upper/lower) panoramic images and are encountering a very visible seam. This doesn't happen when playing stereo video files.When playing, it looks great - the stereo effect is working perfectly, but there is a very visible seam.


    When I uncheck "Generate MipMaps",as digableMatt,my texture changes on error color.
    Texture MaxSize: 8192.
    Dragged the image (7680x7680)
    Oculus Go sdk.
    But when I change texture's max size on 4096 - it's all ok. There is not a very visible seam without.
     

    Attached Files:

    • todo.PNG
      todo.PNG
      File size:
      36.6 KB
      Views:
      327
  5. DaneyT

    DaneyT

    Joined:
    Aug 24, 2017
    Posts:
    2
    Hey Dave,

    I also faced this issue and found a solution. It seems that since the beginning of this year youtube has a new encode format for 360 video's.
    If you use the commands below you will get a normal 360 video from youtube as a "flat" video texture file.

    Source:
    https://github.com/rg3/youtube-dl/issues/15267

    Example get video formats list from URL (with cmd windows)
    youtube-dl --user-agent "" eyn9Bvr4UQ4 -F

    Example: download fragments:
    youtube-dl --user-agent "" eyn9Bvr4UQ4 -f 305+140 --merge-output-format mp4
     
    Last edited: Oct 28, 2018
    Usmith likes this.
  6. DaneyT

    DaneyT

    Joined:
    Aug 24, 2017
    Posts:
    2
    I have a question and I hope someone has already solved it.
    In my quest to get better quality 360 video's I encountered this:
    https://developer.oculus.com/downloads/package/vr5kplayer/

    John Carmack from Oculus seems to have created a way to playback 5k video's with 60frames per second for mobile and pc devices. At the moment (from what I can tell) it is only native supported and not by Unity.
    Has anyone managed to get this working in Unity? Any help is appreciated.

    Greetings,
    Dan
     
  7. Usmith

    Usmith

    Joined:
    Apr 7, 2013
    Posts:
    20
    This works for me, thank you DaneyT
     
  8. AdrianG001

    AdrianG001

    Joined:
    Nov 21, 2018
    Posts:
    2
    Unfortunately after an android update i have the same problem on my Mi mix2

    Regards,
    Adrian Gates
    Technical Consultant - Apps4Rent
     
    Last edited: Nov 22, 2018
  9. voyagelms

    voyagelms

    Joined:
    Jul 12, 2017
    Posts:
    7
    Hi everyone!!

    I just wanted to share my solution for playing 360 video content in Unity in case anyone else is working on the same problem.

    I've created a dedicated thread so that future developers can reference the library easily.

    In any case, I hope everyone can benefit from this!! :)
    And if you liked it, please give a star on the Github repository!!
     
  10. cons_fx

    cons_fx

    Joined:
    Sep 24, 2018
    Posts:
    6
    Hello everyone!

    I'm new to unity VR and I am trying to create a scene in VR where a 360 video plays and then transitions to another one through a skybox transition.

    Basically what I wanted to do is:

    1. Start playing first 360 video with VideoPlayer in Skybox
    2. Transition to video 2 by fading in another Skybox with video 2 attached to it

    Is it possible to do this? Because from what I've found out you need a video player to play any 360 video regardless of the skybox. I've managed to change scenes with the SceneLoader() but that requires the scene to fade in and fade out.
    What I want to do is blend the frames of the first video to the second video and then have the 2nd video play.

    Any workaround this?

    Thanks in advance!
     
  11. souledgar

    souledgar

    Joined:
    Feb 15, 2013
    Posts:
    5
    I assume you're using Unity's Panoramic Skybox technique. The problem is that in Unity, there is only ever one skybox. In order to fade-transition from one thing to another, you need two things to exist at the same time. If you want to continue using the panoramic skybox technique, here's a suggestion off the top of my head:

    1. Before you swap in video 2, render what is currently on the skybox into a texture. Render said texture onto a panoramic sphere or box around the camera, creating a fake skybox. Note that the texture is not a video, its a still.
    2. Swap in video 2. It needs a moment to load up.
    3. When video 2 is ready, fade out the fake skybox.

    Of course, this means that Video 1 freezes while Video 2 loads and transits, but IMO unless you're doing low res and bitrate, attempting to play 2 panoramic videos is risky business at best.
     
  12. voyagelms

    voyagelms

    Joined:
    Jul 12, 2017
    Posts:
    7
  13. dormouse

    dormouse

    Joined:
    Mar 1, 2011
    Posts:
    65
    Hello everyone,
    as i used SkyboxPanoramicShader to display panorama pictures as background, i have noticed that the alpha channel is not considered in the Shader. is there an easy way to add alpha channel to do some fadein-out effect ? thanks for any ideas.
     
  14. enigmagame

    enigmagame

    Joined:
    Feb 16, 2014
    Posts:
    13
    Same issue here, anyone have found a solution?
     
  15. Hunubul

    Hunubul

    Joined:
    Dec 17, 2018
    Posts:
    65
    Hey! I have 2 problems.
    One is that when I view images (.jpg), over-under, stereo, 360 images, I get an ugly blueish line where the edges meet. I tried setting warp more to clamp, I basically tried changing every option on my image, nothing changed. See attached pic.

    EDIT: Building errors have been solved by moving the script to Editor folder. I'm new obviously to this.
    Now I'm getting grey screen even tho cam is on, working, and my scene is checked in build settings. I'll most likely figure it out as well, unlike the line in the pics which I can't seem to solve.

    Why is this happening, how do I solve it?
     

    Attached Files:

    Last edited: Jan 10, 2019
  16. martinamenegon

    martinamenegon

    Joined:
    Aug 28, 2014
    Posts:
    28
    I am having the same issue of Hunubul! it works but I have a bluish seam (video works in other player and unreal, so it is not the video file.. I guess).. anyone that can help with this issue?
     
  17. Hunubul

    Hunubul

    Joined:
    Dec 17, 2018
    Posts:
    65
    News! The empty skybox material is also having the line after the unity update. Does anyone know how to make it disappear?
     

    Attached Files:

  18. jaysalois

    jaysalois

    Joined:
    Jan 12, 2019
    Posts:
    3
    Hey Everyone! Seemingly simple question(maybe not so simple answer as I've searched quite a bit?[and I am sincerely a novice at this])….Is there a way to have multiple hotspots with videos attached automatically load at the same time at Scene Load? I'm trying to sync different camera angles that were recorded simultaneously.
     
  19. ninjaconsultant

    ninjaconsultant

    Joined:
    Apr 1, 2013
    Posts:
    1
    Hi!

    I've been following this google doc with some success (!) to but my 360 videos into Unity 2018.3.9f1 for an interactive project.

    I have a dozen videos, and it's tedious to make a new material each time. I can't seem to duplicate materials... can't I prefab this process somehow? (I'm like an advanced Unity beginner, I suppose).

    Also the doc says to go to Windows -> Lighting, but on this version of Unity on a Mac it's more like Windows -> Rendering -> Lighting Settings, which took some digging because you can't really search for that in the Help menu.
     
  20. DieterLaser

    DieterLaser

    Joined:
    Jul 1, 2017
    Posts:
    5
    oh my god thanks for that!!!
     
    Last edited: May 9, 2019
  21. aetechshop

    aetechshop

    Joined:
    Aug 21, 2019
    Posts:
    1
    nice things draw on 3d maya software i really admire from your work.