Dynamic Wetness Setup For Entire Scene

So I’m experimenting with weather effects and am basically trying to create a world which gets progressively wetter while it rains.

This is what I have so far:

Untitled video - Create and share your videos with Clipchamp

I’ve currently got 2 master materials - 1 for flat outdoor surfaces which have a buildup of water (floor, pavement, curb) and the other for outdoor objects which get wet but don’t have puddles (walls, trash bags etc).

So far I’ve:

  • combined meshes which share the same material
  • created a “DynamicRainObject” blueprint with a single static mesh which creates/assigns a dynamic material instance to this mesh on begin play
  • made events for start/stop raining in this BP which adjust scalar parameters in the dynamic materials over time to progressively build up wetness/puddles.
  • made a manager BP which listens for input and then uses GetAllActorsOfClass to call events on all DynamicRainObject BPs to start/stop the rain

This is okay when it’s a small scene but I imagine this approach would not be performant for a large open world scene, not to mention how much time it will take having to make individual BPs for each unique material which has to be affected by wetness somehow.

I’m just wondering if there’s any better way to accomplish this? For example is there a way to find all instances of a material and create dynamic material instances from them then control the wetness/puddles parameters on all of these instances without having to call an event on each individual BP?

Lastly if there’s any other suggestions at all as to how I might improve the overall look/feel of this scene please do let me know! Many thanks.

(Also credit to Ben Cloward’s YT channel for the ripples effect in the puddles)

Please don’t create Dynamic Materials for every object :sweat_smile:. That’s gonna be a lot of extra Draw Calls.

You’re looking for Material Parameter Collections

You can create a Material Parameter Collection, add a Scalar Parameter called Wetness, then use that parameter in any material to control the wetness.

You can also modify the parameter easily through blueprints.


Also, if you want to control the wetness of individual meshes without being affected by the Wetness parameter from the Collection, you can use Custom Primitive Data. It’s a lot more efficient than using Dynamic Materials.

Here’s a video covering that.

Thank you SO MUCH! Exactly what I was looking for. I knew there had to be a better way :joy:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.