Creating Seamless Checkerboard Animation in Blender

Today I've been learning how to make an animation from a checkerboard where the animation starts over after moving two tiles making the animation seem like it loops forever.
I accomplished the animation with a Driver with an expression that restarts the animation after every 100 frames. The tiles are 1 unit each and the checkerboard pattern is two units (traditionally black and white tile). Based on this the expression of the Driver for X location in Blender is:
(frame % 100) * (2 / 100)
This ensures that:
- The checkerboard moves two tiles every 100 frames
- The motion resets perfectly using the modulus operator (%)
- The loop feels infinite, enhancing the illusion of continuous motion
Steps to Create the Effect
- Create a checkerboard with tiles sized 1 unit each
- Assign self-emitting materials to the tiles for a vibrant look
- Add a Driver to the checkerboard’s X location using the expression above
- Create a plane for the background and apply a pixel-art mountain texture
This is how it looks: