ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

JSON & Animation

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Duane Walters
JSON & Animation
on Mar 6, 2018 at 5:41:22 pm

I've been learning how to use the new JSON capabilities in Ae over this past week and while I believe I've got the linking down, I'm not sure how to animate them now.

For instance: I made a line graph, basically a line with nubs for each of the 12 months, I used the 'points follow nulls' and all that jazz, and it works great, but how can I animate a point up to the number given in my JSON file?

I've included the script (and a screen shot) for my January point. So how can I animate up to the number my JSON file is giving it, like I would if I were just animating the position with keyframes?

Are there any good places to learn tasks like this?

eval("var month=" +footage("LineGraph.json").sourceText);

temp = month[0].Jan;

min = 0;
max = 100;

max_movement = -485;

newBaseline = 769;

myYHeight = ((temp - min) / max) * max_movement + newBaseline;

[value[0], myYHeight]


Return to posts index

Kevin Camp
Re: JSON & Animation
on Mar 6, 2018 at 11:23:09 pm

you could try using linear() or ease() functions...

try changing the last line to this:
myYAnim = linear( time - inPoint, 0, 1, value[1], myYHeight ) ;
[ value[0], myYAnim ]

that should animate the y position from the original y value to the calculated y height over one second starting at the in point of the layer.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Duane Walters
Re: JSON & Animation
on Mar 7, 2018 at 5:46:34 pm

Did not work, but I see where you're going with this, and I'll further inspect. Thanks!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]