ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Aftereffects expression to rotate a layer 180º based on the luminance of another layer working but not quite.

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Martin Buchhorn
Aftereffects expression to rotate a layer 180º based on the luminance of another layer working but not quite.
on Feb 18, 2012 at 7:23:02 am

I was hopping for a little help with this expression, forgive me but I'm very new to writing expressions and have modified one I found online to get to this point.
My aim is to create a custom transition using triangles rather than the rectangles of Card Wipe that ships with AFX. The WHITE WIPE pre comp layer will control the rate of the transition and the number of triangles rotating at one time with a soft edged wipe.

The expression is applied to the Y Rotation of the layer I wish to flip.

amp = 180;
sampleSize = [100,100];
L = thisComp.layer("WHITE WIPE");
P = L.fromComp(toComp(anchorPoint));
lum = rgbToHsl(L.sampleImage(P,sampleSize/2,true,time))[2];
(amp*lum)

Right now it flips the layer but from 0 to 180º in just one frame as soon as the wipe layer moves off 100% black rather than the gradual rotation I'm after.
Any help would be much appreciated.


Return to posts index

Andrew Somers
Re: Aftereffects expression to rotate a layer 180º based on the luminance of another layer working but not quite.
on Feb 20, 2012 at 9:12:40 pm

This probably should be in the "Expression" forum.

I just pasted your code into the Y rotation of a layer, I I think it is working as you would want it to.


How are you controlling the white level? I'm using levels...


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]