I made this with geometry nodes and I was wondering if there is a way to remove some of the sphere instances which are intersecting with each other? Tried to use delete geometry but it doesn't seem to be working.
-
$\begingroup$ Sphere intersections is actually an easy problem, so yes, it can be done… $\endgroup$– Markus von BroadyOct 1 at 21:06
-
1$\begingroup$ But maybe you would want to e.g. clamp the size of the spheres so they are always there but never overlap? 🤔 $\endgroup$– Markus von BroadyOct 1 at 21:32
-
$\begingroup$ @MarkusvonBroady hey man thanks for suggesting but i want the sizes of the spheres to be randomized, just trying to figure out a way to set a minimum distance between the spheres $\endgroup$– xanderOct 2 at 5:41
1 Answer
One reasonable strategy is to use Merge by Distance node. Unfortunately this node moves (averages) positions (and all other attributes) of points, so you need to move them back - but after moving them back they may still overlap! Therefore you need to repeat the process a few times:
With the Merge Still group being:
And for completeness, Suzanne was hexagonized with:
-
1$\begingroup$ thank you so much! this is what i was looking for! $\endgroup$– xanderOct 2 at 13:39
-
$\begingroup$ hey man, just another question! if i would like to switch the spheres to another object instead, how do i plug the value node to the object info node for that object? @MarkusvonBroady $\endgroup$– xanderOct 3 at 18:27
-
$\begingroup$ @xander you could use a "Transform" node, and plug it to the scale of it… Just keep in mind, this solution is only exact for spheres, for any other object it will be an approximation. $\endgroup$ Oct 3 at 19:36
-