Hi
My scene consist of directional and point lights, when I am baking the light maps the textures/maps are getting corrupt.
I found a similar thread and I tried all the things as he suggested but noting worked.
Hello I’m not sure if this is a bug, or something I’m doing wrong - it wasn’t happening yesterday but I came to my project this morning and BOSH - broken! When I’m baking lightmaps, be it a point light, directional or whatever, I get artefacts...
Reading time: 1 mins 🕑
Likes: 1 ❤
I’m using the Unity 5.2.1f1 Personal edition.
Sample Scene Link
https://www.dropbox.com/s/bggsb0dksuwkcwq/bakedLightsIssue.unitypackage?dl=0
Can someone please move it to support forum.
Ah. I had exactly the same problem with the same asset.
For every fbx mesh you need to mark “generate lightmap uvs” in mesh import settings. That’ll fix the issue.
The problem happens because those objects have overlapping UVs. A lot of them.
Keep in mind, that automatic lightmap generation can hang on some objects. It won’t happen in this asset, but can happen somewhere else.
2 Likes
Thanks neginfinity.
I tried your solution and it fixed the corruption issue, but now the its not generating a proper lightmap.
What should I do?
By default that scene (it is created for unity 4) uses legacy shaders and has WAAAAY too many point lights. So, what you see is pretty much the “proper” lightmap.
I’d recommend to start disabling the point lights. Basically, just turn them all off, and keep only outside directional light that simulates the sun active, see if it makes the difference. Also, check shadow casting flags on all the lights and geometry. I think that window glass is configured to cast shadows by default, and blocks lights entirely.
In my case I also converted everything to unity standard shader, but it is incredibly time consuming, so I wouldn’t recommend doing that.
1 Like
neginfinity:
By default that scene (it is created for unity 4) uses legacy shaders and has WAAAAY too many point lights. So, what you see is pretty much the “proper” lightmap.
I’d recommend to start disabling the point lights. Basically, just turn them all off, and keep only outside directional light that simulates the sun active, see if it makes the difference. Also, check shadow casting flags on all the lights and geometry. I think that window glass is configured to cast shadows by default, and blocks lights entirely.
In my case I also converted everything to unity standard shader, but it is incredibly time consuming, so I wouldn’t recommend doing that.
Thanks
Finally your solution worked. Converted everything to standard shader.
This is the right place for the post.
1 Like