Landscape Grasstype and Ray Traced Shadows on 5.0

I’ve been searching around the forums but i’ve not found too much information about this. So far Ray Traced shadows for foliage can be worked-around by using the Evaluate World Position Offset on the foliage actors but what about procedural foliage? I made a procedural landscape material that uses a lot of meshes to populate the landscape but ive not found a way to make the ray traced shadows work nice with this setup. Would like some light on this one.

1 Like

Based on the little info i found and the UE5 console itself there’s 3 commands that help (and fix lol) with the shadows on instantiated foliage using landscape grasstypes + wind:

r.RayTracing.Geometry.InstancedStaticMeshes.EvaluateWPO 1
Tells the raytracer to use the material world position offset settings. 1 gets all foliage, -1 lets you choose which foliage instances to apply it to. Excessive amounts of WPO evaluation can cause performance issues.

r.RayTracing.Geometry.InstancedStaticMeshes.SimulationCount (n)
Determines the number of unique simulations generated for each foliage instance. Less is better performance, higher numbers get better accuracy. 4 or Less, try for the lowest number possible

r.RayTracing.Geometry.InstancedStaticMeshes.SimulationClusterRadius (n)
This is a distance number, i’m guessing is somewhat similar to other command that was in the nvrtx branch “r.RayTracing.Shadow.MaxBiasForInexactGeometry” (doesnt work btw) used for: How far the WPO self shadow can travel on the foliage as it animates. A good number would depend on how far one moves from geometry base position.

Would be awesome if more people can test this but so far it is good, here’s a video proof showing that it affects the shadows, the foliage on my map is all instantiated meshes via landscape shader + grass types and i also have wind on it.

2 Likes

I’ve been trying to do this with no luck. Enabling r.RayTracing.Geometry.InstancedStaticMeshes.EvaluateWPO 1 doesn’t seem to do anything. Is there anything else that is needed to get this to work?

1 Like

Hi,

Landscape grasstype and RT Shadows still not working in UE 5.1 for me.

Anyone with more luck ?

Cheers,

Greg

2 Likes

You probably need the nvidia RTX branch custom built to get this going.

For most use it is completely worthless. The cost of rendering shadows on grass blades in raytracing grinds a 4090 down to 10fps or less…

Obviously there is a need if you are producing a short or rendeing a still, so it’s not that the funcionality shouldnt exist…

Hi,

Yes, I guess you’re right.

A hybrid solution would be great. Deactivating RT on grass doesn’t make the shadows come back for the moment …

Thanks !

Greg

Downloaded the new 5.1 version of the Branch and still does not work. The RTXGI plugin is not avaliable for 5.1 yet.

a little bit late to the party but this command fixed it
r.RayTracing.Geometry.LandscapeGrass 1

I found the solution because I tried to render the same thing with pathtracer and the grasstype wasn’t visible at all. in the forums though they had a solution which is working also in lit mode. hopefully it works for you as well

4 Likes