building-blocks icon indicating copy to clipboard operation
building-blocks copied to clipboard

`surface_nets` lighting artifacts from normal interpolation

Open bonsairobo opened this issue 4 years ago • 1 comments

mesh_acne

It seems like there are two issues contributing to the artifacts:

  1. Non-manifold complexes
  2. Interpolation between "unlit" normals and "lit" normals

When you see random isolated black spots that seem like they should be lit, it's because the vertex is actually non-manifold, and its normal was estimated to point more in the "unlit" direction than the "lit" direction.

Then the interpolation will make that darkness bleed out where it might not makes sense. In particular, on sharp edges. If the normal is estimated as "unlit" that will bleed around the edge.

I think the sharp edge issue is actually a bigger problem. Non-manifold complexes are always undesirable. But sharp edges are certainly something we would like to look correct.

bonsairobo avatar Jun 24 '21 23:06 bonsairobo

BTW, this should not be an issue if flat shading is used.

bonsairobo avatar Aug 09 '21 18:08 bonsairobo