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.
Drill down into the MatteMaterial.Create a SLtexture node andconnect its output to the Albedo input of the Microfacet node.- Select the SLtexture node and type 'AlbedoTexture' in the Name text box. This name serves as an id for the RenderGraph.
Drill down into the previous NewRenderGraph.Create a MaterialOverride node andconnect it as in the graph below.- 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.
- Type '$(SAMPLES)\grid.png' in the AlbedoTexture text box.
- 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'.