Fill object with Random Box packing in Geometry Nodes?

There are different way you can approach this but it’s always a bit challenging…

First you can look into the accumulate field node :

you can also look for tutorials for uneven sized brick wall :

When I searched this a while ago I found that it’s harder to pack in 3 dimensions, 2D is much easier. Therefore you can always put together different slices of 2D packed stuff and that works ok to give a 3D packed feel.

you can see how it looked like there :

I’m sure now this could be done much simpler since there is are bunch of new tools that can help.

Another approach can be based on the UV packing algorithm :


This is obviously a starting point that you need to tweak further…

Another approach is to make tiny boxes and grow them randomly step by step, and stop them once they touch another one…

As for the rigid body simulation, this can give you another kind of results but geo nodes doesn’t comes with a dedicated solution for that actually.

Finally I’d first try to do a cube of packed stuff of the size of your target object and eventually remove everything that is outside of it so it take the shape of the final object.

Anyway, that’s just random thoughts to get the brain started. Since coming up with a fully working solution probably involves hours of trial and errors you’ll probably have to walk that road on your own.

Have fun !

4 Likes