Nanite Foliage with wind/sway material effects placed via procedural volumes (UE 5.1.0) may seesaw/sway together with all other foliage in the same procedurally generated volume

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

  1. 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.
  2. Create a large procedural foliage volume and populate with foliage from 1. above.
  3. Make sure the wind/sway effects have been enabled in the material for the foliage from 1.
  4. If the material was correctly setup, the foliage will behave as they have done so since Unreal 4.2x → 5.0.3.
  5. 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!

9 Likes

Summary of workaround:

Modify the material’s TransformPosition ’s Source value from Local Space to Instance & Particle Space.

2 Likes

i fixed by finding an objectpivotpoint function and changed the transform from particle source to absolute world space

7 Likes

Nice find, thanks for sharing!

Looks like there are multiple possible causes for these types of foliage problems and they all revolve around changes to how coordinates are returned from base UE 5.1 functions/etc.

[Edit]:
My guess for what may have caused the glitch/bug:
When enabling nanite for foliage any procedurally generated foliage volumes become treated as a single unit, at least for the foliage material. “Local Space” coordinates will then point to the procedurally generated volume itself instead of each individual foliage asset.

thanks… that helped a lot… lost 3 hours trying to fix the rotation function

1 Like

Thank you, I finally solved it

1 Like

Thanks alot m8 for saving me a big headache <3

1 Like

For anyone using Dreamscapes, I was able to fix the issue by going into MF_FoliageWind_Sway and for every ObjectPivotPoint node (there are 2), connecting the Mesh Particle Pivot Location instead of Object Pivot Location. This accomplishes the same thing as Bromar’s fix, without altering engine content.

1 Like