animations with alpha in Director
by CJ Kramer
on
Jul 17, 2008 at 4:05:38 pm
Hey there-
I’m working on educational DVD-ROM being developed in Director 11 (Windows). Amongst the many elements in the presentation are many, many short 3D animations rendered out at 640x480. My problem is I really would like to maintain the alpha -so as the image moves & rotates etc., the graphics on the stage behind it are still visible.
The source material I received from the modelers/animators is series of 640x480 TGA files, usually about 400 at a time (which at 30 fps comes to about 13 seconds worth), all with alpha backgrounds.
So I tried importing the series of stills into Flash and making a SWF file (thinking that its a good way to maintain transparency and high quality) but every machine it plays back on gets a different reaction. It ultimately hitches & stutters even on the computers with better video cards. (The stills are each about 850k a piece as TGAs). I tried batching them to PNGs (making them under 200k each), but the resulting SWF was no better.
I also tried just bringing in the cast of images into Director and using a behavior to cycle them through...but it still hitches here & there, clearly being too hard on the computers...
Any ideas?
Thanks so much,
CJ Kramer
Kol Rom Multimedia
Re: animations with alpha in Director by William McGrath on Jul 22, 2008 at 9:27:13 am
What hitches did you run into while cycling with lingo? Do you mean stutters in the animation? Maybe some well placed preloads could solve some of that.
¿Are you saying that the alpha channel is somehow involved in the hitches? If you try with the same number of pictures at the same size minus the alpha channel, ¿does it get rid of the said hitches?
But then again, it's inevitable that now and then the computer should get sidetracked to perform other CPU operations (check for units in the different drives, check for incoming mail, and so on), so at some point you will have a stutter no matter what.
Re: animations with alpha in Director by Brodd Nesset on Jul 22, 2008 at 3:18:32 pm
1. You say you want to have the Director Stage background to show behind the animations... If this is some kind of moving background (involving several sprite channels), it can be a challenge to play back this, and a long chain of alpha bitmaps on top of it.
2. There is 'alpha' more like a stencil (or silhouette) with anti aliased edges, and there's more complex alpha with semi opaque objects shifing opacity over time and even feathered edges. The latter is more taxing.
3. A set of PNGs should actually be OK. It could - perhaps - work better when played back from the timeline instead of Lingo (this is against conventional wisdom, but worth a try). Use the 'space to time' function to line up the bitmaps cell after cell in the Score.
4. Instead of using bitmaps at all, make a video out of it. Director supports Quicktime with alpha, which can exported with for instance After Effects.
5. Even better, if possible, is to make a video of the 3d animation AND the Director Stage combined. Take a snapshot of the Stage, and use it as a background layer with the string of bitmaps on top. This can be accomplished in After Effects, but even in Premiere too (or another video editing app). This will remove the entire alpha issue, and it's much easier for Director & your computer to play back a normal video. This is cheating a bit, but the end user doesn't need to know what technical solution you picked; it's the end result that counts. If you use little compression it will look very crisp.
5b. Even if there is a moving background involved, the above can be done. You can export Director animations as Quicktime, and then you use this as the background instead of a still. When combined with the 3d animation into one video, it will be the easiest thing for playback.
Her lips said "no!" but her eyes said "read my lips".
Re: animations with alpha in Director by William McGrath on Jul 22, 2008 at 4:54:33 pm
Or a variation of number 5 which would remove the QuickTime issues (direct to stage, jerky playback if the compression is not done right and so on):
In Director, make your animation on the timeline with your 3D plus background. Then export the frames as new 24-bit images (no need for an alpha channel from this point on). Use these new images either for looping with lingo or for a timeline-based animation.
You could, of course, use a video app for the animation and then export as numbered bitmaps rather than a QT movie. (Export in Director can sometimes be iffy.)
Re: animations with alpha in Director by Brodd Nesset on Jul 23, 2008 at 2:11:47 pm
An intersting point here:
"Doing it with Lingo" is generally prefered and recommended over timeline animations, but I wonder if this affects preloading here:
- Director WILL automatically preload elements found in the score, at least to a certain extent.
- Director can NOT predict which cast members are next out in an ordinary Lingo switch castmember-animation. This can cause hiccups - no?
Her lips said "no!" but her eyes said "read my lips".
Re: animations with alpha in Director by William McGrath on Jul 23, 2008 at 4:50:31 pm
Depending on your interactivity needs, sometimes you have no choice but doing it with lingo, of course.
[Brodd Nesset]"- Director can NOT predict which cast members are next out in an ordinary Lingo switch castmember-animation. This can cause hiccups - no?"
I'm betting on that, Brodd. If it's a preload issue, the hiccups would normally occur the first time around with each new batch of cast members. wouldn't it? When a whole cycle has played through once, the cast members are already loaded and should play more or less smoothly the rest of the time. (The more or less is beacause you'd still have some random minor hiccups when the CPU gets distracted. I think you just have to live with that.)
I would look for strategic places where you could preload the batch for the next animation before it plays.
Re: animations with alpha in Director by David Richter on Jul 24, 2008 at 10:12:05 pm
CJ,
Have you tried an animated GIF? They can have transparent backgrounds. You need to set the sprite to background transparent in Director as well. Though you do lose most, if not all interactivity. If not then try creating a Quicktime movie from the image files (w/transparent background) and then export as a FLV video. You can then reference the FLV from a SWF file on stage. Which should give you better results than playing successive images in a SWF file.
Re: animations with alpha in Director by Brodd Nesset on Jul 26, 2008 at 11:23:32 am
"Have you tried an animated GIF?"
Oh dear! 255 colours maximum, and that alpha channel must have a hard edge; no antialiasing, semi tranparency or feathered edges. This is a kind of pre millenium solution :/
"Try creating a Quicktime movie from the image files (w/transparent background) and then export as a FLV video. You can then reference the FLV from a SWF file on stage. Which should give you better results than playing successive images in a SWF file."
Absolutely! But keep your tounge straight when attempting this, regarding choice of codec and its settings. 32-bit+ and w/alpha are the keywords to look for.
Her lips said "no!" but her eyes said "read my lips".