From: "Chris Zwar" Received: from mail-pj1-f53.google.com ([209.85.216.53] verified) by media-motion.tv (CommuniGate Pro SMTP 6.1.0) with ESMTPS id 7492903 for AE-List@media-motion.tv; Thu, 16 Jan 2020 00:41:06 +0100 Received: by mail-pj1-f53.google.com with SMTP id s7so669672pjc.0 for ; Wed, 15 Jan 2020 15:41:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chriszwar-com.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=5KL7ukIcXWcgmoRwTWg1FaITLDC8GYDvRS+ItcKfNHY=; b=Yiel7CVhEwv4Z89QUAdtDBtmEXD673aZso3TA06y8ejDiIMZ8I88FaZE2XcO1lnFIT qbId6zvilwwEFYIYrxKVQ9oUWTlBIHTZguZGi2X0I5XoIWWxqbUVsGY+14JYhqaRG5t0 VdqM9WzP2qiD0fc/+zuD0F6cyWQo0frb+j16gyLoVeJ1tIFiS1PH3u1CTiVVqw7zENGB 4pe9dDgpudEI65P4MRTo6MPnQqdFz7YqVanaDETSCb8WLC/z2DY+Bucfd2tQ8dvRJgV9 cw4/ZMEDbaNOa9Y/jL8dKmDj1bQ9DR4xxsixWO/11VhBfEfYNUP0z08FZ2w5k7k3HdVG nUxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=5KL7ukIcXWcgmoRwTWg1FaITLDC8GYDvRS+ItcKfNHY=; b=NcoGtrGnWyfGhsOnjlg1Paqfc3htWnz3y8rkSsk/iKOn2qm4DgfAoxnlX92uQc0Oid dLCXZSZHcDb86vv6V1AisM1u6lZtHCmFDsg13OEIGAWMxSkvuFxY2bWImPBkXVue/O5a MPCbAy9sNLXuoDSL0MrKwFkJp+gwz9WBi+RIIUEswY69aIi0KAkjAHNoAf+Za5J/NofR 2GhGrl/xwSDPRj5s9m7IWerAXVXvRRd7+aodpMrvnh2XA4HQ0nF6fGSDoKu59KXTCa5q AXZydhLAkxD6m8eHtS9D0AY4mOsxmYKN+LE/mhTQx81MhPSrzm1co2pnlhPcgEuBTlCW m3jQ== X-Gm-Message-State: APjAAAUGAgngmJiurBkLK/H5nO4HUfPfvWMIr22uOw8+C/k30u2aXzGA eHTcZ+derVJs8kqhj3HfZ4WyNtDh3F4= X-Google-Smtp-Source: APXvYqyACQ/urY1OctGEaHyRBXhRuSnva95+1rZog+5SHwPq/HQipouCUGb5j5m3Oo8W3Zb82g12zw== X-Received: by 2002:a17:902:9882:: with SMTP id s2mr35109545plp.156.1579131663491; Wed, 15 Jan 2020 15:41:03 -0800 (PST) Return-Path: Received: from [192.168.1.141] ([210.8.181.146]) by smtp.gmail.com with ESMTPSA id c17sm22488470pfi.104.2020.01.15.15.41.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jan 2020 15:41:03 -0800 (PST) Content-Type: multipart/alternative; boundary="Apple-Mail=_8FF3DE64-F55C-4E1B-BBDD-D388FBA1F049" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [AE] Repelling layers Date: Thu, 16 Jan 2020 10:40:59 +1100 References: To: After Effects Mail List In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.9.1) --Apple-Mail=_8FF3DE64-F55C-4E1B-BBDD-D388FBA1F049 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Sounds like Nathan=E2=80=99s got it sorted, but I think there=E2=80=99s = a bunch of code to do this on Dan Ebbert=E2=80=99s site. Just need to = sift through the sections and find them! http://motionscript.com/design-guide/collision.html = http://motionscript.com/design-guide/toc.html = http://motionscript.com/design-guide/proximity.html = -Chris > On 16 Jan 2020, at 8:22 am, Nathan Shipley = wrote: >=20 > Hey great! Glad you all are finding it useful. >=20 > Thanks for the kind feedback, >=20 > - N > http://www.nathanshipley.com/ >=20 > 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. >=20 > H >=20 >=20 > On 1/15/2020 1:15 PM, Nathan Shipley wrote: >> Henry, >>=20 >> 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." >>=20 >> 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: >>=20 >> Here's a quick screencapture showing what it does: >> https://www.dropbox.com/s/97yymslvdmjgeez/MoveAwayDemo_01.mp4?dl=3D0 = >>=20 >> And here's the .AEP: >> = https://www.dropbox.com/s/8g3scef520fir3r/MoveAwayExpression_NS_01.aep?dl=3D= 0 = >>=20 >> Not fancy but maybe helpful? >> - Nathan >>=20 >> p =3D transform.position; >> nullPos =3D thisComp.layer("Parent And Controls").transform.position; >> distanceThreshold =3D thisComp.layer("Parent And = Controls").effect("Distance Threshold")("Slider"); >> moveAwayMult =3D thisComp.layer("Parent And Controls").effect("Move = Away Muliplier")("Slider"); >>=20 >> distance =3D length(p, nullPos); >>=20 >> if (distance < distanceThreshold) { >> distanceMult =3D (Math.log(distanceThreshold / distance)) * = moveAwayMult; >> delta =3D nullPos - p; >> nDelta =3D (normalize(delta)); >> newPos =3D p - nDelta * distanceMult; >> } else { >> p >> } >>=20 >> 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. >>=20 >> About a decade ago, ways of doing this abounded on the interwebz...=20= >> those links have since passed on. Character Animator has a physics=20 >> engine I may explore. >>=20 >>=20 >> 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, 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 > >>=20 >> +---End of message---+ >> To unsubscribe send any message to > --Apple-Mail=_8FF3DE64-F55C-4E1B-BBDD-D388FBA1F049 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Sounds like Nathan=E2=80=99s got it sorted, but I think = there=E2=80=99s a bunch of code to do this on Dan Ebbert=E2=80=99s site. = Just need to sift through the sections and find them!




-Chris

On 16 Jan 2020, at 8:22 am, Nathan Shipley <AE-List@media-motion.tv> wrote:

Hey great!  Glad you all are finding it useful.

Thanks for the kind = feedback,

- = N
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 the 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 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:

And here's the .AEP:

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("Distance 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)) * moveAwayMult;
    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 <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
>
> 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>

= --Apple-Mail=_8FF3DE64-F55C-4E1B-BBDD-D388FBA1F049--