- Home /
The question is answered, right answer was accepted
[Unity 5] weird lighting issue when baking.
After lots of time spent getting my lighting the way I liked it in Unity 5, I come across this issue with most of my models. Whenever I bake the lighting, this always happens to them:
As you can see there are weird black bars around certain faces of the models. Also the image was brightened to see the problem better.
Any help would be appreciated!
PS: I don't think this is related to the bake settings, as it doesn't happen with some models.
$$anonymous$$aybe the uvs are overlapping for those polygons. If so, ticking 'generate Lightmap uvs' in the mesh import settings should work. Or the normals could be inverted, which can be fixed in the modelling application.
@ValooFX thanks for the reply. Sadly ticking 'generate lightmap uvs' which I've already tried makes it worse, there are black splotches all over. It does fix the issue, but provides another.
And sadly the normals aren't inverted either; I don't know what's causing this.
What are you bake settings? Are you creating all of your models yourself and creating your own lightmap uvs in a 3D package? Also what version of Unity 5 are you running?
It happens no matter what bake settings I use. Yes, I made all models, all UV maps, and Unity is creating the lightmap UV's. I'm running 5.2.1.
Looks like it could be a smoothing group issue to me. Clone the barrel object and rotate it, if the issue is always occurring on the same face of the barrel then it's worth checking the smoothing groups in the mesh are correct.
Answer by Whiteleaf · Mar 09, 2016 at 10:47 PM
I feel so stupid, yes, ticking "Generate Lightmap UVS" worked. I had to bake the lighting again. Thank you to everyone that helped.