FORUMS: list search recent posts

Running a Simple Simulation in AE

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Joseph Francis
Running a Simple Simulation in AE
on Jun 25, 2014 at 7:12:48 am

When I was a kid I used to use high school math and simple laws of force, gravity, mass, acceleration and velocity to simulate a bunch of bodies orbiting in mutual gravitational attraction. The objects would slingshot around and do all kinds of unpredictable things.

Is this possible in After Effects using expressions? It's obviously possible for certain physics engine plugins to do that and far beyond, but they seem to run everything in advance and load every object with key frames at every frame. I think. Is it possible to do something simpler in AE?

For example, I'd like to keep an acceleration vector and at every frame I'd like to use it to update a velocity vector (by adding the two), and then use that to update a position (by adding the two). It just looks like AE doesn't work that way, and I have to be able to express everything as a function of time. I don't want to pre-plan all the functions f(t), I just want it to crank along from state to state where each new state arises from applying a simple set of rules to the current state. Possible?


Return to posts index

Dan Ebberts
Re: Running a Simple Simulation in AE
on Jun 25, 2014 at 8:40:56 am

Expressions have no way to pass any information from one frame to the next, so if your calculation depends on a previous calculation, you need to re-create the previous value, either by setting your calculation up as a function of time, or you can use the brute-force iteration method of starting at frame zero and looping through your calculation until you get to the current frame.

Dan



Return to posts index

Joseph Francis
Re: unning a Simple Simulation in AE
on Jun 25, 2014 at 1:43:53 pm

Is this the sort of thing that could be handled in a script that keeps track of every object's motion and sets key frames for it at every frame?


Return to posts index



Dan Ebberts
Re: unning a Simple Simulation in AE
on Jun 25, 2014 at 4:03:56 pm

That should work. You have the advantage of persistent variables, but the disadvantage of it being not as easy to tweak the parameters.

Dan



Return to posts index

Joseph Francis
Re: unning a Simple Simulation in AE
on Jun 25, 2014 at 4:05:29 pm

thanks


Return to posts index

Filip Vandueren
Re: unning a Simple Simulation in AE
on Jun 27, 2014 at 6:22:43 am

Take a look at Newton:

http://aescripts.com/newton/



Return to posts index


Joseph Francis
Re: unning a Simple Simulation in AE
on Jun 27, 2014 at 6:49:21 am

Newton looks cool, and I'll probably get it, but I'm just trying to understand what I can do with AE itself.


Return to posts index

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