Hair Strands Shadows have significant noise

Shadows cast by strand hair have high amounts of noise and we can’t seem to reduce it. I’ve tried playing with all the shadow-related settings i could find in the groom and in different configs but none seem to impact it all that much but I’m not sure which setting is causing this. The issue is most noticeable with directional lights but its visible to a lesser extent with other types (point/spot etc)

I don’t see this problem with the strand hair in the metahuman project on 5.5.3 when they are displaying as strands and with Lumen enabled in the project. The shape there seems much sharper. I also imported one of those grooms into our project which then causes the noise again, so it must be some config on our end that’s caused it. Since i can’t repro it elsewhere I can’t provide a repro step/sample project.

Other info

  • Lumen is enabled
  • We have had HWRT enabled but it’s currently disabled project wide.
  • Megalights are enabled
  • Virtual Textures are enabled
  • We have it on all our scalability profiles that cast shadows (even cinematic).
  • I tried matching the groom settings between our project and the MH sample with no change
  • There’s always been a little bit of noise on the groom itself but its started affecting other shadows substantially more recently.
  • We just upgraded to 5.6 but were seeing this before the upgrade as well. Not sure exactly when it started but for sure it was there on 5.5.

Thanks!

Steps to Reproduce

Hello,

Megalights didn’t support Groom strands in 5.5 and Groom strands is experimental in 5.6. Do you see the same issues if you disable Megalights? I’m assuming the directional light in the scene is using VSM and not Megalights? Megalights also works best with HWRT so using the SWRT path is even more untested and likely to have issues.

One thing I like to do when comparing project settings is run DumpCvars -csv in the console of both projects and then compare the generated .csv files in a diff viewer to look for any rendering cvars that stand out.

If the r.HairStrands.* CVars match, you’re using the same scalability settings in the Editor and it’s the same groom and material, the next thing to verify is that other common sources of noise are looked at:

  1. VSM SMRT (r.Shadow.Virtual.SMRT) in your project looks to be softer/wider than in the Metahuman project, or perhaps the light radius is larger to give a softer shadow penumbra - something to try disabling or matching in your project to see if that’s related.
  2. Lumen settings (r.Lumen.*). Does the noise go away if you toggle Display > Lighting Components > Global Illumination off in the viewport?
  3. TSR - is the noise affected by your antialiasing settings and does it go away when AA is off (Display > Anti-aliasing)?

When the groom is on a head we mainly only see the noise along the edges

Is the noise on all edges - including the hair against far away backgrounds like the sky, or just edges where the hair overlaps the character skin and face? Noise against far away backgrounds may have more to do with anti-aliasing (TSR), whereas noise on the skin is more likely from shadowing or Lumen’s short range AO.

I did do a diff of our project vs the MH cvars and tried some of the differences.

If you can attach just the render CVAR diffs that may help us identify important ones. Also, I’m assuming you’ve already compared any Post Process Volumes in the scenes.

Hi, sorry for the late.

Glad you found the source of the issue!

Indeed, these settings allow to get sharper result by having 1) finer voxelization, 2) more accurate tracing through the voxel structure.

These settings come at some cost though. So be sure this fit in to your project budget. The default values for these settings are respectively 0.3 and 1.2.

Sincerely,

/Charles.

Hey, thanks for the quick reply!

Yes i see the same issue when we have disabled megalights at a project level, and also checked it was off on the directional I was testing with. I’ve also tried all the shadow modes on it (Default/RT/VSM) and tried with/without HWRT and it seems to behave the same in all those cases unless I’ve missed something.

I did do a diff of our project vs the MH cvars and tried some of the differences. One that made an impact was r.HairStrands.Voxelization.Raymarching.SteppingScale .5 (ours was set to 2) which helped a lot with the center of the shadows but not on the edges. When the groom is on a head we mainly only see the noise along the edges unfortunately so in practice it doesn’t fix our issue

Ah! I found what the bulk of the issue was. It was the combination of these 2 settings which were changed some time ago for performance reasons that together caused the issue

  • r.HairStrands.Voxelization.Virtual.VoxelWorldSize 0.6 (MH is 0.1)
  • r.HairStrands.Voxelization.Raymarching.SteppingScale 2 (MH is 0.5)

I had only tried these in isolation and they didn’t fully solve the problem on their own, but I didn’t think to try both together. There’s still a bit more than MH but its way way better. I’ll attach the render variables as well just in case something else stands out.

[Image Removed]

The noise we we’re trying to get rid of is really just from the cast shadow itself, not along things the groom itself overlaps. I also checked all the other things you listed and they seem to check out (not from GI, not from TSR and not from SMRT) as far as I can tell.

Thanks for your help! DumpCvars + BeyondCompare is really useful for this kind of problem.