have a few queries coming in from my students about the possibilities of unity - theyre trying to decide whether to utilise it for their major projects. Many plan to make narrative led games and want to know if they can somehow incorporate quicktime or video in some other format into unity. I cant say that i’ve seen this done or even mentioned, so I thought i’d throw the question out you folks!
If Unity allows videos to be used as textures (I think I’ve seen it mentioned that it does) you could just put a GUITexture with the video as its material.
The last I heard here on the forums was that you could use -uncompressed- quicktime as a texture, but because of overhead, you were limited to fairly short video “snippets”. If you do a search of past posts you’ll probably find a post discussing this.
Personally, I’d love to see Unity add Flash video to the 2D GUI layer…
I’m not talking about using video as a texture, but rather as a 2D element in the GUI, like an intro video (although a video texture for 3D objects would be very cool as well). A number of other game engines already support this and this request has come up for Unity a couple times in the past. Of the video codecs out there, I’ve found Flash Video to be the best.
Seriously? It may be smallish, but I’ve never seen flv that didn’t look like garbage. Contrast Divx’s stage6 to youtube - there’s just no comparison.
The ideal solution, of course, would be to allow any installed Quicktime codec. If you’re worried about portability, the builder could transcode to a Unity-wide standard compression.
Yes, seriously. My experience is the exact opposite. If you compare comparable filesizes, the .FLV file always looks better and plays at a higher framerate IMHO. Plus, almost everyone has the Flash plugin installed (I’m talking Windows users). Not many people have DivX installed. Probably more have Quicktime, but not all the codecs.
The best option would be to support -everything-, then everyone would be happy.
Sure, if you don’t need alpha channels (or they’re not included in the video files you’re making) Unity could set it to 1. I was just saying that for any GUI work with video files, or other effects, you absolutely need a codec that includes alpha channels. I just had a look at ON2 with Flash and it does support 8-bit alphas which is really cool, but it says it’s a Flash Pro only feature which makes me think licensing issues would be involved… or just the fact that Flash Pro costs $699 could be a barrier to many.
Gif files do not have an alpha channel. You can only specify wheter a pixel is completely opague or transparent. (So in an sense the aplha channel is only 1 bit per pixel)
Also, animated gifs draw subsequent frames on top of the previous frames, reusing the transparency bit to indicate non-changed areas, which means that once a pixel becomes opague, it can not become transparent again in a later frame.
The compression rate is not very good and gifs are max 8 bit per pixel (using a 256 entry color index, with one entry reserved for transparency in transparent gifs)
So you get almost the same size (maybe around 50% size if you are lucky) as uncompressed movies at reduced color resolution with poor transparency effects.
interesting to look over this discussion, as far as I understand it from talking to peter in the irc channel unity doesnt currently support video… so, maybe this is indeed a good time to start discussing what the best solution would be. I’m siding with quicktime on this one - definitely in agreement that flash video using on2vp6 is fantastic, but restricted to those developers using flash8, which as has been pointed out is rather expensive, whereas quicktime pro is a fraction of the price. Plus its mac native, and easy to get working on a pc, as opposed to divx which has a much tinier market share when it comes to video (if you discount illegal tv / movie downloads). Thoughts?
My thinking is that whatever video solution we choose, we have to include everything necessary for it’s playback into Unity (standalones or web player installer). We can’t rely on users “just having Flash” or “maybe having Quicktime on windows”.
So the questions is what’s the best video quality, the smallest distribution size and the best licensing scheme.
AFAIK there’s a Flash SDK to allow you to integrate Flash creation and playback in your application. That’s why there’s so many 3rd party apps that can create Flash files.