The smooth minimum (smin) blends two SDFs with a controllable rounded join instead of a sharp union
Combining two signed distance fields with plain min(d1, d2) produces a boolean union with a sharp crease where the surfaces meet. The smooth minimum (smin) replaces the discontinuous min with a function that transitions over a controllable blend radius k: within k units of the intersection the two distances are interpolated, so the joined surface reads as a smooth rounded merge. The polynomial form measures how close the two distances are, blends them proportionally, and subtracts a correction term; the result is still (approximately) a valid SDF, so the same shading logic applies. Larger k gives a wider, softer blend; as k approaches 0 the join sharpens back toward plain min(). This is the core operator for building organic, blobby forms — heads and bodies, limbs, metaball-style merges — out of simple primitives. Its boolean siblings (smooth intersection, smooth subtraction) add the same k parameter to the other set operations.
Examples
float smin(float a, float b, float k){
float h = clamp(0.5 + 0.5*(b-a)/k, 0.0, 1.0);
return mix(b, a, h) - k*h*(1.0-h);
}
// blend two spheres into one continuous shape
float d = smin(sdSphere(p-headPos, 0.5), sdSphere(p-bodyPos, 0.3), 0.15);
Assessment
Given two spheres 0.5 units apart blended with smin k=0.3, describe how the surface differs from plain min() and what happens as k approaches 0. Then modify a scene that uses min(d1,d2) for union to use smooth union, and state what visually changes at the boundary.