ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Animating 2D distortion effects with adjustment layers

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stephen NorringtonAnimating 2D distortion effects with adjustment layers
by on May 8, 2013 at 3:18:15 am

Hi there,

I'd like to animate a 2D distort effect such as Mesh Warp or Freeform (used purely 2D) in a specific way.

What I'd like to do is apply the effect to an adjustment layer and then use the adjustment layer's position property to determine where the centre of the distort effect rests.

In other words, when I create an adjustment layer it sits centered by default on top of a content layer. A distort effect applied to the adjustment layer also sits centered by default on the adjustment layer, thus the effect's "View Center" or "Position Centre" is centered on the content layer's centre. Distortions created by the effect work through the adjustment layer on the content layer.

But if I move the adjustment layer using its position property the effect stays centered. The adjustment layer simply moves "under" the effect, acting like a mask.

Is there any way of causing the entirety of the applied effect (ie: its default full-frame rectangular area) to move as a single unit in response to changes made to the adjustment layer's position property? Perhaps an expression?

Stephen Norrington

Artproject Independent Production

Return to posts index

Walter SoykaRe: Animating 2D distortion effects with adjustment layers
by on May 8, 2013 at 11:22:56 pm

If you're using FreeForm, I'd create a null object and link FreeForm's 3D Transform Position X and Position Y values to the null's X and Y position values:

For X:
thisComp.layer("Null 1").transform.position[0] - width/2

For Y:
thisComp.layer("Null 1").transform.position[1] - height/2

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events

Return to posts index

Stephen NorringtonRe: Animating 2D distortion effects with adjustment layers
by on May 9, 2013 at 5:38:05 am

Hi Walter,

Thanks for the response. I think my post was rather opaque. What I've been trying to do is move (as an example) Freeform's area of influence as if it were a layer or a solid - as a single overall "patch of distortion".

The idea is to set up a non-animating 2D distortion of a content layer using Freeform or Mesh Warp or whathaveyou and then animate (by way of track data) the entire distorted mesh as a single unchanging unit across the content layer (which needs to stay stationary), applying the static 2D distortion as a motion-tracked patch - kind of like a custom lensing effect

Perhaps there's a plug-in that will do this?

If you're interested, further details are below the jump:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Simple approaches I've tried fail because the distort effects, by default, seem to take their area of influence to be the boundaries of the 2D layer they're applied to.

The "intuitive" solution was to apply Freeform to an adjustment layer and move that around. But, in fact, the influence of the effect stays centered in the composition, even when the adjustment layer is moved.

I tested your suggestion and got versions of the same result: Freeform's mesh on a null, expression-controlled by that null's XY properties, moves as required but has no effect on the content layer below, Freeform's mesh on an adjustment layer controlled by the null's XY properties affects the content layer below but "drags" the layer wholesale, in effect doing a layer-sized XY transform, rather than a passing distort.

I came up with the following inelegant workaround but would love to find something better:

- stabilize the hero content,

- enlarge the composition to reveal all of the stabilized hero,

- XY-repo the stab.'d hero so the centre of stab. is at the center of the comp,

- apply Freeform via an adjustment layer,

- create the desired deform,

- precomp the stab.'d hero and Freeformed adjLayer,

- use the stab. track data (inverted) on the precomp to cancel out the stab.,

- resize the comp to match the dimensions of the original hero.

Inelegant, as I mentioned :-)

Thanks, best,
Stephen Norrington

Artproject Independent Production

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved