From: "Teddy Gage" Received: from mail-yk0-f172.google.com ([209.85.160.172] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5526166 for AE-List@media-motion.tv; Wed, 16 Jul 2014 02:14:48 +0200 Received: by mail-yk0-f172.google.com with SMTP id 10so91571ykt.3 for ; Tue, 15 Jul 2014 17:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=c41u2eDp+5iJXoEiY3Pe5nre6lVQseMH6oL3IVsrLcg=; b=VbBN6Vof/6k0LiMQRULeQnsfUnJY79uRzVJB92gZdcvyS5LKCfZWx1sH+jphXdNPft r8P6bpHmFz2mfhVIerhW8i25oDgit9iiEmeiBbdTot4krF7tSCVCVK2rMaYeY4OF/ebh X3LYRz3KFGK6ZDCS4+r7KESs2g5zHWbd1GvOiMTCGY8TcF++3MTPv6ZBwzrxWeRU+os8 uFpn3Ta7Kx6e+dOXlQ3IeJBYO/CAEZcULgME9oLa2F6muvDwJCdYYgL0bz9U6rmdFn30 TzqhJiu2pjxZKIymgIIXt6bcSXqcZN6ZXgMwLmLkIS+KT+n+utsseg34AXg6LdyuHdw6 oypg== X-Received: by 10.236.157.138 with SMTP id o10mr1005487yhk.48.1405469686668; Tue, 15 Jul 2014 17:14:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.170.142.5 with HTTP; Tue, 15 Jul 2014 17:14:06 -0700 (PDT) In-Reply-To: References: Date: Tue, 15 Jul 2014 20:14:06 -0400 Message-ID: Subject: Re: [AE] Applying a slider control to an overall set of keyframes To: After Effects Mail List Content-Type: multipart/alternative; boundary=20cf303ea59a6aa6ad04fe4469ca --20cf303ea59a6aa6ad04fe4469ca Content-Type: text/plain; charset=UTF-8 1. Sadly that doesn't work - Not sure why, but I think it's because that portion of the expression is just defining the 0-100 range of the slider. The "orientation" wiggle has amplitude max of 1, however when that value becomes negative it loops back to 359 degrees instead of -1 degrees (like it would in rotation). This means that in scaling the overall amplitude, it doesn't work as expected. 2. In terms of rotation, the problem is that the 3D camera tracker already generated the wiggle keyframes as orientation values. I'd need a script or something to convert the 3D array of orientation values [x,y,z] into separate linear rotation values [x] [y] [z] and then a separate expression on each axis... On Tue, Jul 15, 2014 at 7:28 PM, Phil Spitler wrote: > Not sure if I understand but I think just changing the 100 to 360 would > work. > > x=linear(slider,0,360,minx,x); > > > > Also, would you be better animating the rotation instead of orientation? > > hope this helps. > > Phil > > > > > *Phil Spitler* | Creative Technologist | *Bonfire Labs* | t : > 415.394.8200 m : 415.571.3139 > > Website | Facebook > | LinkedIn > > > On Jul 15, 2014, at 4:21 PM, Teddy Gage wrote: > > OK sorry to keep bringing this up but I've figured out the problem, even > if I haven't solved it. I think it makes an easier question to ask. > > Here is my current progress, and in fact orientation is more important to > me than position anyway. > > p=transform.orientation; > x=p[0];y=p[1];z=p[2]; > > minx=0;miny=0;minz=0; > > slider=thisComp.layer("CAM CONTROL").effect("CAMERA SHAKE")("Slider"); > x=linear(slider,0,100,minx,x); > y=linear(slider,0,100,miny,y); > z=linear(slider,0,100,minz,z); > [x,y,z] > > So with this expression, 100 is full wiggle, and 0 on the slider is no > wiggle. The problem is that, at 50 on the slider, all of a sudden the > values on a rotational scale of 0-360 are cut in half. So that instead of > wiggling slightly from zero to 359.8, it wiggles from 0 to 179.4 in the > same span of time. This is not useful. The problem is that orientation > loops back from 360 to 0 with the original camera wiggle keyframes values. > > is there a way to translate those 0-100 values from the slider to the > 0-360-0 degrees orientation uses? > > > > On Tue, Jul 15, 2014 at 5:29 PM, Teddy Gage > wrote: > >> It totally works! >> >> Now I'm trying to do the same for orientation. A bit trickier. This is as >> far as I got, but the output values are definitely not scaled versions of >> the original values with this. It jumps by much bigger chunks and flips the >> camera around the axis when this is applied to orientation keyframes. Any >> idea what I'm doing wrong? >> >> p=transform.orientation; >> x=p[0];y=p[1];z=p[2]; >> >> minx=-360;miny=-360;minz=-360; >> >> slider=thisComp.layer("CAM CONTROL").effect("CAMERA SHAKE")("Slider"); >> x=linear(slider,-360,360,minx,x); >> y=linear(slider,-360,360,miny,y); >> z=linear(slider,-360,360,minz,z); >> [x,y,z] >> >> >> >> On Tue, Jul 15, 2014 at 5:14 PM, Zack Lovatt >> wrote: >> >>> That looks as if it'd work! >>> >>> Zack Lovatt >>> 416.786.4129 >>> www.zacklovatt.com >>> >>> >>> On 15 July 2014 17:09, Teddy Gage wrote: >>> >>>> Chris I think so, exactly. Now to translate that expression into 3D >>>> array I would write it like this? Look right? >>>> >>>> p=transform.position; >>>> x=p[0];y=p[1];z=p[2]; >>>> >>>> minx=0;miny=0;minz=0; >>>> >>>> slider=effect("Amount 0-100")("Slider"); >>>> x=linear(slider,0,100,minx,x); >>>> y=linear(slider,0,100,miny,y); >>>> z=linear(slider,0,100,minz,z); >>>> [x,y,z] >>>> >>>> >>>> >>>> On Fri, Jul 11, 2014 at 8:57 PM, Chris Zwar >>>> wrote: >>>> >>>>> Not sure I understand 100%, but it sounds like you would use a slider >>>>> to control the interpolation between the layers actual position, and a >>>>> minimum or maximum amount. So if you have a slider called "Amount 0-100" >>>>> your position expression would be: >>>>> >>>>> p=transform.position; >>>>> x=p[0];y=p[1]; >>>>> >>>>> minx=0;miny=0; >>>>> >>>>> slider=effect("Amount 0-100")("Slider"); >>>>> x=linear(slider,0,100,minx,x); >>>>> y=linear(slider,0,100,miny,y); >>>>> >>>>> [x,y] >>>>> >>>>> >>>>> Is this what you mean? >>>>> >>>>> >>>>> -Chris >>>>> >>>>> >>>>> On 12/07/2014, at 10:07 AM, Teddy Gage >>>>> wrote: >>>>> >>>>> Not even sure this is possible. But say you have an object on a motion >>>>> path with hundreds of keys (not able to be reproduced by expressions). >>>>> Would it be possible to put an expression on a slider linked to those >>>>> keyframes to dynamically control, say, the absolute minimum and maximum >>>>> values the object travels on the x axis? >>>>> >>>>> Sort of like scaling the entire motion path of keys in one or all >>>>> directions, but tying that to a slider, so that when the slider is at 0, >>>>> there is no motion. ie it clamps all values to 0. >>>>> >>>>> There is probably an easier way to do this but I was wondering if this >>>>> it was possible like this. Thanks, >>>>> -TG >>>>> >>>>> -- >>>>> _____________________________ >>>>> VFX & Motion Graphic Artist >>>>> teddygage dot com >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> _____________________________ >>>> VFX & Motion Graphic Artist >>>> teddygage dot com >>>> >>> >>> >> >> >> -- >> _____________________________ >> VFX & Motion Graphic Artist >> teddygage dot com >> > > > > -- > _____________________________ > VFX & Motion Graphic Artist > teddygage dot com > > > -- _____________________________ VFX & Motion Graphic Artist teddygage dot com --20cf303ea59a6aa6ad04fe4469ca Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
1. Sadly that doesn't work - Not sure why, but I think= it's because that portion of the expression is just defining the 0-100= range of the slider. The "orientation" wiggle has amplitude max = of 1, however when that value becomes negative it loops back to 359 degrees= instead of -1 degrees (like it would in rotation). This means that in scal= ing the overall amplitude, it doesn't work as expected.=C2=A0

2. In terms of rotation, the problem is that the 3D camera t= racker already generated the wiggle keyframes as orientation values. I'= d need a script or something to convert the 3D array of orientation values = [x,y,z] into separate linear rotation values [x] [y] [z] and then a separat= e expression on each axis...


On Tue,= Jul 15, 2014 at 7:28 PM, Phil Spitler <AE-List@media-motion.tv&= gt; wrote:
Not sure= if I understand but I think just changing the 100 to 360 would work.
<= br>
x=3Dlinear(slider,0,3= 60,minx,x);


Also, woul= d you be better animating the rotation instead of orientation?
hope this helps.

Phil




Phil Spitler= =C2=A0 |=C2=A0 Creative Technologist =C2=A0 |=C2=A0 Bonfire Labs=C2=A0 |=C2=A0 t : 415.394.8200=C2=A0 m : 415.571.3139

Website | Facebook | <= a href=3D"http://www.linkedin.com/company/235257?trk=3Dtyah" target=3D"_bla= nk">LinkedIn

On Jul 15, 2014, at 4:21 PM, Teddy Gage <AE-List@media-motion.tv>= wrote:

OK sorry to kee= p bringing this up but I've figured out the problem, even if I haven= 9;t solved it. I think it makes an easier question to ask.

Here is my current progress, and in fact orientation is more= important to me than position anyway.

p=3Dtransform.orientation;
x=3Dp[0];y=3D= p[1];z=3Dp[2];

minx=3D0;miny=3D0;minz=3D0;

slider=3DthisComp.layer("CAM CONTROL").effect(&= quot;CAMERA SHAKE")("Slider");
x=3Dlinear(slider,0,100,minx,x);
y=3Dlinear(slider,0,100,min= y,y);
z=3Dlinear(slider,0,100,minz,z);
[x,y,z]

So with this expression, 100 is full wiggle, and 0 o= n the slider is no wiggle. The problem is that, at 50 on the slider, all of= a sudden the values on a rotational scale of 0-360 are cut in half. So tha= t instead of wiggling slightly from zero to 359.8, it wiggles from 0 to 179= .4 in the same span of time. This is not useful. The problem is that orient= ation loops back from 360 to 0 with the original camera wiggle keyframes va= lues.

is there a way to translate those 0-100 values from the= slider to the 0-360-0 degrees orientation uses?

=


On Tue, Jul 1= 5, 2014 at 5:29 PM, Teddy Gage <AE-List@media-motion.tv> wrote:
It totally works!=

Now I'm trying to do the same for orientation. A bi= t trickier. This is as far as I got, but the output values are definitely n= ot scaled versions of the original values with this. It jumps by much bigge= r chunks and flips the camera around the axis when this is applied to orien= tation keyframes. Any idea what I'm doing wrong?

p=3Dtransform.orientation;
x=3Dp[0];y=3Dp[1];= z=3Dp[2];

minx=3D-360;miny=3D-360;minz=3D-360;

slider=3DthisComp.layer("CAM CONTROL").effe= ct("CAMERA SHAKE")("Slider");
x=3Dlinear(slider,-360,360,minx,x);
y=3Dlinear(slider,-360,3= 60,miny,y);
z=3Dlinear(slider,-360,360,minz,z);
[x,y,z]=



<= div class=3D"gmail_quote"> On Tue, Jul 15, 2014 at 5:14 PM, Zack Lovatt <AE-List@media-motion.= tv> wrote:
That looks as if it'd work!



On 15 July 2014 17:09, Teddy Gage <AE-List@media-motion.tv> wrote:
Chris I think so, exactly. Now to translate that expressio= n into 3D array I would write it like this? Look right?

=
x=3Dp[0];y=3Dp[1];z=3Dp[2];

minx=3D0;miny=3D0;minz=3D0;

slider=3Deffect("A= mount 0-100")("Slider");
y=3Dlinear(slider,0,100,miny,y);<= /div>
z=3Dlinear(slider,0,100,minz,z);
[x,y,z]


On Fri, Jul 1= 1, 2014 at 8:57 PM, Chris Zwar <AE-List@media-motion.tv> wrote:
Not sure= I understand 100%, but it sounds like you would use a slider to control th= e interpolation between the layers actual position, and a minimum or maximu= m amount. =C2=A0So if you have a slider called "Amount 0-100" you= r position expression would be:

p=3Dtransform.position;
x=3Dp[0];y=3Dp[1];

minx=3D0;miny=3D0;

slider=3Deffect("Amount 0-100")("Slider");
x=3Dl= inear(slider,0,100,minx,x);
y=3Dlinear(slider,0,100,miny,y);

[x,y]


Is this what you mean?=C2=A0


-Chris


On 12/07/2014, at 10:07 AM, Teddy Gage <AE-List@media-motion.tv= > wrote:

Not even su= re this is possible. But say you have an object on a motion path with hundr= eds of keys (not able to be reproduced by expressions). Would it be possibl= e to put an expression on a slider linked to those keyframes to dynamically= control, say, the absolute minimum and maximum values the object travels o= n the x axis?=C2=A0

Sort of like scaling the entire motion path of keys in one o= r all directions, but tying that to a slider, so that when the slider is at= 0, there is no motion. ie it clamps all values to 0.

There is probably an easier way to do this but I was wondering if this= it was possible like this. Thanks,
-TG

= --
_____________________________=
VFX & Motion Graphic Artist
teddyga= ge dot com




--
_= ____________________________
V= FX & Motion Graphic Artist
teddygage dot com




--
_____________________________
<= font style=3D"background-color:rgb(255,255,255)" color=3D"#6aa84f" size=3D"= 1" face=3D"georgia, serif">VFX & Motion Graphic Artist
teddygage dot com



--
=
_____________________________=
VFX & Motion Graphic Artist
teddygage dot com




--
_= ____________________________
V= FX & Motion Graphic Artist
teddygage dot com
--20cf303ea59a6aa6ad04fe4469ca--