I would like to share information for a not-quite-a-bug issue with Nanite foliage in Unreal Engine 5.1.0 (release) and the workaround that worked for me, so that anyone else with a similar issue might be able to benefit from it.
Issue
Nanite-enabled Foliage with wind/sway (material) effects placed via procedural volumes in UE 5.1.0 may end up “swaying” together with all other foliage in the same procedurally generated volume.
Example video
https://www.youtube.com/watch?v=UD6ydvczpTY
How to replicate
- Install a marketplace asset such as one of the Brushify packs containing foliage or use any in which the foliage utilizes the “World Position Offset” value in a material to create the wind/sway effect.
- Create a large procedural foliage volume and populate with foliage from 1. above.
- Make sure the wind/sway effects have been enabled in the material for the foliage from 1.
- If the material was correctly setup, the foliage will behave as they have done so since Unreal 4.2x → 5.0.3.
- If the foliage “rocks” or seesaws as one large “unit” spanning the procedurally generated volume, then this is the issue detailed above.
Workaround
The workaround I used to fix this effect after updating to UE 5.1.0 was to modify Brushify’s MF_TrunkSway
:
Inside the comment section “Objects Pivot Point”, the TransformPosition
’s Source
value needs to be changed from Local Space
to Instance & Particle Space
.
Note
This “bug” is not unique to Brushify foliage and may affect other foliage assets that implement wind/sway effects using the World Position Offset
input for materials where the pivot point for the sway effect was obtained using Local Space
. This did not appear to be an issue for UE 4.2x → 5.0.x.
Brushify was what I used for my testing and debugging.
I am unsure if this fix is the correct way to go about it, however appears to have done the trick.
Good luck!