From: "henry birdseye" Received: from mail-yw1-f43.google.com ([209.85.161.43] verified) by media-motion.tv (CommuniGate Pro SMTP 6.1.0) with ESMTPS id 7492537 for AE-List@media-motion.tv; Wed, 15 Jan 2020 21:18:36 +0100 Received: by mail-yw1-f43.google.com with SMTP id d7so11600538ywl.12 for ; Wed, 15 Jan 2020 12:18:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=Fpd6jflSZuQ1tg5wnSWZnOtQ0Wdq9+Lx6cClotO39ls=; b=UDVvjEJY1AB0pCysgwtTDZMyVFxIWW+n7L/5lmo10IqNA904HsIvZdxfXHDyedKp5m /x2SMxyN7VQ7paZQvzgseu+RwMsiyeT5KoIZ33l5yuAY3DSWjzR3BWm38cTNAXc91AyY 88vAY8tlG3mdWBiIkAgwbyR1R9GCr0JZD7h3D5dVz+/Z+2FRP9S514bJSrK9wUBWWHk9 d8jh73rxngbntK/PdncH1iWgY5TpkUVuRy8tOvgEMjsNovmw+KAsF+3w3x5pNc5uRTOB DOniXAMu1kVfFMGjubIn1Uuv0UgQpZwY+Xv2TpqGkvqW3aiMmEK9jQ5MH4/wZ+hHjU+V 927w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=Fpd6jflSZuQ1tg5wnSWZnOtQ0Wdq9+Lx6cClotO39ls=; b=H6VSoUfgWggAtbL9w0wO5bhvWe7lXKepTND98FnsGZ40EFBpwmHqqAoSWcTUseXE84 f81mzKu31Z7oDjMI6ErA2BpW7wOk6xJG+RBOTEYg40rPdSxkeLqNR3Lh+cOtj5FyELrG HAnvIVcJbU/pqolgA86mJ/CUsC2YNMslnncBA3mQNjRhU5P9qjnpLtr7V7yhEa8WFWFN gUOja6VTdH3lW2xD7bgfZrNVd68TltfY78FRXcZQbH+JPiemawEZb/I6/USgk81UVxwg l8rcieq7m0ZY7dmmNR5EZYsLyb1pSa2rjI+QodjpUXcbwxa0IFEACsAx7H2T97fsKM1A F3pg== X-Gm-Message-State: APjAAAV/odIpQKRD6oGXQLRi6yRh7YqaHgAIsv4fPQpE6f9W0o/iQSjc W74eOELbEKgY6UWwq/TJ8cO1RH77ARA= X-Google-Smtp-Source: APXvYqzqBlGh/7Ok7LK4wVRFw+lHHvZt5RTDq63Zn5kZ4TTeX3i7pBRRZTEiJBvGfueFygAffAaf9g== X-Received: by 2002:a0d:dbd5:: with SMTP id d204mr23273680ywe.22.1579119514632; Wed, 15 Jan 2020 12:18:34 -0800 (PST) Return-Path: Received: from [192.168.1.12] ([24.192.63.173]) by smtp.gmail.com with ESMTPSA id q130sm8763191ywg.52.2020.01.15.12.18.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jan 2020 12:18:34 -0800 (PST) Subject: Re: [AE] Repelling layers To: After Effects Mail List References: Message-ID: <9929f074-b59b-8a7a-7876-6e48161c6e04@gmail.com> Date: Wed, 15 Jan 2020 15:18:30 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------DB4ECC45D12908849B4A8B74" Content-Language: en-US This is a multi-part message in MIME format. --------------DB4ECC45D12908849B4A8B74 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 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=0 > > And here's the .AEP: > https://www.dropbox.com/s/8g3scef520fir3r/MoveAwayExpression_NS_01.aep?dl=0 > > Not fancy but maybe helpful? >  - Nathan > > p = transform.position; > nullPos = thisComp.layer("Parent And Controls").transform.position; > distanceThreshold = thisComp.layer("Parent And > Controls").effect("Distance Threshold")("Slider"); > moveAwayMult = thisComp.layer("Parent And Controls").effect("Move Away > Muliplier")("Slider"); > > distance = length(p, nullPos); > > if (distance < distanceThreshold) { >     distanceMult = (Math.log(distanceThreshold / distance)) * > moveAwayMult; >     delta = nullPos - p; >     nDelta = (normalize(delta)); >     newPos = 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 „physic“ topic … > > > > https://aescripts.com/search/?q=physic > > > > 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=630 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 > > --------------DB4ECC45D12908849B4A8B74 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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 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 = transform.position;
nullPos = thisComp.layer("Parent And Controls").transform.position;
distanceThreshold = thisComp.layer("Parent And Controls").effect("Distance Threshold")("Slider");
moveAwayMult = thisComp.layer("Parent And Controls").effect("Move Away Muliplier")("Slider");

distance = length(p, nullPos);

if (distance < distanceThreshold) {
    distanceMult = (Math.log(distanceThreshold / distance)) * moveAwayMult;
    delta = nullPos - p;
    nDelta = (normalize(delta));
    newPos = 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 „physic“ topic …
>
> https://aescripts.com/search/?q=physic
>
> 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=630 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>
--------------DB4ECC45D12908849B4A8B74--