Keyframe rotation to create one loop to your taste and apply loopOut("offset") expression.
That would work if you want to loop indefinitely within the composition. But if you wanted to create a looping movie or GIF or something similar you would need to go about it differently.
- Assuming both the front and back of the coin are the same, create your first Y linear rotation keyframe with a value of 90 at frame 0,
- Then create your second ease in rotation keyframe with a value of 0 at 10 frames.
- Then create your third ease out rotation keyframe with a value of 0 at 20 frames.
- Then create your 4th linear keyframe with a value of -90 at 30 frames.
- Set your work area to 29 frames (30 frames minus 1 since frame 30 is essentially a duplicate of frame 0 which you don't want).
- Render the work area.
If your front and back are not the same then you'll have to add a couple more keyframes in there to account for the back side.
Generally speaking, there is no one and only proper way of creating a loop.
One loop for rotating a chip or a coin with different obverse and reverse around one axis can be created with just two keyframes and the expression above. Pauses can be adjusted to taste with Bezier tangents.
Dan Fredley wrote:
Set your work area to 29 frames (30 frames minus 1 since frame 30 is essentially a duplicate of frame 0 which you don't want).
Superb advice. Worth repeating: there is always one frame missing.
This is the mostly easily overlooked part of creating seamless loops.