-
Made a direction & velocity-based effect but need to modify it to work on parented layers/comp space.
Hi all,
I’m designing a a kind of stylised cel-animation-ish motion blur/smear effect using expressions controlling ‘Wave Warp’.
The way it works is that the Warp Amount depends on how fast the layer is moving and the Warp Direction depends on on the direction it is moving in. On a normal keyframed layer It’s already working surprisingly nicely based on my bodged half-understood edits of an obsolete corner-pin motion blur workaround 🙂 but since i will ultimately use it for character’s limbs etc parented to other moving objects, I need to alter it to work in relation to comp space somehow (& also, if manage to modify it for 3D layers, so that it can happen in relation to camera movement.)
Here’re my expressions:
WARP AMOUNT:
minblur = 130// warp turns off (these first lines limit the warp so it only happens when the object is moving really fast);
maxblur = 400//warp at highest intensity;
minamount = 0;
maxamount = 700;
var vx=position.velocity[0];
var vy=position.velocity[0];
bluramount = Math.sqrt(vx*vx+vy*vy)/20;
ease(bluramount, minblur, maxblur, minamount, maxamount)WARP DIRECTION:
var pt1=position.valueAtTime(
time-thisComp.frameDuration/2);
var pt2=position.valueAtTime(
time+thisComp.frameDuration/2);
deltaX = pt1[0] – pt2[0];
if (deltaX == 0) { deltaX = 1; }
deltaY = pt1[1] – pt2[1];
sign = (-deltaX / Math.abs(deltaX)) ;
radians_to_degrees(Math.atan(deltaY/deltaX)) + signI’ve fiddled about trying to figure out how i’d incorporate toComp or something but don’t really understand Layer Space Transforms well enough yet.
Any help much appreciated, I hope I managed to explain it OK, pretty tired. 🙂
Thanks!!