AE: Feature Wishes

After Effects is just about my favorite software application. Very elegant model, and a clean & responsive UI.

But I think I can articulate two well-considered features that would boost its utility quite generally.

Feature Request 1: Foldering

When working with many layers, it would often be nice to group several of them together. To do this, I’d like to create a folder for them. This would help manage the grouped layers visually, and collapse to reduce them to a single line item.

You’d be able to apply effects to the folder. Maybe it’s called “groups”.

This is very similar to a precomp, of course, but you can work on the keyframes locally, instead of switching up and down the tree or using a split view.

Feature Request 2: Exportable Rigging Properties

Precomping is great, but it still doesn’t let you “rig” and “instance”. In my particular case, I’ve got two “claws” animated. They’re identical, but need to animate differently. Today, I need to duplicate the layers (either in the comp, or as separate precomps). Which is a shame, because I’d like to fiddle with the claw design, maybe later, and have my changes affect both!

So, this feature lets you expose a keyframable property on the comp, so that when it’s nested you can control it from the parent comp.

You can, if you’re overly clever, use Time Remapping to accomplish this a little bit. But I’d rather see clearly named “rigging” properties on my comp, itself, to animate.

(You could imagine also being able to add rigging properties to a folder, or maybe even any layer. This would be the same functionality as the “Slider” effect, but maybe tidier.)

As well as sliders and checkboxes, you could export “layer” properties, which pipe in a layer of the parent into the child comp. This lets you create an effect out of a comp. Presets can do this, a little bit, but in a flat, non-tweakable non-instanceable fashion.

I’ve heard one AE developer refer to a variation on this idea as a “Capsule”. The idea he described would require (I think?) you to save a comp into a separate file, before being able to reuse it. I think one of the brilliant project features of After Effects is that you get multiple timelines within one project. I like the One Big File workflow! (I wish 3d apps had this; as far as I know, they all work only on a single timeline per document.)

Miscellany

It would be nice to drop in a “reference” layer, that could repeate a different layer within the same comp to a different layer order. This would need to be post effects to be useful. It would let you perform different treatments on the same source… again, without a precomp.

It would also let your manage a folder, and still retain flexibility on its layer order.

To conclude…

After Effects is already quite strong in terms of “instancing”. That’s practically its main power. But it fails for purposes much beyond “tidiness”. “Rigging Properties” addresses this key omission.

Photoshop recently got “foldering”, and lets you set transfer mode and transparency on a group of layers. This is grand! I want it for After Effects.

AE: A Stupid Text-Control Trick

Here’s a little movie that demonstrates a text track being used to “trigger” the opacity of another track.

one-part.mov

click for
http://omino.com/pixelblog/wp-content/uploads/2009/03/one-part.mov

Controlling Pip Opacity From Text

I needed a blinking pip. (It’s actually for an interesting optical effect… but for now, we’ll just talk about the pip.) Rather than keyframing each blink, I used a Text track where A is a very dim blink, and Z is a very bright blink. The blinks all have the same luminous decay. Every keyframe on the Text track triggers a new blink.

The expression to do this is actually a little program. (Exactly what some artists hate…)

Here’s the expression for controlling the Pip’s opacity. It’s in 3 parts: 1) Find the most recent Text track keyframe, 2) See what letter it was, from A to Z, and 3) Set the opacity, taking into account the brightness and how long it’s been decaying.

// find most recent key
var s = thisComp.layer("controlTrack").text.sourceText; // score layer
var n = s.numKeys;
var kValue = "A"; // default value
var kTime = 0;
for(var i = 1; i <= n; i++)
{
	var k = s.key(i);
	if(k.time <= time)
	{
		// only care if there's a char in our position.
		var a = k.value.charAt(0).toUpperCase();
		if(a >= "A" && a <= "Z")
		{
			kValue = a;
			kTime = k.time;
		}
	}
}

// now, how long ago was that?
var age = time - kTime;

// map character a-z to 0.0-1.0
kValue = kValue.charCodeAt(0);
kValue -= 65;
kValue = kValue / 25.0;

// decay appropriately
var result = kValue * Math.pow(0.3, age) * transform.opacity;

// done.
result

Why do this tricky control business with a text track, instead of just keyframing the flashes more directly? This way, the behavior is very well specified... and even more so for the next movie.

Controlling Five Pips With a Text Track

five-parts.mov

click for
http://omino.com/pixelblog/wp-content/uploads/2009/03/five-parts.mov

You can easily see what's going on here. Five characters control five pip's blinks.

The clever bit was to avoid pasting that monster expression from above into five different tracks. Instead, a single slider control track is driven from the text, and shows the first pip's blinking at time=0, the second pip's at time=300, the third's at time=600, and so on. The whole animation is 20 seconds, so there's plenty of room on the timeline for this.

Each pip's opacity is driven from the appropriate section of this slider channel:

pip0 opacity: transform.opacity * thisComp.layer("controlTrack").effect("scoreReader")("Slider").valueAtTime(time + 0*300)

pip1 opacity: transform.opacity * thisComp.layer("controlTrack").effect("scoreReader")("Slider").valueAtTime(time + 1*300)

pip2 opacity: transform.opacity * thisComp.layer("controlTrack").effect("scoreReader")("Slider").valueAtTime(time + 2*300)

... and so on.

So, why pile this cleverness atop an already tricky expression? Because with an expression that tricky, anything is better than duplicating five times across different tracks!

Here's the expression, which extracts brightness from the text track, for each position, at times separated by 300 seconds.

// Allow different sections of this track to extract the brightness for each pip.
// we divide it up into 5 minute segments (300 seconds). To find out your brightness
// at a particular time, examine *this* track at time + 300 * pipNumber.
//
// This is an alternative to duplicating the rather ornate expression into each pip, at
// the expense, of course, of complexity.
//

var segmentDuration = 300;
var segmentIndex = Math.floor(time / segmentDuration);
var segmentTime = time - segmentIndex * segmentDuration + .01; // local time... plus 1/100 for roundoff

// find most recent key
var s = thisComp.layer("controlTrack").text.sourceText; // score layer
var n = s.numKeys;
var kValue = "A"; // default value
var kTime = 0;
for(var i = 1; i <= n; i++)
{
	var k = s.key(i);
	if(k.time <= segmentTime)
	{
		// only care if there's a char in our position.
		var a = k.value.charAt(segmentIndex).toUpperCase();
		if(a >= "A" && a <= "Z")
		{
			kValue = a;
			kTime = k.time;
		}
	}
}

// now, how long ago was that?
var age = segmentTime - kTime;

// map score character a-z to 0.0-1.0
kValue = kValue.charCodeAt(0);
kValue -= 65;
kValue = kValue / 25.0;

// decay appropriately
var result = kValue * Math.pow(0.3, age);

result

And lastly, here's the self-contained After Effects project.

Salmonella

To foster a bit of post-holiday spirit, and promote safe food-handling all year round, I thought I’d try to animate something like salmonella bacteria. Salmonella can grow on turkey, and can survive months in plain water at room temperature, and looks like this:

So, in After Effects, I made some that are slightly stylized.

Read the rest of this entry »

A Thing About Machines

I was going to write a short post about using After Effects expressions to capture the “feel” of machines. But I got so distracted by this simple example I put together:

pulleys.swf

click for
/pixelblog/content/2007/machine/pulleys.swf
Read the rest of this entry »