Page MenuHome

2.81 shadows are incompatible with flat toon shaders and Data transfer modifiers
Needs Developer to Reproduce, NormalPublic

Description

System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.66

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: rB26bd5ebd42e3
Worked: (optional)

Short description of error
New shadows in EEVEE are incompatible with flat (toon) shaders and custom normals

Exact steps for others to reproduce the error
Create a simple Toon shader in Eevee (Diffuse BSDF->ShaderToRGB->ColorRampConstant->Mix->Output
Shadows are jagged and unusable, even on maximum Cube Size and Cascade Size and high sample count. In previous version 2.8, the shader will appear clean and sharp even on low settings
In addition, the new shadows do not respect normal editing via Data Transfer Modifier. Attach a Data Transfer Modifier to an object with the shader, Check Face Corner Data, Custom Normals, add a source mesh to source mesh. In mesh data under normals check Auto Smooth. in 2.81 the shadows will not obey the custom normals and will add shadows where there are none on the source. In previous version 2.8, the shader will obey the custom normals and not add extra shadows. See attachments

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 80.Dec 19 2019, 3:52 PM

As for the jaggies: I can get relatively clean results by just reducing the Light Properties > Shadow > Cascaded Shadow Maps > Max Distance to 40m
(that lights Light Properties > Shadow > Clip End was 40m when you open the file in 2.80)

Reading here https://wiki.blender.org/wiki/Reference/Release_Notes/2.81/Eevee I am a bit confused about Max Distance:

Sun lights now have their clip distances automatically computed

@Clément Foucault (fclem): what is `Max Distance then? Is it not the same as clip distances?
Anyways, tweaking it to a lower value improves jaggies quite a bit, see:

About the bias mentioned in https://wiki.blender.org/wiki/Reference/Release_Notes/2.81/Eevee:

  • An automatic bias is computed based on the shadow map resolution. Increasing the shadow resolution will reduce the bias and thus light leaking.
  • The shadow Bias parameter now adds an additional bias to avoid false shadowing on depth discontinuity.

@Clément Foucault (fclem): I am having trouble noticing any effect of the bias for sun lamps, is it effective for those?


Regarding the Data Transfer Modifier [maybe this report should be split in two?]: I can confirm there is a big difference, not sure though why this is, maybe @Clément Foucault (fclem) knows more?
(would need some further investigation otherwise...)

Hate to ask, but @Clément Foucault (fclem): could you take over for now?

I am having trouble noticing any effect of the bias for sun lamps, is it effective for those?

As Clément said in T71661#812964,

[...] The bias is multiplied by a really small value. If you type a really high value the bias is visible. I don't know if this is to be considered something critical to be changed prior release.

Sun lamps do have a working shadow bias, it's just not working as expected.