When a material instance with exposed parameters is applied to a landscape; the parameters set to a new value and then reset to back the default value, the landscape does not respect the new default value and visually update back to the default settings of the material.
The licensee has noted that adding the following code snippet at line 628 of MaterialPropertyHelpers.cpp can mitigate the issue.
```FPropertyChangedEvent OverrideEvent(NULL);
MaterialEditorInstance->PostEditChangeProperty( OverrideEvent );
FEditorSupportDelegates::RedrawAllViewports.Broadcast();
FEditorSupportDelegates::UpdateUI.Broadcast();
```
Additionally, resetting the material parameter by toggling the checkbox next to that parameter value also will bring the landscape to the expected visual state.
1. Create a new material.
2. Add a vector parameter in the material.
3. Connect the top output pin of the vector parameter to the 'BaseColor' input of the material node.
4. Create a new material instance from the previously created material.
5. Create a new 'Open World' level.
6. Apply the previously created material instance to the landscape.
7. Observe the landscape color changing to the color set in the material instance.
8. Enable the checkbox that allows for overriding the vector parameter in the 'Parameter Groups'-> 'Global Vector Parameter Values' section of the details panel of the material instance.
9. Select a new color from the color input box and press the 'OK' button.
10. Observe the landscape color changing to the color set in the color input box.
11. Set the color input box to its default value by pressing the reset arrow to the right of the color input box.
12. Observe the color input box change to the default value set in the parent material.
13. Observe the landscape retaining the previously set color.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-254566 in the post.
1 |
Component | UE - Rendering Architecture - Materials |
---|---|
Affects Versions | 5.6, 5.5 |
Target Fix | 5.7 |
Created | Mar 10, 2025 |
---|---|
Updated | Mar 13, 2025 |