In part 3 of this tutorial series we will dig into the shader graph to create the vegetation vertex animations and get the leaves moving.
- Create a new project
- Import the file we saved in Part 2: large_elm_tree.fbx into a newly created folder content/models/Large_Elm_Tree
- Place the imported unit into the scene.
- In the Texture Manager, ensure that the leaves base colors and rma materials are all set to DXT5 Compression.
- Create (or use) the content/shaders folder then right click and create a new Empty Material named Vegetation_RMAD.
- Begin by creating the vegetation portion of the material which will control the vertex animation.
- Connect the Vegetation to the Standard Base and construct the color controls. Use a Sample Node for color and the Textcoord0 Node for uv coordinates. Then add Material Variables, Desaturation Node and Multiply Nodes to your graph to control color, saturation and opacity for the leaves.
- Add in some emissive controls to help control underleaf shadows.
- Add in another sample node for the Normal Map, set properties as below.
- Add in another material node for RMAD (Roughness, Metallic, Ambient Occlusion, and Density). Connect the R Channel to Roughness, the G Channel to Metallic, and the B Channel to Ambient Occlusion. Set the RMAD Sample properties as below.
Note: If you are not using a combined RMAD map, you can connect individual samples to the outputs.
- And finally connect the density with an adjustment control using a Material Variable and a Multiply Node.
- Select the Standard Base and set as follows in the property editor.
- In content/models/Large_Elm_Tree select leaf1_material and apply the newly created vegetation shader. Fill the map inputs with the correct textures. Repeat the same process for Leaf2_Material. Adjust material till leaves move as desired.