Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Why no video textures on mobile?

Discussion in 'General Discussion' started by TylerPerry, Mar 30, 2014.

  1. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Seriously? I've seen plugins that can do this on a iphone 3GS why not add support? And on the website it says that its not on IOS and Android, but what about BB and WinRT? My little demo scene runs fine on phones but now I gotta get a plugin if I want it on phones.
     
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    I dunno but Unity's speed for sending byte arrays to the GPU for textures is really slow compared to various other systems... e.g. all the SetPixels() and Apply() stuff... I don't think it's really very optimized for speed. e.g. you gotta have an image in main memory, then SetPixels to copy it all into an internal Unity memory area, then Apply() to upload it to the graphics card... turns out to be quite slow.
     
  3. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,000
    Unity has never seen video as an important feature to games and I guess doesn't realise just how important it is in general, otherwise we'd have had some decent updates by now. Its a shame as video is just so essential these days and although there are some great 3rd party plug-in solutions for standalone and mobile, when it comes to the web-player you are totally out of luck.

    Of course there is a sticky question of licensing codecs, but i'm pretty sure I remember reading h.264/mp4 was being touted as being reasonable/minimal license fees, especially as they wanted it to grab a big share of the online browser market, hence it being part of the html5 standard. I wish Unity would realise how big a role video is these days, but judging by the Unity 5 release page there isn't anything happen on this front at all.

    You do realise that Unity's slow update of textures is only for cases where the user/developer is using it, they don't use this system to upload textures, its just there to protect users from messing up. Unity itself can push texture data to the gpu card just as fast and efficiently as anyone else. Plug-in developers who tap directly into opengl/gles or d3d can do the same. So overal performance should not be an issue, other than with problems of the hardware itself.
     
    Last edited: Mar 31, 2014
  4. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    The plugins (currently) are way faster than doing it in Unity, and you can do video with alpha, which Unity doesn't support natively without doing a custom shader and mask.

    Vuforia plays videos on planes on mobiles very well and I use https://www.assetstore.unity3d.com/#/content/2449 for video with alpha on a plane on mobile.

    Converting a PNG sequence to .OGG ends up being something like 1% of the original file size of using PNGs to do the same thing.
     
  5. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,306
    I agree that this really sucks. Especially because if you have Materials that use a movie textures, your project won't even build for iOS. So this basically breaks the multiplattform-functionality we all so love about Unity. You'd have to remove the materials from the project - but then, when you switch back, they're gone as well.

    One of the unpleasant areas of Unity ... I'd really hope they'll fix it. Did anyone create an entry about this on Unity Feedback?
     
  6. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    I'm using videos on planes in iOS....even with alpha....
     
  7. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Perhaps it has something to do with the processing power of the phone, i.e Unity feels like iOS devices are not sufficiently powerful enough to justify adding it.

    Hogwash, I say. The newest iPad has 1 GB of RAM. I think if you're responsible, then you can make it work.
     
  8. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,509
    I did a project with video textures recently that had to be cross platform. Our solution was to grab the Ogg/Theora plugin from the Asset Store and then write our own wrapper for it to support audio (the plugin itself is for the video part only). So yes, there are definitely solutions out there.

    This is definitely one of the underdeveloped parts of the Unity engine. The built in MovieTextures have quite a few limitations or issues, and as far as I can tell have been given no attention for ages. Even when using the built in stuff just for PC/Mac we ended up writing wrappers to work around significant shortcomings - like not being able to snap back to an opening frame.
     
  9. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    The plugins run video textures great even on ipad2, which is much less than that. Unity could definitely update it if they dedicated time to it.
     
  10. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    The least they could do is have a dummy class on mobile, and have us pick a frame to be displayed. But seriously not supporting this is BS.