decal
A decal pressed onto the surfaces inside the object's box: an image (graffiti, a sign, a poster) or a built-in mark (bullet_hole, crack, rust_streak, water_stain, drips, scorch, chipped_paint, oil, glass_crack, grime, dust, paint: worn painted lines and markings; blood, blood_drop, blood_run, blood_pool: spatter, a drop's stain, a run down a wall, a pool; patch, skid, manhole, drain, gutter, litter, leaves, gum: street wear). It is lit, wet and reflective like what it lies on. It projects along the object's -Z: rotation (-90, 0, 0) lays it on the floor; on a wall turn the object to face out of the wall. Supports atlas tiles, ordered layers, color/normal/roughness channels and angle-faded edges on curved meshes. Scripts spawn them for bullet holes and damage.
In scene text
decal { kind "…" receivers "…" background true }Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.
Fields 21
| Field | Type | Unit / range | What it does |
|---|---|---|---|
kind | text | — | image, or a built-in mark: bullet_hole, crack, rust_streak, water_stain, drips, scorch, chipped_paint, oil, glass_crack, grime, dust, paint (a worn painted marking: parking lines, hazard paint), blood (a spatter of drops; +x the way they flew), blood_drop (one drop's stain), blood_run (running down a wall from the top), blood_pool (a pool; its front creeps out as the box grows); street wear: patch (an asphalt repair patch with a tar-sealed seam), skid (two tyres' skid marks along +x), manhole (a cast-iron cover in its frame), drain (a storm drain grate; +y the kerb side), gutter (silt and litter along a kerb; +y the kerb), litter, leaves, gum (chewing gum trodden into paving), crazing (alligator cracking in a wheel path). |
receivers | text | — | standard |
background | true / false | — | Generated detail (street wear, wall stains): gives way first when more decals are in view than the renderer holds. |
image | text | — | For kind image: a PNG with transparency inside Assets ("Decals/tag.png"). |
normal_image | text | — | |
roughness_image | text | — | |
uv_min | (x, y, z) | — | Atlas tile top-left (u, v, 0), normalized 0...1. |
uv_size | (x, y, z) | — | Atlas tile width and height (u, v, 0), positive and inside the image. |
layer | number | -100000 … 100000 | Lower layers draw first; equal layers keep entity order. |
angle_fade_start | number | 0 … 0.999 | Receiving-normal cosine below which the decal disappears; end must be greater. |
angle_fade_end | number | 0.001 … 1 | Receiving-normal cosine above which the decal is fully visible. |
edge_feather | number | 0 … 0.5 | Extra soft box edge in normalized UV; pixel antialiasing is always on. |
normal_strength | number | 0 … 4 | Strength of the normal-map stamp, composed over the receiving normal. |
color_weight | number | 0 … 1 | 0 keeps the receiving color and metallic for a normal/roughness-only stamp. |
size | (x, y, z) | m | The box: x wide, y tall, z how far it reaches into and out of surfaces. |
color | colour (r, g, b) | — | Tint (white keeps its own colours). |
opacity | number | 0 … 1 | How strongly it shows. |
roughness | number | -1 … 1 | Roughness where it covers; -1 keeps the surface's (wet stains about 0.2, paint 0.5). |
depth | number | 0 … 1 | How much it dents or raises the surface (holes, cracks, thick paint). |
cavity | number | 0 … 0.25 | Image decals: how deep it reaches into the surface, metres; with a roughness_image whose green is the height (1 surface, 0 deepest) the view is traced into it (a torn wall to lath and brick about 0.04). |
seed | number | 0 … 100000 | Variation: another seed gives another hole, crack or stain of the same kind. |