PDA

View Full Version : A Simple Motion Problem?


Avarice
01-12-2008, 06:38 PM
My After Effects CS3 seems to ignore the most basic rules of mathematics. I need to create a smooth motion of an object with 100px/s in a 25fps composition. I's a linear motion without any variations. But somehow the calculation always gets wrong.

Example:
Setting up two position-keyframes with, let's say, "3000" and "3016" and three frames in between always creates values like "3004,0002", "3007,9996" or "3012,0008" instead of 3004, 3008 and 3012.

Some rounding can't be that hard. But even between two position-keyframes with "0" and "8" I always get something like "4,0006". I don't get it – This doesn't make any sense to me at all.

Thanks for your help!

Mylenium
01-12-2008, 08:53 PM
My After Effects CS3 seems to ignore the most basic rules of mathematics.

No, it doesn't. AE's default interpolation is Bčzier and for that the values seem correct. Only linear interpolation will give linear values. You are also completely ignoring the fact that AE's calculations are based on subpixel precision, not quantized full pixels. Because of that even with linear interpolation you do not get quantized values for non-perpendicular motions. That would only be the case if the temporal sample point (the entry point of the current frame) would accidentally coincide with the spatial grid of the full pixel raster, which rarely is the case. If for some reason you are dependent on full pixel motion, simply apply a rounding expression Math.round(value).

Some rounding can't be that hard.

Nonsense. AE is a compositing program, not a game engine. As per the above, this line of thinking makes absolutely no sense and would defeat the purpose. And no, this is no different in other programs, they just hide it from the user by clipping the values on the UI.

Mylenium

graymachine
01-13-2008, 04:12 PM
It sounds to me that you are trying to manually animate values that would be achieved automatically with roving keyframes.

CGTalk Moderation
01-13-2008, 04:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.