Ray Traced Shadows With World Position Offset on Instanced Static Mesh or Foliage

WorldPositionOffset works for great Ray Traced Shadows/Reflections on a static mesh. (Have to check Evaluate World Position Offset in mesh rendering section).

However, using the mesh in an Instanced Static Mesh or as Foliage breaks it shadows and reflections.

This is critical for foliage that uses wind among other effects.

Much thanks for any feedback / help with this

This needs to be fixed/reworked. The WPO evaluation check should be moved inside the actual mesh or material properties, not on the placed mesh.

I just spent 2 hours trying to figure out why my grass looks weird and shadow doesnt register WPO… All because of 1 checkbox…

1 Like

Agreed its difficult to find… but more importantly, it doesnt work with instanced static meshes, hierarchical ISMs, or foliage at all…



Is this a bug or have they just not implemented it properly yet? I’ve been messing around with it thinking I must be doing something wrong as shadows are there with wind in the preview but static in my scene. Or is the only option CSM…which seems to have other problems with foliage.

Yes, this one is also driving me nuts. Really needs to be a setting inside the actual mesh and turned on by default when ray tracing is enabled. Really needed this to work for ray traced shadows in my scene, now I have to revert back to shadow maps. :confused: Is this fixed in 4.27?

I doubt this will be changed (at least not until they add a raytracing LOD bias), I assume it was intentionally set up this way because it costs a lot to evaluate WPO for raytracing.

Doesn’t the nvidia raytracing branch actually do this?
I was under the impression it did (based on the post of the nvidia employee that posts on here some times).

Going deeper into this topic I found out that r.RayTracing.Geometry.InstancedStaticMeshes.EvaluateWPO 1 solves the problem, at least partially. In my cases in fact it makes raytraced shadows react to WPO, but the shadows are misplaced, like a lot!
Take a look at my example, have anyone found a way to fix a similar problem?

Animated video showing my case:


Ok, I found out what was wrong, at least in my case. Command (…).EvaluateWPO works fine, shadows are shifted because the environment level was on a sub-level which was offset in Level Options. After I zeroed sub-levels offset, raytraced shadows of objects that evaluate WPO offset jumped back to the proper place. It seems like a bug to me, I think that evaluating WP) should include sub-level offset.

About evaluating WPO in general, there are checkboxes, both in static mesh components and in foliage.

In the case of the static mesh component, all you need to do is just check the Evaluate World Position Offset checkbox.

In the case of foliage, you need to change editor mode to Foliage, select all foliage instances and look for Evaluate World Position Offset checkbox and check it.

Unfortunately selecting Evaluate World Position Offset for Foliage does nothing to fix the issue. There is a video by William Faucher explaining how to work around that using Blueprints.

This workaround causes performance issues but at least my foliage looks acceptable.

This is definitely a problem using grass, bushes or any other foliage with wind animations. I’m surprised it stayed like this all the way to 5.0EA. Hopefully it will be fixed in UE5 release.


Unfortunately, foliage actor is not supported in UE5 yet, so this video is not fixing the issue in UE5.
Please share if you know how to use foliage actors in UE5.
Thank you.

1 Like

Any news on this? Been having this issue along other ones as I describe in this topic

Hello there! Been working in Unreal 5.1 on dense Nanite Grassfields, Virtual Textures & Ray traced Shadows on so I got acquainted with the same issue. Any better solutions than this & Faucher’s Workaround?

Unlikely if you are using any beta/alpha feature at all.

Lumen/nanite etc. Nothing in 5.1 would proabbly allow for this (particularly since something like 5.2 or 5.3 was released?)

The checkbox for the grass assets WPO should theorethically be either on the mesh itslef, or on the grass definition (where you add the mesh and set the density/distance for it).

Anyone has come for a workaround in UE5.3?