# Using custom parent Materials

When generating a new material, **Material Toolkit** creates a **Material Instance** using a **Parent Material** and assigns the generated **albedo, normal, and roughness textures** as inputs.

Material instancing allows you to create a parent Material that serves as a base for creating a variety of different-looking material instances. To achieve this flexibility, Material instancing uses a concept called **inheritance:** the properties of the parent Material are passed to its children. Properties that are designated as **parameters** in the parent Material are exposed to artists in the **Material Instance Editor**. You can find out more about material instancing at Unreal Engine's official documentation:

{% embed url="<https://dev.epicgames.com/documentation/en-us/unreal-engine/creating-and-using-material-instances-in-unreal-engine>" %}

## Default Template Materials

By default, if no template material is selected in Material Toolkit settings, the plugin searches for **Quixel Bridge** plugin and attempts to assign **M\_MS\_Default\_Material** as parent material. In case Bridge is not installed in Unreal Engine, the toolkit assigns a simple material, located in Material Toolkit **Content folder** .

You can find more information about Bridge plugin at Unreal Engine's official documentation:

{% embed url="<https://dev.epicgames.com/documentation/en-us/unreal-engine/quixel-bridge-plugin-for-unreal-engine>" %}

## Custom Template Material

You can create more complex materials and override the template material. Simply select your preferred material in the VPC Material Toolkit settings section and assign the albedo, normal and roughness parameter names

<figure><img src="https://3763251240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9BAa74uZVvvtnO0Rq9Vh%2Fuploads%2Fgit-blob-c4b8c8a4ed1cfb6e736d40a9ada5594f37666e12%2Fmaterial-toolkit-settings.png?alt=media" alt=""><figcaption></figcaption></figure>

### Create a material

* Design a new material, e.g., **M\_MyCustomMaterial**.
* Add **three parameters** of type **TextureSampleParameter2D** to handle albedo, normal, and roughness textures. These parameters are global parameters, so they are visible from the created Material Instance that will be created when importing a new result from VPC

{% embed url="<https://dev.epicgames.com/documentation/en-us/unreal-engine/material-parameter-expressions-in-unreal-engine#texturesampleparameter2d>" %}

<figure><img src="https://3763251240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9BAa74uZVvvtnO0Rq9Vh%2Fuploads%2Fgit-blob-9c50512e6b73ae1dc8f5001ca6c7d9d8f7dc2405%2Fmaterial-params.png?alt=media" alt=""><figcaption></figcaption></figure>

### Define parameter names

* You can name the parameters as you like (e.g., `AlbedoTex`, `NormalTex`, `RoughnessTex`).
* Ensure you provide these names in **Material Toolkit’s custom settings** along with your custom material.

<figure><img src="https://3763251240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9BAa74uZVvvtnO0Rq9Vh%2Fuploads%2Fgit-blob-117d9416020e8a3da533158ad49b6e82d4d1b3ad%2Fcustom-material-settings.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In case you deleted the results, sent a request and forgot to choose your custom material, or want to load a previous request result, don't worry! You can find all your previous results at **`{Project folder}/.vpc/`** or download them again from [vpc-dashboard](https://docs.realtwin.org/virtual-productions-cloud/vpc-dashboard "mention")! Then you can re-import the textures and apply them to the material of your choice.
{% endhint %}
