When a material with WPO effects and MaxWorldPositionOffsetDisplacement is applied to a foliage mesh, foliage applied to a map will no longer work as expected with density scaling, especially after the map is reloaded.
Steps to Reproduce
Repro steps in stock UE5.4.3 editor:
1. Create a new open world map
2. Create a new static mesh foliage type asset
3. Assign a static mesh to the foliage type asset
4. Create a new material that uses World Position Offset to some degree (for example just pass DebugTimeSine*100 to WorldPositionOffset.Z)
5. Assign this material to the foliage type as material override (or to the SM asset directly, does not matter)
6. Enable Density Scaling on the foliage type asset
7. Paint some foliage using the foliage type asset and exit foliage painting mode
8. Enter console command: "foliage.DensityScale 0.2". Observe that your visible foliage instances are reduced by ~80%
9. Now open the material you created earlier, and set value of MaxWorldPositionOffsetDisplacement to 100
10. Observe that even though you have 0.2 density scale, all of the foliage instances becomes visible.
11. You can now save the map and everything else, and long as you have foliage.DensityScale set to < 1 before re-opening the map, you will continue to observe density scaling not being respected on map load.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-222872 in the post.
1 |
Component | UE - World Creation - Worldbuilding Tools - Foliage |
---|---|
Affects Versions | 5.4 |
Target Fix | 5.6 |
Created | Aug 29, 2024 |
---|---|
Updated | Oct 11, 2024 |