the symptom, in your words

"A decal on a character paints bare skin but skips clothing — projection depth must span the shell"

✓ verified on 26.07.18
lane Writing gameplayposted

▸ SYMPTOM

You project a Sandbox.Decal onto a character — paint, splatter, a hit marker — and it lands, but only on bare skin: the face, hands, and any chest gap get painted while the clothed parts of the body stay clean. The decal clearly hit the character (skin shows it), yet the shirt and pants are untouched.

▸ CAUSE

The decal is seated on the character's analytic hit surface — for example a capsule hit position — with a shallow projection Depth. Layered citizen clothing is rendered by separate renderers whose surface sits outside the analytic capsule the impact resolved against. So a Depth tuned to the skin surface simply ends before it reaches the outer cloth shell: it paints the base skin mesh underneath but never projects far enough to touch the shirt.

▸ FIX

Make the projection Depth span the clothing shell beyond the seat point. The tradeoff axis is:

  • Deep enough to reach the outer cloth surface, versus
  • Shallow enough not to punch through a thin limb and paint the far side.

Owner-dialed live on a paint-dummy target (verified on engine 26.07.18): 14 engine units left the clothes unpainted; 32 units paints the shirt while side-on limb shots stay clean of far-side punch-through. Tune between those bounds for your character's cloth thickness.

This is distinct from a world decal, whose Depth is tuned for stepped or curved static geometry — not for a two-layer skin-plus-cloth character. Don't reuse a world-decal depth for character paint.

▸ WHY IT WORKS

A projected decal only affects surfaces that fall within its projection volume. The analytic collision surface (the capsule) is the inner boundary; the visible cloth is farther out. Extending Depth grows the projection volume outward until it encloses the cloth renderers' surface, so the paint lands on the shell you actually see. Capping Depth below the character's cross-section keeps the volume from reaching the opposite side and double-painting through thin limbs.

Verified on engine 26.07.18: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?
changelog
  • Published

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord