IN THIS ARTICLE
The Decal component enables an entity to project a material onto a mesh. A large number of overlapping decals can be applied to a single mesh.
There are a few limitations with the Decal component:
- While decal textures can be any arbitrary resolution, the decal system only supports up to 5 unique texture resolutions. You can create additional decal textures, but the texture resolution must be one of the 5 sizes already in use.
- All decal materials must specify both a base color and normal map. If any decal material is missing a normal map, then no decals will use a normal map.
- The base color and normal textures must be the same size.
- Opacity in decal materials is only supported in the alpha channel of the base color texture. Although materials in general support opacity in separate textures, this does not appear correctly for decals.
|Attenuation Angle||Controls how much the angle between surface and the decal projection affects the decal opacity. Higher values make the decal more transparent as the angle increases so that the decal doesn’t appear to wrap around the surface.|
|Opacity||Determines how transparent the decal is.|
|Sort Key||Sets the sort order for the decal. When multiple decals are projected onto a surface, decals with higher values display on top.|
|Material||The material that the decal will use.|
Example of a decal with attenuation angle set to 0. Less attenuation means more wrapping around objects.
Example of a decal with attenuation angle set to 1. More attenuation means less wrapping around objects.
The black scorch mark decal has a larger sort key than the orange dirt decal and thus is on top.