Stripe Patterns appearing in Lightmaps

When baking lightmaps for this scene, I’m getting stripe patterns appearing on some surfaces.

Here’s a look at the actual lightmap…

I’m working in Unity 2021.1.10. I get the same result with either Progressive CPU or GPU.
Any help would be greatly appreciated!

Have you unwrapped the lightmap UVs yourself, or were they generated inside of Unity?

The model has UV’s that overlap, so Lightmap UVs are being generated in Unity. I’m using the default settings.

Does it happen if you move the model to a new scene and lightmap it on its own? (and if it does, can you share the model? I would like to investigate).

The UVs don’t look like the problem to me, they are typical inefficient Unity generated UVs, but they’re not actually that bad.

@AcidArrow
Good idea testing in another scene. That didn’t resolve the issue, but gave me a place to try a few things and narrow it down. …and I’ve found some interesting quirks in the Progressive lightmapper, as well as a couple of workarounds.

Firstly, here’s the model with plain untextured materials.

Two things to note: 1) The surfaces getting these stripes are all using a material that has Double-Sided Global Illumination enabled. 2) The model is positioned at 0,7500,0 (it’s a cockpit of an airplane that’s flying at high altitude)

When I turn off Double-Sided GI on that material, the stripes disappear…

When I move the model to 0,0,0 the quality of ALL the lighting improves dramatically. Turning Double-Sided GI back on with the model at this position does not bring the stripes back:

So, as a workaround I can position the model at 0,0,0 to light it, and then reposition at 0,7500,0 – not ideal, of course, but workable.

I’ll post a bug report.

Ah, yes, this is the issue. It’s a floating point precision issue. The precision issues start much earlier than that, but they are much subtler than what you’ve been seeing.

Looks like the same issue as a bug that was fixed back in 2019 but found its way back in. I’ve submitted a bug report, so hopefully it’ll be addressed again.

1 Like

Can you please share the case id? Thanks!

@KEngelstoft Case 1387471

1 Like

Why was this marked as resolved? If there’s a resolution, it would be helpful to know where to look for that, or when it might be available. Case 1387471 is still open, so I assume this was marked resolved in error. I’ve changed the status back to bug, and will post here when I have word that it is resolved.

Hey. Case 1387471 is as you say still open. Which case are you referring to as having been marked as resolved? I don’t follow.

I was referring to this forum thread. I kinda overreacted though. :roll_eyes:

The stripe artefact is is likely caused by 32 bit float point precision issues as AcidArrow said, so increasing push off on the object via Lightmap Parameters could be a workaround. Unity - Manual: Lightmap Parameters Asset

Hello!

I wanted to provide a quick update regarding this issue. We have discussed this issue internally. As correctly observed by @AcidArrow , it is caused by 32 bit floating point precision errors. This means that large scenes, and objects placed away from world origin (0,0,0) will exhibit lightmap artifacts.

We are planning on addressing it as part of the upcoming unified baking backend work. We cannot provide the ETA, unfortunately.

In the meanwhile, you could try the workaround which @KEngelstoft has suggested:

I hope this helps.

2 Likes