you can fly!?
Compositing animations and video in PD Pro 4:


composite animation with alpha

take me back

whatever it is, it looks painfull
AVI (Xvid codec) version here (212 KB)

This tutorial shows some of the advanced tools of PD Pro for working with animations and video in AVI files or animation file sequences. In particular, it shows how to composite an animation over another, when the 'overlaying' (foreground) animation is an image sequence which uses the Alpha channel for opacity masks.

Example: Our 3D rendered animation shows a chunk of green cryptonite spinning through space against a black background. The Image sequence was rendered in a 3D program, with an alpha channel which is used to in each image to flag the pixels of the surrounding background as invisible/transparent while the cryptonite is visible/opaque.

PD Pro has the ability to composite such animations in different ways.

the Foreground:
the BMP image sequence with alpha mask to be composited over an animated background

This is the animation which will serve as the animated background. More sophisticated examples will be shown further down in this tutorial.

Creating an animated background like this is a snap with PD Pro. Start with a single image and use the Fill tool with a fill setting using the horizontal gradient.  Select a predefined gradient or make your own, and then fill the whole blank image to see the gradient fill it in. Using the menu: Animation>Create..., create an animation with this image as the base. Start the Timeline from the Animation menu, and apply the Transform filter with full scaling (2x) and translation from left to right and a slight rotation angle change too. Render this filter. Done. The gradient background now appears to move right to left and turn sideways, giving perhaps the appearance of the a camera panning left to right from outer space into a blue planet's atmosphere.

the Background:
the Targa (.TGA) image sequence created in PD Pro which will serve as background

The goal is to create a compostion where the cryptonite animation is appearing in front of the background. In this first example, we created an animation of the same frame count (60 frames) and same size (640x480 pixels) and saved it as another image sequence. The Flash animations shown were resampled to 160x120 afterwards using PD Pro, and saved to AVI for insertion into a Flash video conversion tool.

Please Note: Some of the features shown here were already available in PD Pro 3.7 (witht Undo disabled in the Timeline editor). It is recommended to use v4 though, with the 4.0b update patch or later.

Here's how it's done:

the Composition:
the resulting animation after alpha-compositing the cryptonite animation over the background

Loading the Background Animation or Video

Use the Animation menu: Load sequence... if  the animation is in a file sequence. There's also an option to load it from an AVI file, and to open a DWA (DogWaffle Animation) file.

Selecting and Loading the image sequence

Navigate to the folder containing your image sequnce of the background. Click and drag from the first frame down to the last one you want to load.

The default image format it looks for and lists in the current folder pane is Targa (.tga) files. If you have it in Bmp, Png, Tiff or other formats switch to that format.

Scrubbing through the loaded animation

The animation toolbar can be used to view each frame. Use the Advanced option to see the thumbnails too.

Opening the Timeline

The compositing tools are in the Timeline editor. Use the menu:

Animation > Timeline...

to open the animation timeline editor. It lets you apply many filters along the frames of your animation.

Composite with Sequence

scroll down to the bottom groups of filters, where you'll find the 'Composite with Sequence' filters.

Click the one named  'Alpha comp' which does the compotion by overlaying through an alpha channel expected to be found in each image to be composited.

Select Sequence

Click the button (the only parameter of this filter) that lets you select the image sequence that you want to composite over the current animation.

It helps to have that image sequence in its own folder.

Select First Frame of Sequence

Click the first frame's file of the sequnce to select it.

(click to enlarge ^)

Click 'Open' to have it selected

You can then immediately preview the effect of the filter's compositing action by scrubbing through the timeline, and not only on this current (first) frame.

 Just click anywhere in the timeline area. Even though you only selected one file (the first frame), PD Pro will figure out which other image files to use based on the number scheme expected in the first frame's filename.

Render the Composition

Now that all is in place, click the 'Render' button. Project Dogwaffle Professional will then apply the filter, frame for frame.

Each frame from the sequence will be rendered over the corresponding frame of the current animation, and use the alpha mask from the sequence to ensure that only the pixels which are enabled (opaque) are composited into the existing animation.

View the resulting composition here:
AVI file:  12-composition-640x480.avi 
(1.7 MB, Indeo 4.5 codec, safe for Quicktime too)

While you're at it: Resampling the animation

You can quickly resample the new animation to a different resolution, using the Resample item in the Image menu. It will apply to all frames of the animation.

You can for example select from a number of preset dimensions, or just click the  "/2" button, for half the current size.

a few seconds later, you'll have the newly resized clip ready for viewing and saving.

Saving to AVI

Use the menu:  Animation > Save AVI

You were able to preview at different speeds, but you may want to save it for playback at a different speed when saving it to AVI file. For example, preview at 24 fps, but select 15 for final viewing on the web.

Be sure to indicate the desired target playback rate in the dialog when saving to AVI.

Here's an example, esampled down to 320x240 pixels:
AVI file: 16-compo-resamples320.avi 
(555 KB, Indeo 4.5 codec, safe for Quicktime)

other tools: TimeStretching

You can also do a number of other things directly on the frames, such as time stretching. For example, if we have 60 frames but want a total of 90 frames.

The time stretch dialog offers a way to specify the new desired frame count, and whether to create the new frames by blending their neighboring frames for smoother transtions.

Make Loopable

Another popular feature is to make an animation into a loopable animation.

There is another tutorial on that topic here: loopanim