I made a couple of modular 3d models to assemble a corridor in unity. To prevent spaces or overlapping of meshes I held V to snap models together.
But as I started to bake lighting something went wrong. I got these weird lines in-between when looking at a distance:
But looks normal up-close.
I tried to editing the UV map but it didn’t make a difference. So I suspected that the problems lie in light itself, since there were unaffected edges in shadows. So I looked in between the objects and here the problem was. The in-between parts that should be snapped together letting no light in between were lit.
So I think that caused these weird lines.
(I also noticed how weirdly point light ignores walls and reflects where it shouldn’t.)
I tried to find solutions for it online but couldn’t find an answer so far. So I’d be glad get your opinion on it. Thank you!
I can’t attach more files to this post for some reason so I’ll try to attach them in replies to your questions.
Post this scene as a public github project so issue can be reproduced and we will get to the bottom of this.
Ok, case solved. This is light leaking through the invalid geometry.
Even a dynamic light shines through it:
It is not because it is modelled in ProBuilder, but it is because some geometry is considered invalid regardless of the software it was made in.
This is one of these cases:
A common technique is to wrap your mesh in an unlit block box that you’ll remove / disable after baking. Hacky solution, but very reliable in producing good results.
@andrew-lukasik yep, unfortunately even with mipmaps turned off I get these results. Other parameters:
Lightmap res 40
Scale in Lightmap 1
Max Lightmap Size 1024
Compression Normal Quality
I doubled a wall object and snapped them together to see how light affects plains and then rotated them 180 degrees and put them side by side to see the inner shadow side that should not be lit at all. So that’s what I got