Search Unity

Video Texture and Android GearVR

Discussion in 'Android' started by lawrensm, Nov 26, 2014.

  1. lawrensm

    lawrensm

    Joined:
    Oct 18, 2013
    Posts:
    6
    Hi all,

    I'm new to Unity and plan to use it for a 360 video related application I want to build for the upcoming GearVR. To those unfamiliar, Oculus has released a mobile SDK for this device and have included a native 360 video player as an example in the SDK docs.

    I would like to use Unity for many of the complicated interactions/environments/etc. while not watching a video, but once a video is has been chosen by the user, utilize native code to get the best performance when decoding/rendering the video to a sphere. Note the hardware in this case will be a Galaxy Note 4 (within the GearVR).

    http://docs.unity3d.com/Manual/Plugins.html
    http://docs.unity3d.com/Manual/NativePluginInterface.html

    Unity provides native plugins so it looks like I can compile native code built for android (NDK) and maybe take advantage of the hardware and avoid Unity's overhead when it comes to rendering the video. Am I on track here?

    In general, I'm concerned about performance constraints, or any other limitations when decoding and mapping video textures. From what I've experienced I have not been impressed with using MovieTexture. Any advice here?

    Any advice, guidance, what have you would be greatly appreciated!! Thanks in advance.
     
  2. WisockiJr

    WisockiJr

    Joined:
    Jul 5, 2014
    Posts:
    30
    Hi,

    there is the answer to your question, Unity will not help you play movies on textures on Android devices, but is surely is possible, the problem is that Unity does not want it to happen, so you take Qualcomm Vuforia demo to see how to do it. They have a nice example, see the link below:
    Take a look at VideoPlayback-4-0-11.unitypackage, it provide you a nice sample on how to play video on texture on Android devices (4.0+), you can use this texture on a Sphere or Cilinder to use it into Virtual Reality together with GearVR or GoogleCardboard, in fact I am doing this right now, you will achieve your goal playing 360 movies on GearVR into your Unity3D application.

    Also take a look at Vuforia Digital Eyewear videos,

    Kind Regards
    Renato Wisocki Junior
     
  3. GilAsher

    GilAsher

    Joined:
    Dec 4, 2013
    Posts:
    33
    Hey guys, i'm trying to achieve the same thing myself.
    Did anyone of you have any success?

    Maybe share some tips?
     
unityunity