Automatic Proximity Reactions in After Effects

Published: 29 October 2024
on channel: olly
231,850
17k

Project file → https://payhip.com/b/Mipc3
Script for proximity effect → https://payhip.com/b/goWXI
All my After Effects scripts → https://payhip.com/b/J5BGL

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

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


On this page of the site you can watch the video online Automatic Proximity Reactions in After Effects with a duration of hours minute second in good quality, which was uploaded by the user olly 29 October 2024, share the link with friends and acquaintances, this video has already been watched 231,850 times on youtube and it was liked by 17 thousand viewers. Enjoy your viewing!