First time Unity user.
Is is possible to use a movie's alpha channel to control transparency of a texture? Or do I need to use a second grayscale movie that only contains the matte?
How CPU/GPU intensive are movie textures -- can many be played simultaneously? Anyone have any movie texture examples I could look at?
Oh my! If you can give away the code for this .mov material you speak of, I would be sooo very excited. I'm currently trying to do the same.
If you can't give out the code, could you explain how the code works? Maybe I'll whip up my own version.
answered Dec 16 '09 at 04:58 AM
.mov are converted to ogg theora videos which is the only video format that works natively in unity.
What you basically need is a shader, no code actually. The shader does nothing else than using the second movie texture as the alpha mask for the first movie texture.
If you stored luminance / brightness data in the second one to represent the alpha, then its just a matter of reading the color of the second and assign the g, r or b component to the a (alpha) component of the first texture.
That way movie texture 1 will use the R / G / B channel of movie texture 2 as its alpha channel.
As for the intensity: they are done fully decompressed in cpu as far as I'm aware. As such you should avoid having too large movies, especially nothing in the range of HD, if it shall run on normal machines too.
answered Dec 17 '09 at 12:20 PM