I am encountering an issue which isn’t new: highlights on mesh edges when using shadows:
The answers available online always seem to point to tweaking the light shadow bias or tweaks to effect composer passes:
I’ve uploaded a simple sample that doesn’t include any post processing:
While this little line between the two objects might not seem like much in the sample, the scene I am working with has many objects and anytime there is such an edge, this happens. So the issue is very apparent. Tweaking the shadow bias only seems to make it worse with bigger values…making the values smaller doesn’t solve it. It seems to happen only on concave edges.
btw, the same can be seen in the PCSS example:
What are some things I could try to mitigate or solve this issue?
this is shadow bias, you can set it on the light. try extremely small negative (or maybe even positive) values: -0.00001 and go higher lower until it more or less fits. you may not eliminate gaps entirely in some cases.
Unfortunately no amount of tweaking the shadow bias has helped.
thanks for the suggestions. I was hoping I wouldn’t need to resort to such options.
btw, you can pause the example in debugger and type this in the console:
scene.children.position.y += 0.01
observe the seam disappear it will come back when there is a ball passing over it, though.
again, same trick helps, although not quite as much:
Ok. Thanks for the suggestions. Still not fixing my issue unfortunately.
Material side default and material.side=THREE.DoubleSide;
as long as it also does not receive shadow, it is fine
Changing the sideness does help the edge highlighting, but at the cost of some wicked banding:
After tweaking the shadow bias it does seem I can get rid of the banding to some extent!