Changing from a sunny scene to a snowy one through parameter collection
Another common issue that is seen in game development is that you sometimes want to have multiple materials change at the same time. We've already learned about parameters and how we can change them at runtime using Blueprints, but you have to change each material parameter individually.
Material parameter collections allow us to create special variables that can be referred to in multiple materials and then modified in an editor or at runtime through Blueprints or C++. To see just how easily it can be used, in this recipe, we will show you how we can make multiple materials in an environment so that it looks like it has snowed.
Getting ready...
To begin, you will need to create a material with two states: one state where it's completely dry and another for when it has snowed. You'll connect both states to a Linear Interpolation (Lerp) node. Alternatively, you may use a LayerBlend
like we did in our previous recipe.
Â