Using Unity4 Lightmaps in Unity5+

Hey, we’ve brought over a Unity 4 project into Unity5+ and the Lightmaps work okay except they seem to lose any padding/dilation in the textures, which causes some bleeding & seams artifacts.

If you look at the attached file the empty spaces between UV islands are filled in with padding in Unity 4, but in Unity 5 the empty spaces are left black. How is Unity 4 applying that padding? I don’t think it’s added during the baking process because the padding is not there if I open the LM texture in Photoshop.

3450751--273377--lms.jpg

Ok so it’s because of this,

“In Unity 4 we were using a very quick push-pull dilation algorithm that was running as part of the import.
In Unity 5 we’re not using it yet as we didn’t have access to the mask of which pixels are the background and which are not. That functionality was added in Enlighten and we’ll make the dilation work again soon.”

That quote is from years ago… I’m guessing this feature isn’t needed anymore because light baking in Unity 5+ solves it in some other way?

What version are you using? AFAIK they added dilation at some point. The last couple of versions do have it.

2017 3.1f1

Is there a chance the ‘mask’ Unity uses to do the dilation operation is being lost on transfer from Unity 4? Does anyone know what that mask is? The lightmap textures don’t seem to have any alpha channels…

So…my LMs receive the dilation fine in Unity 5.6 but don’t in 2017. In the 2017.2 release notes they list LM dilation as a ‘new’ feature. Which doesn’t make much sense. I’m guessing they revamped how it works and it’s no longer compatible with older LMs.