No announcement yet.

Material Expression Landscape Grass - Setting Parameters at Runtime

  • Filter
  • Time
  • Show
Clear All
new posts

    Material Expression Landscape Grass - Setting Parameters at Runtime

    Hi everyone,

    I have an issue currently that I cannot seem to solve. If someone has a suggestion I'd love to hear it. Otherwise it may be a limitation and ideally I'd suggest an addition.

    I have a landscape material which uses the Material Expression Landscape Grass Output.

    That, of course, links to a Landscape Grass Type - an object with several grass varieties inside.

    Each of those grass varieties has its own material instance.

    At runtime (through the level blueprint) I'd like to be able to set scalar parameter values on those material instances.

    For example - I change wind direction at runtime. It impacts things like clothing and flags, etc.
    Unfortunately I have no way of changing the Wind Direction parameter that I added to the Grass materials.

    The result is that flags and clothes are being blown one way by the wind direction component, whereas the grass does not respond to the wind direction component - it has its own 'simulated' wind direction in the material. It stands out and looks bad.

    I added the Wind Direction parameter value to plug into the wind direction component in the level blueprint, but I have no way of calling it.

    I can access to landscape's material instance, but since I use the material expression landscape grass output I cannot then access any of the members of that expression through the landscape's material instance.

    Update: I accomplished this with Material Parameter Collections. Great feature.