Grass is Raytraced by default in 4.26 resulting in huge performance drop

Hi Joe!

Yeah, lot of people reporting performance drops on 4.26. I usually advise all people to send a bug report, so maybe they raise its priority: Unreal Engine Community

About ray traced grass, have you tried disabling RT for instanced meshes through command line?

Best regards!

A bug report is already submitted, and as was already discussed on this thread unfortunately the workaround you suggested doesn’t work, it disables raytracing on all meshes, not just the grass.
This bug is caused by a fundamental change in 4.26 to the way the engine handles grass and raytracing.

Hi Joe and everone else I tried the brushify grass with the dlss plugin from Nvidia and all my problems was gone. Still got som lag in grass rendering a bit slow when moving fast with camera but I guess that thats normal. Im on a RTX3070 full Ray tracing. I also used this console code from Nvidia. Something to do with foliage I guess. Got a lot more good looking grass with no performance drop.

  1. DLSS in Game: make sure that the following cvars are set
  2. r.NGX.Enable 1 (can be overriden on the command line with -ngxenable)
  3. r.NGX.DLSS.Enable 1
  4. r.NGX.DLSS.Quality -1

Hi all, I wanted to point out something new in 4.27 that should help with the problem reported in this thread. There is a new cvar called r.RayTracing.Geometry.InstancedStaticMeshes.CullAngle that enables solid-angle-based culling by default for ISMs, which includes foliage and grass. The default value is 2, which means that any instance with a bounding box that has a projected solid angle smaller than 2 degrees will be culled from RT effects such as shadows. Raising the number causes more instances to be culled. I tested the project linked above and the default culling behavior worked as expected. Hopefully this is helpful!

1 Like

Jon - is this documented anywhere? When I search the 4.27 docs for r.RayTracing.Geometry.InstancedStaticMeshes I cannot find this explanation.
The page Real-Time Ray Tracing | Unreal Engine Documentation gets close
Specifically I am looking for help on
r.RayTracing.Geometry.InstancedStaticMeshes.Culling 0
Has this replaced r.RayTracing.InstancedStaticMeshes.Culling 0

thanks

Hi delfCGI, those cvars are not in the documentation. They are not typically intended to be adjusted by users, but they do include some built-in help text if you type “?” after the cvar name. In 4.27 the default settings work a lot better out of the box. I’m not aware of an old version of that cvar without “.Geometry” (it’s possible, but I don’t have an old version lying around to check), but the main difference in 4.27 is the addition of r.RayTracing.Geometry.InstancedStaticMeshes.CullAngle. If you look at the cvar help text, it says that setting it to -1 reverts to the pre-4.27 behavior of distance-based culling rather than solid-angle based culling.

1 Like

Since we are talking grass and raytrace.
Are the invidia branches being merged back into .27 via pull, or are we still better off using the Nvidia branch?

Is performance worse or better in 4.27 , than 4.26?

About the same just harder to baseline since they made some changes to the editor.

Build from source. The latest source version seems to run maybe 2fps faster (and bug free compared to launcher)

Sounds like i am better off just waiting for 5 or something.