Smart Decals

How To

Smart Decal widget

There is a Smart Decals example map in the Maps directory of Decal Designer.

To get started run the Smart Decals editor utility widget

Navigate to it in the content browser then right click > Run Editor Utility Widget

This widget contains all of the controls you need. You can dock it in the Editor for easy access

Alternatively, once the widget has been run once you can access the widget via the Editor Utility Widgets window

Parameters

When using the Smart Decal widget the following parameters are available for decal control.

Creation

  1. Create New Create a new Smart Decal in the center of your viewport. Pressing this whilst already creating will center the decal in your viewport once again.

  2. Create from selected Create a Smart Decal from a decal actor already placed in the level. The decal material instance must be one authored with Decal Designer. Pressing this whilst already creating will center the decal in your viewport once again.

Create from selected will edit the selected decal actor graph - any other material instances using this graph will be affected. You can prevent user accidental updates by setting "SmartDecalPreventUpdate" to 1 in the material instance. This will block the Smart Decal widget from updating unless overridden

  1. Help Click to open the Smart Decal documentation

  2. Edit Decal Graph Edit the material graph parameters for the active Smart Decal. Changes how the current decal looks. See the graph parameters page for more information

Creation of Smart Decals isn't complete until you press the Apply button. Deleting the actor, pressing Cancel or closing the Unreal Editor will exit the creation process.

Decal Settings

  1. Decal Type Choose which channels your decal should affect e.g. a decal which only affects the Normal channel.

  2. Resolution Set the resolution of the decal. This also affects the scene capture resolution

  3. Quality Use the Quality settings to adjust performance whilst editing. Defaults to Medium for a balance between performance and visual quality. Lower settings reduces the quality of some texture effects such as blurs for faster variants. Be sure to set to High before pressing Apply for the best result.

  4. Capture Always Enables Capture for every frame. This setting is off by default meaning the smart decal will only update if it is moved or if a parameter is changed. Enabling it can be useful if you want to adjust the scene around the decal and have it visually updating every frame. This setting can reduce Editor performance when enabled depending on Resolution and Quality settings.

Scene Mask settings

  1. Preview Mask Previews the scene mask being generated instead of the decal material

  2. Mask Amount Adjust how much the scene mask affects the decal. Note that the scene mask is being blended with A Layer and is affected by A Layer control parameters such as blurring etc.

  3. Global Balance Similar to a brightness control, shifts the midpoint of the scene mask

  4. Global Contrast Adjust the contrast of the scene mask

The following controls have their masks inverted when using negative values. Advanced Scene Mask settings can also be found for each below for fine tuning. These settings can be found by pressing the expand arrow at the bottom of the widget

  1. Normal Mask based on the scene world normal. Similar results to a curvature map.

  2. Direction Mask based on the direction of the scene surface orientation. Defaults to world Up/Down.

  3. Mesh Mask based on mesh face edges. Similar to a wireframe effect.

  4. Depth Mask based on the depth of the decal projection along the projecting axis.

  5. Position Mask based on the world Z position relative to the decal extents.

  6. Shadow Mask based on scene shadows.

  7. BaseColor Mask based on the scene base color value. Useful for masking bright or dark values.

  8. Metallic Mask based on scene metallic values. Useful for only allowing rust to build up on metallic surfaces etc.

  9. Roughness Mask based on scene roughness.

Advanced Scene Mask settings

  1. Normal Thickness Adjust the thickness of the Normal mask curvature result

  2. Normal Threshold Fine tune the angle threshold for Normal masking

  3. Direction Up Down Positive values to mask World Up facing surfaces Negative values to mask World Down facing surfaces

  4. Direction Left Right Positive values to mask right facing surfaces relative to the decal actor Negative values to mask left facing surfaces relative to the decal actor

  5. Direction Front Back Positive values to mask front facing surfaces relative to the decal actor Negative values to mask back facing surfaces relative to the decal actor

  6. Direction Contrast Control the contrast of the Direction mask

  7. Mesh Thickness Adjust the thickness of the Mesh edge mask

  8. Mesh Threshold Fine tune the threshold for mesh edge masking

  9. Mesh Inside Control whether internal mesh edges are masked

  10. Mesh Outside Control whether edges outlining the mesh are masked

  11. Depth Contrast Control the contrast of the Depth mask

  12. Position Contrast Control the contrast of the Position mask

  13. Shadow Contrast Control the contrast of the Shadow mask

  14. Base Color Contrast Control the contrast of the BaseColor mask

  15. Roughness Contrast Control the contrast of the roughness mask

  16. Trace Complex Choose whether the line trace for initial decal placement when Create is pressed is tested on simple or complex collision

Finish your creation

Before a Smart Decal is created you must finish up by pressing the Apply button at the bottom of the Smart Decal widget.

Depending on which creation mode was active, the apply button will perform differently

Create New The Apply button will prompt you for a name and a directory to save your new smart decal.

Once you've entered a unique name and pressed save, a graph and material instance will be created in the content browser. A decal actor will be placed in the world which uses your new smart decal material instance. The graph for your new decal will open so that you can fine tune any of the decal visuals via graph parameters

Create from Selected The Apply button will update the associated graph of the decal you originally selected. The graph for your decal will open so that you can fine tune any of the decal visuals via graph parameters Cancel The cancel button will return the editor to the state before you started creating. If you were creating a new decal it will be removed. If you were creating from selected, the selected decal will be returned to it's original position and graph state.

FAQ

My Smart Decal looks different when I reload the Unreal Editor

The decal just needs a refresh. Open the relevant decal graph instance (you can do this quickly via the right click menu) and touch any setting on the graph. Your decal will now be fixed permanently. There is a bug (reported) where any changes made to graphs via blueprint (which happens while creating via the widget) don't display unless the substance graph instance editor window was opened and a parameter adjusted. As a workaround for now, upon pressing Apply in the Smart Decals widget adjust any setting in the graph window which opens. Can I create Smart Decals at runtime?

Smart Decals were designed for Editor authoring use. The graph when set to 2K resolution can take around 40ms to output textures. The scene capture also has a performance impact. While this latency is realtime and feels responsive for editor use, it's generally prohibitive for console runtime use.

Can I animate Smart Decals in Sequencer?

Technically yes, but they were not designed with this use in mind. The various parameters of the graph can be added as sequencer tracks but unless you are pre-rendering the sequence out as a movie, the latency of outputting the textures is prohibitive to do at runtime on a console as described above.

Can I stop decals from being updated or turned into Smart Decals?

Yes, you can prevent user updates by setting "SmartDecalPreventUpdate" to 1 in the material instance. This will block the Smart Decal widget from updating unless overridden. This is useful when making a kit of modular decals via smart decals and then preventing any further updates.

I want more features! Are there any more planned for Smart Decals?

Yes, here is the current feature list in progress. You can also suggest a feature via this form

How does it work?

See image below for what happens behind the scenes while using the Smart Decal widget. Once editing is complete the decal is once again a regular decal actor.

Last updated