What a crowd actually costs
In a sprite renderer, drawing eighteen of something costs eighteen draws and the background is free. In a distance field there is no such thing as instancing: the scene is one function, so every pixel on screen evaluates every figure, including all the pixels nowhere near any of them.
The left half is uniformly hot because it is uniformly expensive. A pixel in an empty corner runs all eighteen bodies, 108 primitives and 72 blends, and produces background. The right half only pays near an actual figure.
The arithmetic is brutal and worth doing before you build
cost = primitives_per_figure
x figures
x pixels
// COARSE figure: 7 x 18 x (1920x1080) = about 261 million
// FULL figure: 20 x 18 x (1920x1080) = about 746 million
// ...primitive evaluations per frame, for eighteen small characters
Those two lines are the whole argument for a level of detail system, and they are the same figure. The full one has an elbow, a knee, hands and feet, and at this size not one of them covers a pixel. The crowd above uses the coarse form, which is this note's own last rule of thumb applied to this note's own demo.
That is why crowds are the thing that kills a field-based scene, and it happens suddenly. One figure is nothing. Six is fine. Somewhere past that the frame time goes off a cliff, because the cost is multiplicative in a way sprite rendering is not.
The bound has to stay conservative
Skipping a figure is only legal if you still return a valid lower bound for
the distance, or everything downstream breaks: glow width, outlines, and any march
that reads the field. The distance to the figure's bounding circle, minus its radius,
is such a bound and costs one length.
The bound must also cover the blend radius, not just the geometry. A figure built with
smin influences the field slightly beyond its own primitives, and a bound
drawn tight to the geometry clips the fillet in a way that is visible as a hard edge.
What still does not scale
Being straight about the limit: the early-out buys you the empty space, which is most of the frame, and that is a large win. It does not help where the crowd is dense, which is exactly where you wanted the crowd. Twenty figures packed into one corner still costs twenty evaluations per pixel in that corner.
Past that point the honest answers stop being field tricks: render the crowd to a texture once and reuse it, use a coarser figure for distant members, or accept that a real crowd is a sprite problem and a field is the wrong tool for it. A hero rendered as a field and a crowd rendered as sprites is a perfectly respectable architecture.
Rules of thumb
- Cost is primitives times figures times pixels. Nothing is free in a field.
- Bound every figure and skip early. It buys the empty space, which is most of the frame.
- The bound must include the blend radius or it clips the fillet.
- Early-outs pay off through whole warps skipping together, so scattered beats evenly spread.
- Dense crowds do not benefit. At that point use sprites and keep the field for the hero.
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.