Clear-coat shading
IntermediateArtistProgrammer Clear-coat shading uses physically-based rendering to simulate vehicle paint. Real vehicles typically have three layers of paint applied to the body, as in the diagram below: base coat (including optional metal flakes) and clear coat layers. Xenko blends the layers depending on how far the camera is from the material. This reduces visual artifacts caused by the metal flake normal map (which becomes more visible as the camera moves away from the material). material layers:
- -
Add a clear-coat material
Asset View, click Add asset and select Material > PBR material: clear coat. Alternatively, to set clear-coat properties yourself: - Select the material you want to use clear-coat shading.
- Misc properties, next to Clear coat, click (Replace) and choose Clear coat.
Note
Diffuse, Specular and Specular model under the material Shading properties.Properties
Misc > Clear coat. They’re split into three parts: the base paint and optional metal flake properties simulate the base coat, and the clear coat properties simulate the clear coat. The metal flake properties simulate a metallic paint effect. To disable the effect, remove the metal flake normal map.Reduce tiling and artifacts
normalized values (ie between0.0and1.0). For example, in the screenshot below, the left operator uses a value of0.5.1.0might produce tiling artifacts, as in the image below (note the grid pattern):XenkoClearCoatMetalFlakesNM
XenkoClearCoatMetalFlakesNM) are quite large. For this reason, we recommend you: - UV scale factor which tiles the texture (thereby shrinking the flakes)
- Use random texture coordinates, preventing an obvious tiling effect
Note
Use random texture coordinates option is costly, so we don’t recommend you use it for mobile platforms. Alternatively, use a normal map with a higher density of smaller metal flakes.See also
- Material maps
- Material attributes
- Geometry attributes
- Shading attributes
- Misc attributes
- Material layers
- Material slots
- Materials for developers
