Categories
Art Breakdown Houdini

Grass Generator Breakdown – Unreal

This blog post will break down the Unreal section of the Grass generator. You will be able to see the construction of the shader used to animate and color the grass meshes created using the Houdini tool. I’ll also talk about the process and some problems I encountered throughout the project. Link to Portfolio Post here.

Shader Overview

All the animation, color, and parting effects were created using the Unreal Material Editor. Material instances are created from a primary shader and values are adjusted until the user is happy. Material instances can also be created within the Houdini tool, so each generated mesh has a new adjustable material.

Graphs

Shader Graph
Material Instance Parameters

Problems Encountered

World Position Offset

A majority of the problems I encountered during the shader creation process came from animating the grass using the World Position Offset within the Shader. The main problem came when trying to animate the wind. I tried several different approaches when it came to animating the wind but settled on running a world space noise texture over the grass. At first the grass was jerking as the noise moved it, but I found a simple fix to that problem by blurring the noise texture in Photoshop.

No Vertex Colors

Nanite is an amazing feature, but it comes with a cost. No Vertex colors. Vertex colors can be used to store a multitude of information, but it’s primary use is that of masks. During testing (without Nanite) I was using Vertex color to mask the wind effect to only the top of the blade. When I enabled Nanite and found this approach was no longer valid I had to find a solution within the shader itself.

I was also planning on using Vertex color to change the color values of each blade. I even developed a system within the Houdini tool to do this, but had to scrap it when I switched to using Nanite.

Scope Creep

This was not a technical problem, but a problem that we have all encountered before when working on a project. The number of features planned for the material jumped from around five to well over twenty throughout the project. Adding more and more functionality to your tool can be important to getting it working properly, but it can also result in going over your time budget. The project was originally budgeted 75 hours but ran over 100 hours with scope creep.

References and Guides

I would not be able to complete this section of the project without help from a bunch of online resources. I made sure not to copy any of the other artists work directly and either changed features or used a different approach from the reference. Including your references is important and I’d like to give a big thank you to the creators who made these guides and artworks!

Using Landscape Color and Offset

Presentation Inspiration and Additional Feature Ideas

Joe Taylor UE5 Grass Material + Breakdown