We have a tile based game, each level is described by a scriptable object, we have an editor and inspector to allow us to build a flat 3D world from icons that are translated into prefabs and real geometry.
To reduce the draw calls I am baking the static geometry down to a combined mesh by using the CombineChildren in 4x4 groups, so 16+ draw calls down to 1.
The CombineChildren script doesn't do anything with UV2 set so I am calling Unwrapping.GenerateSecondaryUVSet() which appears to work to a degree, however, we have two issues:
Firstly: presumably because of the way the UVs are baked, and perhaps because the combined meshes have a lot of open edges, geometry that isn't adjacent receives the edge of light bleeding in from the lightmap for another triangle.
Secondly: Similarly, because we are baking tiles into combined meshes, where one group of tiles has been baked together and then abuts another group, the edges tend towards black. This broadly look like filtering, but even if I select point for the map, then 1 texel of resolution down the edge is being lightmapped from the map that belongs to different part of the mesh, nowehere near the triable in questions.
I've tried a lot of fixes for this, changing settings that sound as if they ought to impact the mesh, but none seem to have the desired effect.
I should say that I've checked, by occluding the offending part of the mesh, and the light is not leaking through the room, but bleeding from adjacent lightmap pixels.
My questions are therefore:
I'll add a few pictures Help much appreciated!
Picture showing first issues:
Second issue shows the hard edge between 'tiles'
look here: this person had the same problem and increasing pixel light didnt work at first then he made same changes and then the pixel light worked http://forum.unity3d.com/threads/115136-More-than-2-lights
Did you try increasing the pixel light count value in Edit->Project settings->Quality. test with some bigger numbers like 32 or 64 and bake
answered Aug 07 '12 at 07:43 PM
Beast LM bleeds through open edges. Try to create meshes with no open edges. afaik Combine Children script runs just before loading the game, means after baking the lights so its not the problem of combine children script.
answered Aug 07 '12 at 01:00 PM