-
Speedometer for moving objects.
I am working on a large animation that has birds flying across the screen. The birds are at varying distances from the camera causing their perceived speed to be different based on how far away they are; the farther away, the slower they appear to move.
In order to keep the speed of the birds accurate and consistent I created a null object (called “Speedometer”) with a slider control for each bird. I then created null objects for each bird (called “Speed Tracker [#]”) I then copied the the position attribute from the bird to the Speed Tracker but offset it it by one frame so that the speed tracker is always 1 frame behind the bird. I then used the following expression to determine the speed.
point1=thisComp.layer("Speed Tracker 1").transform.position;
point2=thisComp.layer("Body Rig 1").transform.position;delta=sub(point1, point2);
length(delta);
By doing this, I find the distance from where the bird is to where the bird was over the course of 1 frame thus I get a speed of “X Px/Frame”
Now, while this does work effectively, it isn’t exactly efficient and is a bit clumsy. Is there a better way to accomplish this?