godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.03k stars 21.18k forks source link

Improve subsurface scattering appearance by using dithering or similar #75861

Open NHodgesVFX opened 1 year ago

NHodgesVFX commented 1 year ago

Godot version

4.02 Stable

System information

Windows 11, Vulkan Forward +, RTX2080S, Nvidia Game Ready 531.41

Issue description

SubSurface Scattering produces Stepping artifacts when high values are used. De-banding filter does not fix the artifacts. The artifacts are most visible where one part of the mesh overlaps another.

Can be seen in #60810 but that issue seems to focus on transmittance rather than the issue described here.

image

Steps to reproduce

  1. Apply a material with subsurface scattering turned on to a mesh.
  2. Turn SubSurface Scattering strength to 1

Minimal reproduction project

SubSurfaceTest.zip

Calinou commented 1 year ago

This is not a banding artifact, so enabling debanding won't resolve it. This is due to the limited number of steps in the default configuration of the SSS algorithm (it defaults to low quality to improve performance). This most likely can't be resolved without increasing the performance requirements.

If you increase SSS quality in the advanced Project Settings, the issue mostly goes away:

image

It may be possible to dither the result to make a limited number of steps look better, but this will introduce noise. (This noise can be jittered every frame so that TAA will cancel it out over time.)

petterthowsen commented 1 year ago

I'm having the same issue, even with quality set to high:

godot_sss_banidng_issue