ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Need to snap translation animation to points on a grid (quantize motion)

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matt Kiefer
Need to snap translation animation to points on a grid (quantize motion)
on Nov 9, 2012 at 3:52:23 am

Hey all,

I've been looking for a way to quantize the motion of an object to discrete steps without much success.

Basically, I have a bunch of objects (mostly curve shapes brought in from Illustrator) that I will need to animate the translation for, but I need each frame of the animation to snap to a 'grid', as it were. Like, imagine if the object was a piece on a checkerboard: when the piece moves it can only move into one square; it can't be straddling the lines between two or more squares.

I can't do this by hand because I'm going to have a LOT of animated elements, and it would just be too much to apply these movements to them all. I'd like to be able to create the animation paths for the objects as normal, and have the objects automatically snap to the grid point nearest their point on the animation path.

I can provide a video showing what I'm looking for more specifically, if need be.

Thanks!


Return to posts index

Dan Ebberts
Re: Need to snap translation animation to points on a grid (quantize motion)
on Nov 9, 2012 at 8:26:46 pm

This expression might help:

hDist = 50;
vDist = 50;
x = Math.floor(value[0]/hDist)*hDist;
y = Math.floor(value[1]/vDist)*vDist;
[x,y]



Return to posts index

Matt Kiefer
Re: Need to snap translation animation to points on a grid (quantize motion)
on Nov 11, 2012 at 7:09:13 am

Ah, so I can set expressions AND keyframe animation on the same object.

Works perfectly. Thanks!


Return to posts index

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