Render and Bake Decals Using Surface Probes

Surface Probe is a texture item available in the Shader Tree that sends probe rays in multiple directions from a target surface until it hits a decal surface. Probe rays that hit a decal surface take material and texture values from the decal and apply them to the target surface. Surface Probe textures remove the need for floating decal geometry by directly baking the decal textures and materials on to the target surface.

In this example scene, Surface Probe textures transfer material and texture values from one surface to the other. To bake a decal material on to a target material:

  1. Right-click the target material or material group in the Shader Tree and select Create Surface Probes.
  2. The Create Surface Probes dialog is displayed and the Target Material Group is already selected.

  3. Select the Decal Material Group you want to bake down on to the target material.
  4. New materials are flattened in to a single Shader Tree entry for clarity and copied individually into the Library folder by default.

  5. Existing surface probe textures in the probe group are replaced by new SP textures by default. Disable Place In Library if you want to keep the individual materials in the Shader Tree.
  6. Disable Update Existing Probes if you only want to add new surface probe textures to the existing group.
  7. The Decal Material Group is also probed by default, so that any Properties set in the group are taken into account.

  8. Disable Probe Materials, if you want to ignore the material item from the decal and only transfer textures from the decal material.
  9. All texture effects are rendered to the target material by default.

  10. Enable Only Unique Texture Effects if you only want to bake effects that are unique to the decal and not in the receiving material group. If you're baking the decals, use Preview Bake Mode for the best results.
  11. To get a good result from baking decals down onto a surface, set the Decal Planar operator Offset control to the smallest value possible without the decal intersecting with the target surface.

    An relatively high Offset value of
    100 mm can cause artifacts in the
    baked texture

    A low Offset value of 1 mm sits
    the decal as close as possible
    before baking

    Setting the Offset to a value too
    close to the surface may cause
    parts of the decal to be occluded

    Have a look at Procedurally Project Planar Decals with The Decal Planar MeshOp for more information on setting up decals.

  12. Click OK to transfer the projected textures onto the target textures.

Blending Multiple Decals Together Correctly

The Probe Blend Mode option determines which blending mode is used when the probe rays hit more than one decal surface. Each material in the Shader Tree can have its own blend mode, but material blend defaults to Normal, which means the decal nearest the target renders first and the decal farthest from the target is rendered on top of everything else.

To choose the blend mode:

  1. Select a material in the Shader Tree.

  2. Go to the Properties panel and click the Surface Probe > Probe Blend Mode dropdown.

  3. Select the required blend mode for this material.

  4. As an example, the following image shows floating green and blue diffuse color decal surfaces applied to a red target surface in Normal blend mode. The decal surfaces are positioned one above the other, so the probe rays hit both and blends values between them. The topmost green decal surface renders over the lower blue decal surface and both decals render over the red target surface.

In this example with the same surfaces, but with the Add blend mode, the detected decal surfaces add their diffuse colors together, which renders the cyan color on the target surface.

The following table show the various Probe Blend Modes, with samples to illustrate the effect.

Original Images

A two decal stack with the noise farthest away from the target surface

Blend Mode

Results

Normal

Add

Subtract

Difference

Normal Multiply

Divide

Multiply

Screen

Overlay

Soft Light

Hard Light

Lighten

Darken

Color Dodge

Color Burn