From: "Nathan Shipley" Received: from mail-il1-f179.google.com ([209.85.166.179] verified) by media-motion.tv (CommuniGate Pro SMTP 6.1.0) with ESMTPS id 7492522 for AE-List@media-motion.tv; Wed, 15 Jan 2020 19:15:17 +0100 Received: by mail-il1-f179.google.com with SMTP id v15so15702827iln.0 for ; Wed, 15 Jan 2020 10:15:17 -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=JtDwG718w4eF6k0/2uU2EOYfJJkBZTmG71BdKhsfONE=; b=CzkrLs7I0ii2FYJVcMAoScXsS2vqsvciEsmPc84vPFi0ui26BBtoSEbeb1NVA43Qjp 8BymIDRyyqwOwldaHEpktqqQaWOsyQ0we8wBfn94QN6a9Yge1jgojXwkF2Giq6U1Ymt6 JlGyekO/2tApvkYdF8m90tOs+3jivhGjvvPChUsLuNtsq+x3R8cmiYlOsRZklM4QbzJc zCowXBPeha5WiNG03/tHUTWeo/CvvboyLBLIciUd8ONAKRZEYRgKLi6QZDY0sklMOYSL MeSuxLKjMuhXlECmPrSrxMqI7WUbW5m1EYjtt/zigoz9jK+wpDnOsqP6jqomSafBvgUR T98A== 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=JtDwG718w4eF6k0/2uU2EOYfJJkBZTmG71BdKhsfONE=; b=VaBg+wbDbW3CBUb3CCT5HhzYtYud9sAeI1/FHranL/0squtwx2jxu0Ifixf3HaIhSO D2WTtXqMJ+KQOmDK3N7BFLn/RYhvE8bwiEYc2WC+xkurBKiiBY56q9qeYGyQIrbihCTs w2UDaPK3H5RudT9Pp4+UnLlMgu1jGQR44U1EjryRZpVNwC09IgRYpOPTVY76Vg38pUky YkoCnABENwVPTg+CQ3NrYE4e6E0zZfYY6wsuy7GKvWYg4hCfi0vW4YPxaXWAlmlEjcLz /+zB1B382MzPWI1ucGhgYLKoIFTq4bo0FCyJ0cZsnHJKjI90SnZWp+mknPLjcjZGsxUc aBFQ== X-Gm-Message-State: APjAAAVQnktnAaT8v38iSxk6ROHG4q+vuxTz83PdRgyBjEjPG7gms6Wv XS9LDHeZiYaiqY/1FS7chOopbOWqdvFMaXLedENzdpPv X-Google-Smtp-Source: APXvYqyqsDhFE1KudOAND65KH6CKu0HdbARQLh4UDxh8lGOldGbqpy8YDPlLP+HmjMEExbpRFhnZg8F5nZPe+DeA7Zs= X-Received: by 2002:a92:7509:: with SMTP id q9mr4345273ilc.67.1579112115686; Wed, 15 Jan 2020 10:15:15 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 15 Jan 2020 10:15:04 -0800 Message-ID: Subject: Re: [AE] Repelling layers To: After Effects Mail List Content-Type: multipart/alternative; boundary="000000000000b75481059c31b0cc" --000000000000b75481059c31b0cc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 when they're closer than the "Distance Threshold" control. You can increase the 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("Distanc= e 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)) * moveAwayMul= t; 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 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, o= f > 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 > --000000000000b75481059c31b0cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Henry,

Here's something really basi= c I just whipped up that simply moves layers away from a null.=C2=A0 It jus= t pushes objects=C2=A0away from where the null is when they're closer t= han the "Distance Threshold" control.=C2=A0 You can increase the = amount that they move with "Move Away Multiplier."

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

Her= e's a quick screencapture showing what it does:

And here's the .AEP:
<= a href=3D"https://www.dropbox.com/s/8g3scef520fir3r/MoveAwayExpression_NS_0= 1.aep?dl=3D0" target=3D"_blank">https://www.dropbox.com/s/8g3scef520fir3r/M= oveAwayExpression_NS_01.aep?dl=3D0

Not fan= cy but maybe helpful?
=C2=A0- Nathan

p =3D transform.position;
nullPos =3D thisComp.lay= er("Parent And Controls").transform.position;
distanceThreshol= d =3D thisComp.layer("Parent And Controls").effect("Distance= Threshold")("Slider");
moveAwayMult =3D thisComp.layer(&= quot;Parent And Controls").effect("Move Away Muliplier")(&qu= ot;Slider");

distance =3D length(p, nullPos);

if (distan= ce < distanceThreshold) {
=C2=A0 =C2=A0 distanceMult =3D (Math.log(di= stanceThreshold / distance)) * moveAwayMult;
=C2=A0 =C2=A0 delta =3D nul= lPos - 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:
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 <AE-List@media-motion.tv>= ;:
>>
>> I'm trying to get some layers to be repelled by a passing obje= ct, 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 idea= l for what I need to do.
>>
>> Can anyone help me find a setup I can kind of plug right into. Thi= s, 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>
--000000000000b75481059c31b0cc--