tag

#decal

8 items (1 guide · 7 fixes)

guides
fixes
26.07.18
"A decal on a character paints bare skin but skips clothing: projection depth must span the shell"

A projected Sandbox.Decal seated on a character's analytic hit surface (e.g. a capsule hit position) with a shallow projection Depth paints the base skin mesh but ends before the clothing renderers' outer shell, so paint shows only where bare skin peeks out. Increase Depth to span the cloth shell without punching through thin limbs.

26.07.15a
"Decal colour is lit surface albedo: pale tints wash out"

A projected Sandbox.Decal renders its colour as lit surface albedo, not an unlit overlay: a pale/pastel tint washes out to a barely-there stain on a bright surface.

26.07.22
"Ground overlays z-fight each other, and a full-lap overlay z-fights itself"

Lifting a flat overlay clear of the ground is only half the rule. Overlays also z-fight each other, and a full-lap overlay on a self-crossing path z-fights itself, which no single lift value can fix.

26.07.18
"Make a Sandbox.Decal follow an animated character by re-pinning it to a bone each frame"

A world-space Sandbox.Decal is fixed in world space, so a splat spawned on a character projects onto empty air the instant they move. Parent the decal under the character, store the hit in a bone's local frame, and re-pin its world transform to that bone every frame so it re-projects onto the moving skinned mesh.

26.07.18
"Projected decals conform to runtime model renderers"

A Sandbox.Decal projects onto runtime-built chunk meshes (ModelRenderers) and conforms to stepped/curved faces, confirmed live on voxel terrain.

26.07.15a
"Sandbox.Decal renders differently on each peer due to random self-seed"

Sandbox.Decal self-seeds with Random.Shared.Int(10000) on enable: a decal spawned identically on two peers renders differently by default.

26.07.18
"Sandbox.Decal scales to thousands: the bound is fill rate, not a hard cap"

Sandbox.Decal instances are lightweight scene objects with no hard engine cap, so a persistent-paint system can hold thousands. The failure mode is a gradual frame-time sag driven by fill-rate/overdraw, never a crash cliff. Bound it with a convar-backed ring buffer and bench for your target hardware.

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