Search Unity

[RELEASED] Universal Video Texture 1.1 Update - Video for Unity free and more

Discussion in 'Assets and Asset Store' started by kahalany, Jul 18, 2012.

  1. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    BTW, that Enums.cs conflict comes from PlayMaker's inclusion of PhotonNetwork in its package.
     
  2. aum

    aum

    Joined:
    Dec 17, 2012
    Posts:
    20
    Hi, I bought Univerrsal Video Texture Pro and seems works fine, but we are working with a big project .

    I have a sequence of images 1600 images to 2K (2048 compressed) in the resources and when create the standalone build the project have 3GB file.
    The problem is that when play the project it crash, but not in the editor.
    The log says.."Receiving unhandled NULL exception"

    I have read in several post that seems that are a problem with > 2GB of resources.assets file, but also tells that in v4.X of Unity was corrected.

    I'm working in a Mac book pro with 8GB and the last version v4.2.1. and the problem continues.

    I'm tried to compile with x86_64 version (for redirect more memory) in mac with the same result, I have tested to compile in windows x64, with the same result.

    Until 1.99GB works (x32 and x64), ....I add another image that have to exceds this size and crash.

    Could you help me.. I'm very desperated..

    Thanks
     
  3. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    aum, I need to conduct another stress test, but I believe Unity may not be able to handle more than 2GB of texture assets at the moment. I did a few tests a while back with 3GB image sequences: The builds compiled just fine - but when executed only played a black texture. All these "phenomenons" should be obsolete once Unity goes 64bit.

     
  4. estudio

    estudio

    Joined:
    Sep 18, 2013
    Posts:
    1
    Hi -
    I'm curious about the memory management abilities of UVT. We're currently using 2k sprite sheets, with each sprite cell at 512x512 pixels, to scrub through twenty 12 second image sequences. Obviously this is posing some memory management challenges. We'd love to be able to have three sequences loaded at any given moment (current sequence, previous sequence and next sequence,) and then unload one of those three and load a new one while the camera is in motion.

    Does UVT allow loading/unloading of its video textures on the fly while the camera is in motion?

    Thanks.
     
  5. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi there. Loading/Unloading is exactly what UVT's memory management does at runtime. To achieve what you're looking for you can either prepare each video texture as a prefab and then simply turn on/off each one at the order of your choosing or simply use one video texture and manually change its relevant parameters (filename, FPS, first frame, last frame, etc... ) through script at runtime.

    Let me know if you need any help.

    Royie
     
  6. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Wow this seems like such an amazing plugin. I just want to check is there a way of making UVT work with a GUI Texture instead of a plane or a mesh. Otherwise if I do use a plane is there anyway to guarantee that the video will display fullscreen on any resolution/aspect ratio? If this is covered this plugin is a definite buy.
     
  7. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi, XmachinaX.

    UVT does includes a script for utilizing the GUI texture for fullscreen playback with customizable scrollbar and timecode. If you don't need fancy controls you can experiment with the free lite version which utilizes ONLY the GUI texture.
     
  8. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    When is the update with the fix? Due to problems with Playmaker.
     
  9. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi, Nilton.

    The update has already been submitted to the asset store for review.
    It should be online anyday now.
     
  10. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Update 1.78 is now available for download at the asset store.
     
  11. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    Already downloaded. Thank Kahalany.
     
  12. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    How is Playmaker support? Im using Playmaker for the majority of my coding.
     
  13. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    I'm not a Playmaker user so I can't really say. In the last update I merely fixed a conflict between the two.
    I believe nilton here would be more useful in that department.
     
  14. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    Using this tool can you set up a .png sequence and play x frames then stop and loop x frames until a hit-box is clicked. Then rinse and repeat these steps to make an interactive video sort of like a step by step flash tutorial? If so, is this easy to do in the inspector or would I need to write all new code that functions along side your scripts?

    Also is this JS or C#

    Thanks.
     
  15. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi, Giantbean.

    UVT is written in C#. You can achieve what you're aiming for by checking either UVT's current playback position or frame number and call the Stop() or Play() methods accordingly.
     
  16. radjudy

    radjudy

    Joined:
    Oct 23, 2013
    Posts:
    13
    hey, i'm wanting to create a scene with a lot of objects that have video textures on them. how many do you think is the maximum that it could handle, and do you have advice as to the correct resolution of the jpegs to make them manageable in this instance?
    i haven't bought this yet, i am still assessing if i can do what i want at all.

    thanks!
     
  17. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi, radjudy. The "maximum" you're referring to is a rather dynamic variable as it changes according to your image resolution, FPS, memory management mode and target platform.

    How many video textures are we talking about?

    The only way to really answer your question is to conduct a stress test taking all of the above parameters into play.
     
  18. radjudy

    radjudy

    Joined:
    Oct 23, 2013
    Posts:
    13
    hi kahalany,
    yes, i realize it is kindof a vague question: i want (ideally) to create a field of dispersed objects, like say 100 of them (i am assuming i wouldn't be able to get away with more) with each having a short 1 minute video loop. lets say, 960x720 res at 24 fps, (though i could certainly decrease either of those, they're just pretty standard -- it certainly adds up. at 24fps that makes 1440 frames and if i half it at 12, its 720... how does that work with unity's deltatime? since your asset deals with image files, how does the FPS work? ). on top of this, i plan to have other scripts attached, guiding these items movement in space. so... i know that is a lot to ask.
    i'm using a mac, so i'd probably output it for mac, or web.
    i'm not sure how to answer the memory management mode question.
    do you think something like this is even doable? or should i adjust my project?
    also, thanks for your prompt response!
     
  19. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Well, radjudy, the closest rectangular texture res to 960x720 is 1024x512 which amount to 256Kb (that is with no mipmaps). A simple math would get us to around 360Mb per minute. Now multiply that a hundred times and we're talking 36GB :O)
    Even if it WERE possible in terms of performance - Unity, still as a 32bit application cannot reliably compile more that 2-3GB of asset files into an executable package.
    The FPS advances the the frame index X amount of times per second.
    If we're talking about the same video texture to every object, now that should be a piece of cake - as simple as attaching one UVT script to a one master object and turning on the "Shared Material" option. This way each object sharing the same material will display the same video texture with no performance overhead.
     
  20. radjudy

    radjudy

    Joined:
    Oct 23, 2013
    Posts:
    13
    ah, but if we're talking about, say, 10 video clips that'd be too much...?
     
  21. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    You'll still need to lower your res to something like 512x512 in order for the your images to fit into a Unity executable. That said, yeah, it may be doable. Haven't tried or needed more than a couple at a time so this is all theoretical.
     
  22. radjudy

    radjudy

    Joined:
    Oct 23, 2013
    Posts:
    13
    ok, cool.
    thanks for indulging all my questions :)
     
  23. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Hello, nice project! I might buy it for my project. Question. Is it possible to start a movie with a trigger? Like when person moves into a trigger area, the video_1 on textureplane_1 autostarts?
     
  24. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi, Devision4,

    Sure, you simply call UVT's Play() method once the collider is triggered.
     
  25. odgdude

    odgdude

    Joined:
    Dec 14, 2013
    Posts:
    6
    Does this support video with alpha channel?
     
  26. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Yes.
     
  27. FleepLoovay

    FleepLoovay

    Joined:
    Sep 4, 2013
    Posts:
    7
    Hello

    I also have a slight issue with size...
    I'm making an app for android and ios, and I have videos of several minutes...
    I made the images with a max size of 512, I remove the auto mip maping, but when building, unity is making images of 180 KB when I need them to be around 4 KB

    That's a 'problem' with unity, but it makes my videos way too big for mobile builds... ( a 60 MB mp4 video is now taking 580 MB of images in my build)

    I was wondering just one thing, could it be possible to get the images from the streamingassets folder ? That way they would not be recompressed by unity and stay at the size I set them up ...
     
  28. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi, FleepLoovay.

    I've experienced with streaming textures from an external source. However Unity still has to encode the images to a runtime friendly format before it can upload them to the graphics card. Since this process happens in runtime it is not suitable for real time application as each texture can take up to a few seconds to be encoded.
     
  29. FleepLoovay

    FleepLoovay

    Joined:
    Sep 4, 2013
    Posts:
    7
    Hello

    Thanks for your answer, but I'm not talking about external streaming, I'm talking about putting all my files in the streamingassets folder of the assets folder of my project.
    Unity is suposed to copy the files in this folder verbatim during the build and not recompress them, so it would mean keeping them all at 50 MB and not 500 ...
    But it would mean to change the way your script get the images...
    http://docs.unity3d.com/Documentation/Manual/StreamingAssets.html
     
  30. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Thanks, FleepLoovay.

    I'll look into that.
     
  31. Tmtakala

    Tmtakala

    Joined:
    Mar 12, 2014
    Posts:
    16
    How long videos does the UVT support? Is it possible to get 20-30 minutes of video at 25 FPS?
    We've tried to bring video frames as textures to Unity, but the system doesn't seem to handle over 1000 textures well (build crashes on Resources.load). Unity also generates individual profiles for each texture, which leads to a increased file size, load times, and trash files in the Unity Project. How does UVT handle these issues?
     
  32. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi, Tmtakala.

    Currently Unity cannot reliably handle build sizes over 3GB, this is due to its 32bit architecture. It's not really a matter of how many textures you have in your project but rather the accumulated size of those textures. In order to get around individual profiles you can simply pre convert your images before importing them to Unity - after that it's just a matter of simple drag and drop. You can also disable mipmapping for your textures which effectively reduces their size by 30%.
     
  33. mateustavares

    mateustavares

    Joined:
    Feb 18, 2014
    Posts:
    4
    Hi I´m having trouble making a video loop on an iPad, the video does loop but everytime it goes to loop the video blinks on and off before returning to normal. Any idea on how to solve this?
     
  34. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi. Are you using the FullScreen or the Material script?
     
  35. mateustavares

    mateustavares

    Joined:
    Feb 18, 2014
    Posts:
    4
    I was using fullscreen, but I was able to reduce the video size so that it was barely visable that it blinks.

    However I´m running into a different problem now with the material script on the iPad, when I start playing the video plays normally however, towards the end of the video the entire mesh just turns white. I don´t why this is happening since it plays fine when I test it on my pc.
     
  36. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Are you using low memory mode (Normal)? Seems like your video buffer runs out of memory towards the end of the clip. Also, make sure that there is only one UVT for every image sequence so they do not conflict with each other.
    I
     
  37. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Hi kahalany,

    First off, I enjoy your asset works very well (even on WP8 and Windows store apps which was a pleasant surprise).

    One feature you might want to add is a delay for the auto play. I would think my use case is fairly common which is to play a company intro video when you first start the game after the unity logo. This usecase means it will want to be fullscreen and play immediately after scene load. On desktops (and probably anything with a surplus of resources) everything was fine. However, on mobiles (ios, android, wp8, etc) there was a noticable audio sync repeat the first time the video was played. Android seemed to fair the worst on this effect with it being about the first second of sound repeating to sync up with the video. When I modified your scripts to wait a second to play everything was happy with no audio stutter/repeat at the beginning on any of the platforms. This would only impact anything trying to play immediately on scene load and is understandable on platforms with lesser resources. Just thought I'd let you know that perhaps in addition to the auto play inspector option you might want an auto play delay in the inspector as well because I would think this would be a common usecase.

    Again, really like your asset.
     
    kahalany likes this.
  38. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Thank you. I'll look into this one as well for future releases. Ideally , instead of a fixed delay there should be a method for confirming actual video playback before playing the attached audio.
     
  39. radjudy

    radjudy

    Joined:
    Oct 23, 2013
    Posts:
    13
    Hi, i have version 1.78 and am trying to get it to work a material texture on a terrain. This hasn't been working for me, however.
    do you have any suggestions? anyone try this?
    --j
     
  40. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Hi, I haven't tried that myself. I'm not sure it's possible as a terrain is a special case when it comes to shading. I'll look into it and see what can be done.
     
  41. thanhle

    thanhle

    Joined:
    May 2, 2013
    Posts:
    162
    my plane is create a video 10 - 20 min , i use your plugin but it just show 3 min is : 1000 image ( frame)
    how i can unlimit image because my video so high !
     
  42. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    10-20min video is going to take a HUGE amount of frames and space and will result in a build size higher than what Unity can currently handle. This should be resolved once Unity 5.0 is out. However for such long videos you're better off with using a video player solution rather than UVT which handle image sequences.
     
  43. sleekdigital

    sleekdigital

    Joined:
    May 31, 2012
    Posts:
    133
    I have a problem on Android. If I enable the force audio sync, the audio gets extremely distorted and stutters terribly. I'm playing the sequence at 15 FPS and the imported audio file is an mp3 128kbs, 16bit, stereo, 44.1kH. The android device I tested on is an HTC One M8. I'd like to know if there is some simple way to fix this problem. it plays fine when force audio synch is turned off, but of course that allows the audio video to get out of sync.
     
  44. kahalany

    kahalany

    Joined:
    Jul 6, 2012
    Posts:
    80
    Ok. I 'll try and recreate your situation and get back to you.
    BTW, what Unity version are you working with?
     
  45. sleekdigital

    sleekdigital

    Joined:
    May 31, 2012
    Posts:
    133
    4.6.0f3 Pro
     
  46. Riccardo Marchesini

    Riccardo Marchesini

    Joined:
    Jan 21, 2015
    Posts:
    6
    Hi kahalany, I'm working on a project where I need to play 4 or 5 big movies (I mean separately, in different environments, not all together).
    We're talking about 1500 to 3000 frames with a resolution of 2048x1024, plus audio. Of course, putting all the frames in the Resource folder doesn't work and causes a crash.
    Do you think your plugin could deal this task, putting the frames in an external folders?

    Riccardo
     
  47. mohamedhassan

    mohamedhassan

    Joined:
    Mar 19, 2015
    Posts:
    1
    i try to make it but still appear this message
    MissingComponentException: There is no 'Camera' attached to the "Cube" game object, but a script is trying to access it.
    You probably need to add a Camera to the game object "Cube". Or your script needs to check if the component is attached before using it.
    VideoTexture_Lite.Awake () (at Assets/_Scripts/VideoTexture_Lite.cs:52)

    how can i attache the camera
     
  48. littlewinch

    littlewinch

    Joined:
    Oct 12, 2013
    Posts:
    7
    The movie I am playing works in the editor but not in the build. I went through the log output and this showed up:
    "null texture passed to GUI.DrawTexture" - it had this message for all the textures in the video.