Bad cast shadows with procedural mesh

Hi,

I am working on rendering marching cubes with procedural meshes in Unreal 5.3.2 and I have an issue with shadows casted by them as shown in the screenshot below.

Interpolated normals are fine :

I’ve tried toggling raytracing shadows, virtual shadow maps to no avail.

Is there a solution to this ?

Thanks in advance for your help :slight_smile: !

Greg

Perhaps this might help

The OP had a similar problem and turned off virtual shadow maps.

Even in the documentation it states of vsm’s
“Low poly geometry with high curvature and smooth normals can exhibit artifacts”. I think this might be the case where it’s showing.

The doc mentions using the command
r.Shadow.Virtual.NormalBias with a parameter of 1 to try to mitigate these types of problems.

Hi and many thanks for your quick reply :slight_smile:

I missed that part in the doc mentioning low poly meshes with smooth normals.

I tried playing with the VSM parameter r.Shadow.Virtual.NormalBias and here are the results :

r.Shadow.Virtual.NormalBias 1

r.Shadow.Virtual.NormalBias 20

In-between values still show artifacts. But would the latter be overkill ?

Thanks again !

Greg

The bias doesn’t have a big impact on performance. It just shifts the shadow map either away or towards the object. Just be sure to check with another object or character to see if their shadows don’t look strange on higher values (you can either have shadow separated from mesh or bad self shadowing depending on the offset)

Marked as Solved - thank you so much :slight_smile:

Greg

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.