Extreme Bright Points in Directional Lightmap

Hi,

I found there are some extreme bright points in my scene after baking Lightmap using Directional Mode.
If I add bloom effect to the camera, bright points looks very bad, as image shown below.

In “Directionality” debug view I can see the light direction for this part is almost zero.
I have checked the w component is small as well.

But in fact, the “dominant” light is far away from this area, the direction value should be big.

In URP Lit shader, color in lightmap is divied by direction.w, this cause the final color to be very bright.

I have some questions:

  1. Light direction is very small, is it expected ?
  2. How to avoid this problem if I don’t modify URP Lit ?

I’m using Unity 2021.3.6
Can anyone help me? Thank you!

These look like NaNs. Do you have any area lights in the scene? Also, are those modular meshes?

Switching to Non-directional mode in the Lighting settings might be the easiest fix. Otherwise, inspect your lightmap UVs for overlaps, as that could also be a culprit.

1 Like

Thank you for your reply!
I checked “Stop NaNs” option in camera setting but nothing change.
There are no area lights.
They are not modular meshes.

I found two pipe segments overlapped, one is very bright.
8433929--1117019--upload_2022-9-12_23-57-54.png
I just shift their position a little and rebake the scene, now it looks good.
Thank you again.

1 Like