How to create a customizable line/grid of dots in a material

In my game, the units walk in straight lines to the opposite side of the field. I’d like to decorate those paths with light spots on the ground. Since the playing field can vary in size between rounds, manually placing lights isn’t an option. I was thinking a material might do the trick:

However, I’m having trouble aligning the dots properly along the edges of the lanes. I’ve also noticed that the dots are no longer perfectly round.

What I’ve tried:

  • MF_Dots

  • RadialGradientExponential

  • Using Absolute World Position with multiply, frac, etc.

What I want:

  • Dots that span evenly across the floor

  • A way to control the dot count per direction

  • Perfectly circular dots

Any ideas?

This is as close as I can get:

The material feel hacky though. Maybe someone knows a better way:

BlueprintUE

This might help: