1
\$\begingroup\$

I experienced this weird lightmapping bug in my game that causes some models to have glowing artifacts on their surface. These artifacts "move" around, when I edit the UVs of the model in Blender, so I assume that it has something to do with them. I took a few screenshots to hopefully clarify the issue.

  • Engine used: Unity 2019.1.4f1
  • 3D Software: Blender 2.79b

If you need any other screenshots or something, let me know. Thank you in advance!

Lightmap Bug (lights off):

Lightmap Bug (lights off)

Lightmap Bug (lights on):

Lightmap Bug (lights on)

Models without Lightmaps baked:

Models without Lightmaps baked

Unity Lightmapper Settings:

Unity Lightmapper Settings

Tree model in Blender with UVs:

Tree model in Blender with UVs

Model Configuration in Hierarchy:

Model Configuration in Hierarchy

Model Asset Configuration:

Model Asset Configuration

\$\endgroup\$
0

1 Answer 1

3
\$\begingroup\$

You have a warning in the next-to-last screenshot which says "This GameObject has overlapping UVs". I also see that you've tried the suggested fix - to check "Generate Lightmap UVs" - but often this, in itself, is not enough to fix overlap because Unity's lightmap generation is not great.

To see if UV overlap is indeed the problem in this case, it may help to turn on the "UV overlap" view mode in the inspector window. This will show you the areas in which the lightmap is erroneously mapping lit areas to dark ones. Here's a video that shows how to do this (from this forum thread which may also be helpful):

Gif

If you find that you have some overlap, try playing with the lightmap generation settings in your last screenshot, as well as your lightmap resolution settings in your scene Lighting settings, until that warning goes away. I'd start by increasing "Pack Margin", although increasing this too much will deteriorate the quality of your lightmaps as you have a limited resolution to work with.

You could also try unchecking that option, adding a UV channel in Blender and manually UV-unwrapping your model. Unity uses UV channel 2 for lightmaps, and Blender should automatically export the additional UV map as UV channel 2. (UV channel 1 is what you generally use for texture mapping, and it looks like that's what you're using in your fourth screenshot).

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Hey there! Thanks a lot for your reply. I fixed the UVs in the meanwhile but that doesn't fixed the issue. But by using the 'Directionality' (same menu as for the UV Overlap channel selection) showed up the affected faces. So I changed the Directional Mode of the Lightmapper to 'Non-Directional' and this solved the issue. So thank you very much for your support to have a look to the channels menu! :) \$\endgroup\$ Commented Jun 4, 2019 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .