- Home /
Getting strange square lighting artifacts, despite the room being well lit?
Hello, I've been trying to fix these weird dark artifacts for days. It seems no matter what settings I put into the lightmapper, they still appear in some way. I'm using URP by the way. I've tried having Unity generate UVs for the meshes, and using the UVs the asset creator made in the package.
This is how it looks: https://imgur.com/X7PfHyD
As you can see there are plenty of lights, so there really shouldn't be blatant shadows this stark in the middle of the ceiling? The ceiling is made up of tiles, as are the walls, etc. I've also tried messing with ambient occlusion, but no settings there or in filtering seem to help, and in fact the image above is with AO completely disabled.
Any assistance would be awesome, final build is scheduled for 2 weeks from now.
Answer by tuinal · Aug 02, 2020 at 04:59 PM
They look like lightmap UV issues (black 'shadowed' texels are sharing UVs with lit ones).
Try:
Ensure 'generate lightmap UVs' is checked for the models you're importing
Adjust 'scale in lightmap' for problematic meshes
Increase resolution and/or padding of the lightmap
Ideally a proper full fix is to get it into 3DS or Blender and merge the mesh. You can see on e.g. the back wall you've got seams between tiles; this is because 2 tiles have a 2nd edge where they meet up. In Blender you'd want to Ctrl-J to join the tiles into a mesh then Remove Doubles to clean up the seams. Unity works and looks better with combined meshes rather than a lot of tiled gameobjects - even if occlusion culling takes a bit of a hit, if you combine sensibly (e.g. walls/ceiling/floor per room as 1 mesh), you'll gain performance and get rid of the seams.
Your answer
Follow this Question
Related Questions
Lightchanel's: Tell a light what objects it does effect in runtime 0 Answers
Shadows not being baked on static objects 0 Answers
Black patchy artifacts when lightmapping. 0 Answers
Mixed Lights not showing up in reflections 0 Answers
Toon Shader Working With Multiple Spotlight Shadows (Pro) 0 Answers