I created this setup that does a random distribution of points and relaxes them so that the distance between them tends towards a given distance:
I rely on Index of Nearest node, that gets closest point in a set of points. But I want to improve the setup so that spheres will have random diameter. In that case, Index of Nearest is not suitable for that.
Here is the node setup:
My goal is to make a node group that can distribute random objects over a given surface without (noticeable) intersections. As you see, distributing spheres is easy, so I want to make the next step and pack spheres with random diameters. I should say, that diameters should be given before distribution, overwise it is easy to set random points and setup diameters so that whey will not intersect.
Another approach that I've tried is using Pack UV islands node:
It works pretty well, but has some issues, though. One of them I've already posted here: How to search by attribute?
Another issue is that Pack UV islands works by using bounding boxes, more precise algorithms are presented in Blender, but not in the Geometry nodes. Also, the limit of Pack UV islands is that it works in 2D space and only in square, so that it limits the application of this method










