A metaball blends field contributions from several centers into one smooth, organic-looking shape. In 3D, merged balls resemble a soft form with continuous borders; the same idea can glue different SDF-based shapes together. section 10.3.3 section 10.0
The common construction averages inverse distances to the centers, then applies an offset controlling thickness. Three points and one offset are enough to produce a complete shape. section 10.3.3
Useful extensions make the technique more expressive and practical:
- Blend metarectangles, metasegments, balls, or other SDFs into one smooth organic form. section 10.3.3
- Replace the unlimited inverse with a quasi-inverse that becomes zero beyond a chosen range, making each metaball local. section 10.3.4
- Gather nearby centers instead of evaluating every distance; neighbor lookup is described as O(log(n)) rather than the O(N) cost of collecting all distances. section 10.3.4
Three-point metaball
Set balls = [(-6, -5), (9, -8), (0, 9)] and offset = -1.25, then compute the normalized sum of inverse point-to-center distances. The resulting contour forms one smooth shape from three inputs. section 10.3.3
balls = [(-6, -5), (9, -8), (0, 9)] #1
offset = -1.25 #2
SDF = (1.
/ sum([1 / distance_p2p(X, Y, ball[0], ball[1]) for ball in balls])
/ len(balls)
+ offset) #3
The listing makes the centers, normalization, inverse-distance accumulation, and thickness offset directly inspectable. section 10.3.3
