I love the soft shadowing effect of DF shadows for my dynamic lights, but I’m having a ton of trouble getting rid of artifacts.
In my lighting test map, I have a small house that I’ve imported several ways - as a single mesh, as several meshes (broken down by room), as modular pieces. I’ve been playing with the lighting to see how I can get the best result, mostly dealing with light leaks through walls and DF artifacts.
Importing the entire house as a single mesh, the DF meshes are a mess, even with increased resolution, missing entire pieces of geometry. This is improved by splitting the mesh up into smaller pieces, but then I get nasty black artifacts at certain points where two or more meshes are close together.
For example, in this corner the interior wall and exterior wall are separate static meshes. The wall is 20cm thick. The point light is using DF shadowing. Mesh DF resolutions are increased until there’s no visible result from increasing them further.
I’m also seeing similar black artifacts elsewhere where separate meshes are near each other (like where the roof meets the exterior sides.
How can I get rid of these artifacts? Is it an issue with the meshes, the way they’re aligned/spaced, or is it a fundamental issue with DF shadows that I can’t avoid (and should therefore just go with regular shadow maps)? Increasing DF offset helps slightly (but still doesn’t produce an acceptable result), but creates leaks.
Try using “Two-Sided Distance Field Generation” inside of the meshs settings. That appears to fix the issue for me in most cases when I am using a one-sided model.
This works! Doesn’t seem like it should be the correct solution, but I’m not going to argue with a functional solution.
Thanks for the tip!
EDIT: Upon further investigation, this caused other issues. It seems that making the DF texture double sided significantly decreased the texture space available to visible parts, so there are many other artifacts now. It fixed up the one shown above, but caused other problems.