Fill Any Mesh With "Collision Aware" Spheres - The "Gambion" GeoNodes Setup
How does the setup know if a point is inside or outside the mesh?
It uses a clever dot-product math trick. In the Restrict to inside mesh frame, it compares the direction vector from the point to the nearest surface against the normal of that surface. If the dot product indicates the vectors are pointing in opposite directions, the point is inside the volume. Points outside are immediately deleted.
Why are the spheres overlapping slightly?
The collision detection (handled in Step 3) relies on proximity and raycasting to push vertices away from neighboring sphere centers and the container walls. If you spawn too many spheres (high Count) in a small volume, they will eventually intersect because the mathematical pushing force is overcome by the density of points. Reduce the sphere count or scale down their initial size.
Discover more products like this
winter24 fill collision aware geometry nodes fill mesh sphere fill any mesh gambion wall generator squishy procedural sphere packing