From: "Nathan Shipley" Received: from mail-il1-f178.google.com ([209.85.166.178] verified) by media-motion.tv (CommuniGate Pro SMTP 6.1.0) with ESMTPS id 7492867 for AE-List@media-motion.tv; Wed, 15 Jan 2020 22:22:46 +0100 Received: by mail-il1-f178.google.com with SMTP id x5so16175394ila.6 for ; Wed, 15 Jan 2020 13:22:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KUpKBIq0a7emOrmoF9RSpDnalNHCNpeiUQRw0bvfv2w=; b=m1kflGT1Y2HoRnpiHU4Q3vT93m1VR5N5MpQ4xOg57KtqHKLrYDpGa4Q7E9uUOMWUOH BVK9Eva/GGE0/7xlh5eJcvbuOdA5xSlap92uJ0TQmATeP0wn0+gasXUfpmWX29uPdP62 hA/nB+ivrb1fKprbFH6r7kKaTKT2AKtmosgzF7R+Pe+ybz2LhgK7om3/RD5fWDQemDfH IGfPYjWoI541cFkETEG2VcL4peUK6nArAW5B3PWxfOu65OedTYXgFyvMl2gc9nEFpu4p /I2OC/cIMpEgnZGP1BKSBOply/aLD7wAoZzUzdkIBCSVr0d1q1VF8GKX0ft1wCiR9vDQ sjUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KUpKBIq0a7emOrmoF9RSpDnalNHCNpeiUQRw0bvfv2w=; b=UyHzGMHReKoPJ2BfXYYZSB9CnJSB32FsZg6QUhs5SixOTvYzKK/YQmkoDLckDnd/oX nf2YxdXustO0xBeiaF1rg44j8Cop0FX6U3KmtMuwnlFxRX1hohr8fp76+Zc9yzgLcoHG FDtBu9eamwuL+BJoThyyz+4pV3q3T4RisbKtwRbwfDQclOudrpGNkhfdFzCCOvWr7iwK OtaPOW0kzv3XJiFcEKmTPvkkVla7w+KeO4c1nZWQNKQZJW0egpwsSw67HvS/xf50JjtB W5BbG/B2OSlzYly7yWBWiDBc62/IKBQ2YUAeEup9lClKZlZReb7im/rCanw+WCgscL8F aD0g== X-Gm-Message-State: APjAAAWtXIAKtFDgBVIjH6x4nwp62xahYNvgpdaCbIqVKXfbxgVNQ7nG 8kLnzcMRzne3eZbhi1gmxRoUr0wQOcpy9tBlarZzl6O9 X-Google-Smtp-Source: APXvYqzBKOi3nrok6h0PAfSbjVVYLajL2L6MhKGoMkL33qZDalAUWpl6C3C07GextlLgX76h7PipPP/rcTgEEW5SCAY= X-Received: by 2002:a92:5cc9:: with SMTP id d70mr519880ilg.210.1579123364817; Wed, 15 Jan 2020 13:22:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 15 Jan 2020 13:22:33 -0800 Message-ID: Subject: Re: [AE] Repelling layers To: After Effects Mail List Content-Type: multipart/alternative; boundary="000000000000377080059c344f78" --000000000000377080059c344f78 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey great! Glad you all are finding it useful. Thanks for the kind feedback, - N http://www.nathanshipley.com/ On Wed, Jan 15, 2020 at 12:19 PM henry birdseye wrote: > Nathan! > > That is about the coolest thing I've seen in a while. You win the day. > Thank you. I could roll this into all kinds of things. > > H > > > On 1/15/2020 1:15 PM, Nathan Shipley wrote: > > Henry, > > Here's something really basic I just whipped up that simply moves layers > away from a null. It just pushes objects away from where the null is whe= n > they're closer than the "Distance Threshold" control. You can increase t= he > amount that they move with "Move Away Multiplier." > > Just paste the position expression from one of the solids to your own > layers and it should work or at least be a starting point to tinker > further. Expression pasted below as well: > > Here's a quick screencapture showing what it does: > https://www.dropbox.com/s/97yymslvdmjgeez/MoveAwayDemo_01.mp4?dl=3D0 > > And here's the .AEP: > https://www.dropbox.com/s/8g3scef520fir3r/MoveAwayExpression_NS_01.aep?dl= =3D0 > > Not fancy but maybe helpful? > - Nathan > > p =3D transform.position; > nullPos =3D thisComp.layer("Parent And Controls").transform.position; > distanceThreshold =3D thisComp.layer("Parent And Controls").effect("Dista= nce > Threshold")("Slider"); > moveAwayMult =3D thisComp.layer("Parent And Controls").effect("Move Away > Muliplier")("Slider"); > > distance =3D length(p, nullPos); > > if (distance < distanceThreshold) { > distanceMult =3D (Math.log(distanceThreshold / distance)) * moveAwayM= ult; > delta =3D nullPos - p; > nDelta =3D (normalize(delta)); > newPos =3D p - nDelta * distanceMult; > } else { > p > } > > On Wed, Jan 15, 2020 at 9:13 AM henry birdseye > wrote: > >> This is true. If I had any sort of budget at all this would be ideal. >> >> About a decade ago, ways of doing this abounded on the interwebz... >> those links have since passed on. Character Animator has a physics >> engine I may explore. >> >> >> On 1/15/2020 11:00 AM, Peter Lund wrote: >> > Hi, >> > >> > i gutes you need something like this. >> > >> > https://aescripts.com/newton/ >> > >> > a physic engine that helps you with the repelling and interaction. >> > >> > this is all I found under =E2=80=9Ephysic=E2=80=9C topic =E2=80=A6 >> > >> > https://aescripts.com/search/?q=3Dphysic >> > >> > hope this helps you >> > >> > Peter >> > >> >> Am 15.01.2020 um 14:40 schrieb henry birdseye > >: >> >> >> >> I'm trying to get some layers to be repelled by a passing object, the >> links I've found for how to do this are years old and don't work properl= y. >> >> >> >> Paul Tuersley's project no longer exists at >> http://www.aenhancers.com/viewtopic.php?t=3D630 and that seems ideal for >> what I need to do. >> >> >> >> Can anyone help me find a setup I can kind of plug right into. This, >> of course, came as a last minute client request. >> >> >> >> HB >> >> >> >> >> >> +---End of message---+ >> >> To unsubscribe send any message to >> > >> > +---End of message---+ >> > To unsubscribe send any message to >> >> +---End of message---+ >> To unsubscribe send any message to >> > --000000000000377080059c344f78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey great!=C2=A0 Glad you all are finding it useful.
<= br>
Thanks for the kind feedback,


On Wed, Jan 15, 2020 at 12:19 PM henry birdseye <AE-List@media-motion.tv> wrote= :
=20 =20 =20

Nathan!

That is about the coolest thing I've seen in a while. You win th= e day. Thank you. I could roll this into all kinds of things.

H


On 1/15/2020 1:15 PM, Nathan Shipley wrote:
=20
Henry,

Here's something really basic I just whipped up that simpl= y moves layers away from a null.=C2=A0 It just pushes objects=C2=A0= away from where the null is when they're closer than the "Dis= tance Threshold" control.=C2=A0 You can increase the amount that t= hey move with "Move Away Multiplier."

Just paste the position expression from one of the solids to your own layers and it should work or at least be a starting point to tinker further.=C2=A0 Expression pasted below a= s well:

Here's a quick screencapture showing what it does:

And here's the .AEP:

Not fancy but maybe helpful?
=C2=A0- Nathan

p =3D transform.position;
nullPos =3D thisComp.layer("Parent And Controls").transform.position;
distanceThreshold =3D thisComp.layer("Parent And Controls").effect("Distance Threshold")("Sl= ider");
moveAwayMult =3D thisComp.layer("Parent And Controls").effect("Move Away Muliplier")("S= lider");

distance =3D length(p, nullPos);

if (distance < distanceThreshold) {
=C2=A0 =C2=A0 distanceMult =3D (Math.log(distanceThreshold / di= stance)) * moveAwayMult;
=C2=A0 =C2=A0 delta =3D nullPos - p;
=C2=A0 =C2=A0 nDelta =3D (normalize(delta));
=C2=A0 =C2=A0 newPos =3D p - nDelta * distanceMult;
} else {
=C2=A0 =C2=A0 p
}


On Wed, Jan 15, 2020 at 9:13 AM henry birdseye <AE-List@media-motion.tv> wrote:
This is true. If I had any sort of budget at all this would be ideal.

About a decade ago, ways of doing this abounded on the interwebz...
those links have since passed on. Character Animator has a physics
engine I may explore.


On 1/15/2020 11:00 AM, Peter Lund wrote:
> Hi,
>
> i gutes you need something like this.
>
> https://aescripts.com/newton/
>
> a physic engine that helps you with the repelling and interaction.
>
> this is all I found under =E2=80=9Ephysic=E2=80=9C topic =E2= =80=A6
>
> https://aescripts.com/search/?q=3Dphysic<= br> >
> hope this helps you
>
> Peter
>
>> Am 15.01.2020 um 14:40 schrieb henry birdseye <AE-List@media-motion= .tv>:
>>
>> I'm trying to get some layers to be repelled by a passing object, the links I've found for how to do this are years old and don't work properly.
>>
>> Paul Tuersley's project no longer exists at http://www.aenhancers.com/viewtopic.php?t=3D630 and that seems ideal for what I need to do.
>>
>> Can anyone help me find a setup I can kind of plug right into. This, of course, came as a last minute client request.
>>
>> HB
>>
>>
>> +---End of message---+
>> To unsubscribe send any message to <ae-list-off@media-motion.tv= >
>
> +---End of message---+
> To unsubscribe send any message to <ae-list-off@media-motion.tv= >

+---End of message---+
To unsubscribe send any message to <ae-list-off@media-motion.tv><= br>
--000000000000377080059c344f78--