Automatic Proximity Reactions in After Effects

Published: 29 October 2024
on channel: olly
81,597
8.2k

Get $50 off Motion Array’s Annual Plan here: https://motionarray.com/?artlist_aid=...

Big thanks to Motion Array for sponsoring this video! Motion designers, don't miss out—subscribe to their service using the link above for access to thousands of video and graphics assets.

Download my free resources and tutorial files here: https://ollyos.gumroad.com

Instagram: / oliviero_s
TikTok: / oliviero_s

Subscribe to the channel and drop a comment with any motion design topics you'd like to see covered next.

Tutorial Expressions:

INFLUENCE POSITION

nullPos = thisComp.layer("NULL").transform.position;
objPos = transform.position;
maxDist = thisComp.layer("CONTROLLER").effect("Max Distance")("Slider");
strength = thisComp.layer("CONTROLLER").effect("Strength")("Slider");
dist = length(nullPos, objPos);
dir = normalize(objPos - nullPos);
moveAmount = strength * (1 - clamp(dist / maxDist, 0, 1));
newPos = objPos + dir * moveAmount;
newPos;

INFLUENCE TIME REMAP

nullLayer = thisComp.layer("NULL");
distance = length(nullLayer.position, transform.position);
maxDist = thisComp.layer("CONTROLLER").effect("Max Distance Time")("Slider");
strengthDist = thisComp.layer("CONTROLLER").effect("Strength Time")("Slider");
effectiveDist = clamp(strengthDist, 0, maxDist);
timeStart = 0;
timeEnd = 5;
clampedDistance = clamp(distance, effectiveDist, maxDist);
remapTime = linear(clampedDistance, maxDist, effectiveDist, timeStart, timeEnd);
remapTime;

EFFECTS ANGLE

nullPos = thisComp.layer("NULL").transform.position;
objPos = thisLayer.transform.position;
angle = -radiansToDegrees(Math.atan2(objPos[1] - nullPos[1], objPos[0] - nullPos[0])) + 180;

EFFECTS OPACITY:

nullPos = thisComp.layer("NULL").transform.position;
objPos = thisLayer.transform.position;
maxDist = thisComp.layer("CONTROLLER").effect("Max Distance")("Slider");
dist = length(nullPos - objPos);
opacity = 100 * (2 - 2 * clamp(dist / maxDist, 0, 1));

00:00 Intro
00:38 Influence Position
02:40 Motion Array
03:50 Influence Offset
05:26 Influence Time
07:10 Influence Offset
08:38 Influence Effects
11:30 Outro


Watch video Automatic Proximity Reactions in After Effects online without registration, duration hours minute second in high quality. This video was added by user olly 29 October 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 81,597 once and liked it 8.2 thousand people.