Weird shadows on distant grass Foliage using Raytracing and Megascan?

Hi

Is it normal to have weird shadows on the most distant LoDs of the foliage (Landscape Grass Type) when Raytracing Shadows from my Directional Lights are ON?

I am using Megascan assets (grass) downloaded with the Bridge, so it has automatically set up LODs. Is it the Billboard LoD created by Megascan that causes problems?
Any way to solve this issue and keep Raytracing on?

Thanks

raytraced shadows ON in the Directional Light

raytraced shadows OFF in the Directional Light

Lighting Only, Raytraced shadows ON

Lighting Only, Raytraced shadows OFF

LODs (the last LODs does not seem to appear strangely)

Hi there,Use DistanceField shadows as well as Cascade shadows both on Directional light i think it will work for you

I tried, but it does not change much sadly.
Here are my settings related to both in the Directional Light that I am using.

Hi there,i think its about Culling distance on foliage try some of these hope its work for you

[1] Try tweaking the value of “foliage.MinimumScreenSize” using the console with some small decimal values

[2] r.ForceLOD 0

     foliage.ForceLOD 0

    To disable LODs

      r.ForceLOD 1

     foliage.ForceLOD 1

   To enable back again.

[3] Foliage Tool | Unreal Engine Documentation

at the bottom of this doc you find culling section read it and apply it i am sure it will work

Hi @Hammadcgi
Thanks for the help! Much appreciated :slight_smile:
I think I isolated the issue: It is a Bug, or a current limitation of RayTracing and Grass.

[in THIS post][1] from 2019 a similar issue is detailed.
The docs say:

*> Culling

Because foliage instances are
rendered as clusters in a single draw
call, each cluster is either rendered
or not rendered based on occlusion. If
you set a value in the End Cull
Distance parameter, the clusters will
also be culled beyond that distance.
However, this will cause groups of
meshes to disappear abruptly as the
entire cluster goes out of range.
This can be reduced by adding a Start
Cull Distance parameter and then
setting up the Material appropriately.
In the vertex shader, a per-instance
fading factor is calculated, which
goes from 1.0 at the start distance to
0.0 at the end distance. This is accessible in the Material using a
PerInstanceFadeAmount node. If you
connect that to an opacity or masking
value, you can use it to fade
instances over a distance before they
reach the Cull Distance End and are
removed from rendering.*

Now, the problem is that Raytraced shadows are casted for each single grass strand, even for the ones which have been DistanceCulled and are invisible.

Therefore you have invisible grass far away casting shadows, thus creating the dark region far away.
Moreover, the “Cast Shadows” / “Visible in RayTracing” switches seem to only be working on LOD0 and not on the other LODs, this also seem like a bug.

Therefore you can only disable shadows/raytracing for ALL LODs at the same times and not just for the most distant ones,which at least would help.

I am new on the forum,any way to nudge the Unreal Team about these issues? :slight_smile:

Appreciated :slight_smile:

Hi @Paolo_Giandoso,

have you found a solution to this?

Many thanks,
Luigi

This could possibly help:
r.RayTracing.Geometry.InstancedStaticMeshes.Culling 0

Also having this exact issue. Has there been a solution to this?

r.RayTracing.Geometry.InstancedStaticMeshes.Culling 0 does not solve this issue. I am using landscape grass (Brushify material)