Add a texture to a materialΒΆ

Most of the time you need textures to drive parameters of materials, like albedo color, specular, roughness, bump or displacement, etc.

Let's use a texture to drive the albedo value for the Matte material. This is also done using an MaterialOverride node.

  1. Double-click into the MatteMaterial.
  2. Create a SLtexture node and connect its output to the Albedo input of the Microfacet node.
  3. Select the SLtexture node and type 'AlbedoTexture' in the Name text box. This name serves as an id for the RenderGraph.
  4. Double-click into the previous NewRenderGraph.
  5. Create a MaterialOverride node and connect it as in the graph below.
  6. Select the MaterialOverride node and type 'AlbedoTexture' in the text box and choose Texture in the combo box and click on the Add button of a properties view.
  7. Type '$(SAMPLES)\grid.png' in the AlbedoTexture text box.
  8. Render the image.

The plane is now rendered with the grid texture. A small preview of the texture should should also appear in the MaterialOverride node.

This RenderGraph can be explained like this :

In the branch that selects the plane there is an MaterialOverride node, which set 'AlbedoTexture' value to a valid texture path and in the material used by the plane, the Albedo input used a SLtexture node that has its name set to 'AlbedoTexture'.