You can try out this Experimental feature, but we do not recommend shipping projects with it.
This feature is Experimental.
Features are sometimes made available in an Experimental state so you can try them out, provide feedback, and see what we are planning. We do not recommend shipping projects with Experimental features. Please keep in mind that we do not guarantee backward compatibility for assets created at the experimental stage, the APIs for these features are subject to change, and we may remove entire Experimental features or specific functionality at our discretion.

Material Layers

We have provided early access to this content in draft form in order to get you up and running. Check back soon for updates!
Material Layering enables you to combine your Materials in a stack, using the new Material Layer and Material Layer Blend assets! This enables you to build the correct Material Graph without building sections of nodes by hand. This functionality is similar to Material Functions, but supports the creation of child instances.

To enable this feature, navigate to the Project Settings > Rendering > Experimental and set Support Material Layers true.



Material Layering is a new way to combine materials in a stack, which builds out the correct material graph without needing to build the node graph by hand. There are two new asset types that we use to do this:

  • Material Layer
  • Material Layer Blends

Functionally, these behave similarly to Material Functions. These new asset types also enable you to create child instances, which you could not do with Material Functions.

Material Layer assets have a default input node which pipes base Material Attributes in from the Material. Material Layer Blend assets have two default input nodes which enable you to access the Material Attributes from layers above and below.



Once you have created a Material Layer and Material Layer Blend asset, you can combine them using a Material Attributes Layers node in a Material. With the node selected, you can add layers and set the assets that each layer and blend should from the node Details panel.



When editing a Material Instance with a parent Material that contains a Material Attribute Layers node, the Material Instance Editor also contains a Layer Parameters tab. Here, you can change the assets used for any of the existing Layers or Blends that have been set. Use the Add (+) button to add additional Layers to the stack as needed. You can also see the parameters contained in each of the Material Layer and Material Layer Blends and override their values individually by entering a new one.


 

Passing Parameters to Layers

There are three main methods at present to do this, most of which apply to Blends and Layers.

  1. Create a parameter within the layer which behaves similarly to existing Materials and Material Functions.

    Parameters added within the layer graphs will be unique to that layer and editable within the layer's section. Even if multiple copies of the same layer are added, each will have its own copy of that parameter to control.
  2. Use the Input pin to the Material Attribute Layers stack.

    This takes another Material Attributes as input which will be piped into every layer added. For example, we could pass a base normal map for the mesh as an input, like so:
        Then within our example Material Layer, we get the Input and blend in:



    Each layer can optionally use or ignore the base stack material attributes input. Currently, this method is not accessible within a blend graph.