I started playing with a dynamic floor material for a prototype of a game. But I liked the effect so much that I kept working and improving it. Watch the video too see what it's all about.
It's easy to add grid influencers (up to 1024) which is the material parameter collection limit.
The material uses a custom HLSL node though because otherwise I wasn't able to loop through the material parameter collection.
The grid makes use of unreal's mesh instancing systems which makes drawing the cubes a lot more performant then every cube being a separate object.