Foliage Wind creating weird shadows on top of mesh

Hey guys, how are you all doing? I’m getting a very weird result when trying to activate the wind feature on a plant I got from Megascans. For some bizarre reason the shadows on top of it keeps panning. Deactivating the directional light fixes it, and it doesn’t happen on the model panel, only in scene. Have you guys ever seen this?


Static meshes need to be set to evaluate WPO to work with raytraced shadows. Search the actor properties for it.

3 Likes

Oh wow, thank you so much, Arkiras, that worked perfectly for the static mesh. However, in case I need to instance it with the foliage system, how can I fix that?

Ok, I found a pretty nifty way to overcome this

instad of using static mesh foliage, I tried it on actor foliage and it worked with ray-tracing

Use actor foliage instead of static mesh foliage:

1.Make a new blueprint class that inherits from static mesh actor
2.Turn evaluate world position offset on in the static mesh component, set the mesh to your desired mesh
3.Create an Actor Foliage class that uses your new class as its base class
4.Use the actor foliage with the foliage tool

Just leaving this here in case someone stumble across the same issue as me

*courtesy of Arkiras:

2 Likes

Thank You!

Dont work with UE5

1 Like

Did you find a fix to the issue?

I followed the fix step by step and it worked fine for me in unreal 5.2.

Hey, just so you know, if you’re using UE5.0(?) or higher you should be able to just run the following command to enable WPO evaluation for foliage: r.RayTracing.Geometry.InstancedStaticMeshes.EvaluateWPO 1

This should work without the need to go through the old workaround of creating actor foliage

1 Like

This worked for me as well, but it also disables the wind effect. The CVARS in the post does not do anything in my case.

Is there any clever fixes as of Unreal 5.4?

Just Set the “Evaluate World Position Offset in Ray Tracing” to 1 in your static mesh, worked fine for me in UE5.4

For anyone still struggling with this issue even after the WPO fix in UE5+, check if Nanite Support is still enabled on the meshes. Disable it, apply the WPO fixes and you’re good to go.

Hey guys, no luck for me, tried all the fixes from this thread - at least those I could understand.
I am using the Tropical Jungle Pack, and the only way I can make the foliage look normal, is by doing the evaluate WPO fix but that disables the wind totally. All the combinations with turning off nanite etc. do not help.
Plus, I am using Lumen if that makes any difference.

Can anyone help?

Using the command r.RayTracing.Geometry.InstancedStaticMeshes.EvaluateWPO 1 makes the issue disappear right in front of the camera, but after like 2 meters the weird shadows keep existing.

Update: Disabling Nanite on a plant mesh with a custom wind animation fixed the issue, you could also try to use the Relative Error on nanite meshes with Value 0