Shatter a figure along its own structure
Breaking a rock is a solved problem: scatter seeds, take the cells, done. A figure is not a rock. It is mostly thin parts, and a cell pattern that ignores where those parts are will cut along them rather than between them.
On the left the seams ignore the body. The head is fused to a shoulder in one piece, both legs come away as a single slab, a hand is a detached sliver, and a diagonal cut runs across the torso that no impact would produce. On the right the same twelve cells give a head, a chest, a belly, a pelvis, and two segments per limb, because every cell is centered on material and every seam falls in a gap.
The rule underneath it
A Voronoi cell boundary is the set of points equidistant from two seeds, so where the boundary falls is decided entirely by where the seeds are. Put a seed on each part and the boundaries land in the gaps between parts, because that is where the equidistant points are. Put seeds anywhere else and the boundaries land anywhere else.
That gives a one-line version of the whole technique: a seed is a claim that this piece of material stays together. Everything about how a shatter reads follows from the seed positions, and nothing about it follows from the cell code, which is identical in both halves above.
Sizing the seeds against the parts
The failure only appears when cells are large relative to the parts. Here the limbs are 0.15 across and fourteen uniform seeds give cells around 0.42, nearly three times the limb width, so a boundary crossing an arm has room to leave a shard with no thickness. Push the seed count up until cells are smaller than the limbs and both approaches look similar, at the cost of a great many pieces.
Which is the useful trade to know: seed placement matters most when you want few, large, readable pieces. A thousand-piece disintegration does not need any of this. A body breaking into a dozen recognizable parts needs all of it.
Where to put the seeds
- One per bone, at its midpoint, as a baseline. This alone gets you breaks at the joints, which is where a viewer expects them.
- Two or three along a long bone if you want a limb to snap rather than detach.
- One at the impact point, weighted so its cell is small. The break should be finest where it was struck and coarsest far away.
- Never on a joint. A seed at a joint puts a cell boundary through the middle of the two parts either side, which is the sliver problem again in a smaller costume.
Cut the blended field, not the parts
One thing worth getting right the first time. The figure is built with smin,
so the shoulder is a blend of torso and arm and belongs to neither. If you cut each
part separately and then union the pieces, the blend region is claimed twice and the
pieces overlap there.
float body = figure(p, hero); // the whole blended field
float piece = max(body, gap - edge); // cut THAT
Cutting the finished field means the pieces tile it exactly: every point inside the figure belongs to exactly one cell, so the pieces fit together with no overlap and no hole, whatever the blend did.
Rules of thumb
- Seed placement is the entire look of a shatter. The cell code is the same either way.
- A seed says "this material stays together". Put one on each part you want to survive.
- Never seed a joint. Seed the bones, and the joints become the seams.
- The problem only exists when cells are bigger than the parts, which is exactly the case where you wanted few readable pieces.
- Cut the blended field, not the individual parts, or pieces overlap at every blend.
- The cell boundary is
(F2 − F1)/2. F1 alone gives you blobs, not seams.
One email when something new goes up. No newsletter, no schedule, nothing else.
Double opt-in, so watch for a confirmation email. Unsubscribe any time.