AVI alpha?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Lostinthewoods

AVI alpha?

Post by Lostinthewoods »

I have an "odd" idea. I want to play a 2D movie, on top of a 3D backdrop, but each frame of the video will need to have opaque AND clear pixels. Alowing parts of the 3D to show through the movie.

Let me explain it another way as well. Say I have a video (series of pictures) of a 2D cartoon cat. The cat is jumping into the air, and doing flips and stuff (dosnt realy matter). Now, I want to play this video of the cat ON TOP of a 3D background (think paper mario?), BUT, I dont want to display anything from the movie BUT the cat, every other pixel of the movie is clear, allowing the 3D to show though. Is there anyway to introduce an alpha channel into the avi, and play it on a 2D box in irrlicht?

I am pretty sure that sprites is probly my best answer, but I have a feeling the size of the image needed to create that long of an animation would probly make the video card CHOKE, and since I dont particularly NEED it in memory, I only NEED it to stream, it kind of defeates the purpose. I suppose another alternative, is to simply create a series of images (movie) and load/unload each one 1 at a time in succession (kind of like steaming), that each have alpha values (basicaly just a BUNCH of textures), and map/unmap them to the 2D square, very quickly. BUT, would that make irrlicht choke? Loading and unloading / binding and unbinding and then displayhing 200 frames of images in a matter of a few seconds, has to be taxing?

Any help is greatly appreciated.
JoeWright
Posts: 74
Joined: Mon Dec 08, 2003 3:51 pm

Post by JoeWright »

You can have alpha channels in AVI files although I'm not sure about how you'd go about generating the alpha channel. For example, 3d max won't produce a alpha channel in an AVI.

DirectShow does support the use of alpha channels in AVI's.

So I think this is possible, but it may have implications for Irrlicht and how you produce your video.

Joe
Lostinthewoods

Post by Lostinthewoods »

Well, I have partialy answered my own question. I have found that I can load/unload and display a series of images extreamly quickly, So animating in that way shouldnt be too hard, BUT that requires me to save a couple hundred still images, instead of one video file. So, I am still going to look some more.
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Post Reply