The easiest way to offset layears is to use an expression. You use the index value as a multiplier for one or more layer. For example you could name your first light main light and then put a new light below it. Now add the following experssion to position.
m = thisComp.layer("main light");
x = m;
y = m;
c = index - m.index;
ofst = c * 500;
z = m + ofst;
[x, y, z]
This counts the number of lights below the master, copies the X and Y values and adds 500 pixels times the number of lights to the Z value.
Now just duplicate lights within expressions and they will lineup on the Z axis 500 pixels apart.
Thanks, would there be a way to continuously loop through the animation? As it stands right now, the street lights will move through once and that's it. The end effect I am looking for, like in the GIF I showed above, should repeat these telephone phones infinitely so I can cycle through the animation.
1 person found this helpful
Make a comp long enough for one cycle. Nest that comp in a longer one. Add time remapping, go to the last keyframe, move back one frame and add a new keyframe, delete the last keyframe, then add the expression loopOut() and extend the out point of the nested comp to continue the loop as long as you want.
Hey Rick, I am attempting to work through your solution but I am receiving an error message. I am not sure what I am doing incorrectly - I renamed the comp 'main light' and duplicated an additional comp below it and added the expression. Please see the error below (click the image to enlarge), thanks.
You need to expand the expression panel in the timeline so I can see all the lines. The error is in line 2. I'm suspecting a typo. The second line should read x = m;
My bad. Edit the first line to read