Changing Scalar Parameter of Landscape Material

Hey everyone,

I’m currently working on a project where I need to dynamically update the landscape material during gameplay. As the player makes progress (e.g., through terraforming), the landscape gradually changes color. I’m using a Scalar Parameter as an alpha to blend two textures based on this progress value.

The issue is: The material doesn’t update at all on the landscape


, even though the exact same setup works perfectly on a basic cube mesh.

As shown in the screenshot, I:

  • Get the landscape actor
  • Access its material
  • Create a Dynamic Material Instance from it
  • Set the instance as the new landscape material
  • And finally, update the scalar parameter via a timer function

However, the visual change is never applied to the landscape, while it works fine on static meshes. Any ideas why this might be happening on landscapes specifically?

Welcome @itzToxicGaming

Landscapes in Unreal don’t behave like regular Static Meshes. Instead they are composed of many LandscapeComponents under the hood, each has it’s own material slot.

The “Set Landscape Material” only ever runs in the Construction Script (or in editor‑utility graphs). At runtime it does nothing, so you never actually assign your new Dynamic Material Instance to any of the landscape’s components.

Try something like this instead:

Let me know if that worked.

Hi,

thanks for the reply! I gave it a try but unfortunately couldn’t get it to work properly.

I ended up disabling the Landscape Proxy creation. Now that I’m working with a single Landscape (not split into proxies), the material update finally works as expected.

I might want to revisit the proxy setup at some point, but for now I’m out of ideas on how to update the individual proxies :sweat_smile:

Thanks again!