In this lesson, you will learn how to synchronize environmental changes across your entire project using Material Parameter Collections (MPCs).
Why use Global Parameters?
When developing complex scenes, you often need to adjust properties like "wetness," "snow coverage," or "time of day" across hundreds of unique objects simultaneously. Manually updating every material instance is inefficient and prone to error. An MPC acts as a central hub for data that all materials in your scene can reference in real-time.
Creating the Collection
- Create the Asset: Right-click in your Content Browser, go to Materials & Textures, and select Material Parameter Collection.
- Define Parameters: Open the asset and add new scalar or vector parameters. For instance, create a Scalar Parameter named
GlobalWetness. - Link in Materials: Inside your Master Materials, you no longer rely solely on Material Instance parameters. Instead, right-click in the graph and search for Collection Parameter. Select your newly created MPC and the specific parameter (e.g.,
GlobalWetness).
Practical Application
Once the node is in your graph, you can use it to drive a Lerp node. For example, connect GlobalWetness to the Alpha input of a Lerp node that transitions a surface’s Roughness from 0.8 (dry) to 0.1 (wet) and increases the Specular value.
[GlobalWetness (MPC)] --> [Lerp Alpha]
[0.8 (Roughness Dry)] --> [Lerp A]
[0.1 (Roughness Wet)] --> [Lerp B]
[Lerp Result] ----------> [Material Roughness]
Driving Changes via Blueprints
Because these parameters are global, you don’t need to store references to every actor in your scene. Simply use the Set Scalar Parameter Value node in a Blueprint (like your Level Blueprint or a GameMode), targeting your MPC. When you update the value, every object using that parameter updates instantly. This is the most efficient way to achieve visual consistency for dynamic environmental effects, such as transitioning a whole world from sunny to raining, without iterating through your object list.
Key Takeaway: Material Parameter Collections decouple environmental data from individual material instances, allowing for synchronized, scene-wide visual changes with a single value update.