Cubic dancer

After the inspiration of this video I am now trying to stylize an animated figure with blocks. The first (naive) attempt to realize this with our beloved standard cube and 3 array modifiers and a boolean modifier runs into various problems. On the one hand the boolean operator for the 150.000 cubes takes a long time. On the other hand the result is unsatisfactory, because no complete cubes are displayed.

The optimum would be an algorithm that checks if a coordinate is inside the object and in this case places a cube.

What would be a good approach here - animation nodes, geometry nodes or is there another clever idea?

That should be easy with particles, quick example:
particle_cubes.blend (144.5 KB)

For a static object, this works really well. But now the dancer is supposed to dance. And so I have a changed geometry with each frame.

I have now come up with a solution that works:

(1) The dancer is prepared with a remesh modifier (mode blocks).

remesh to cubes

(2) Via geometry nodes cube instances are distributed and scaled down.

I have taken the procedure from a tutorial and adapted it. Of course, no randomize is required for the process. But somehow I didn’t manage to shrink the cubes any other way. (I must urgently deal intensively with the geometry nodes…)

This is the result so far: