The Voxel character is solid, standard lighting settings pretty much
This is an artifact of a mesh with hard edges and Unityâs ânormal biasâ. There are three options I can think of to solve the issue:
-
Set your lightâs Normal Bias to 0.0. You may have to increase the lightâs non-normal Bias to compensate. Means worse peter panning (gaps between the shadow caster and the shadow) or more shadow acne (striped or boxy artifacts) or both. But it doesnât require any more work.
-
Use two meshes, one for rendering what you see which is what you already have, and one that has smoothed normals that is for shadows only. Kind of a pain because now ever mesh needs a duplicate mesh, and you have to keep them in sync, but should solve the issue.
-
Use one smoothed normal mesh for both the rendering and shadow, but use a shader to do the flat shading instead of the vertex normals. May even render slightly faster as it can reduce the vertex count quite a bit. But doesnât work on OpenGLES 2.0 devices if for some reason you were still planning on supporting those.
I found that going into the objectâs Mesh Renderer and setting âcast shadowsâ from âOnâ to âTwo Sidedâ fixes the issue.
This can fix it, but isnât guaranteed, and will depend on the model. The gaps are still there, and will show up in some lighting angles, theyâre just hidden where the gaps in the front and back faces donât line up.
playing with the normal bias worked out for me, i always wondered how to fix this and previously i used 2 meshes, to only cast shadows only, few years later, still helping folks, thanks bud