#Weirdly stretched lightmap
1 messages · Page 1 of 1 (latest)
This is a screenshot of the wall in Blender, showing the geometry I exported to Unity. The issue appears after baking lightmaps in Unity, but in Blender the wall looks fine.
Your wall is made of n-gons and is also extremely long, so auto-UV generation can't handle it
It's still very inefficient topology for lightmap UVs even if force it to work
I'd make vertical cuts on both sides of each door for quad topology
No geometry seams, just splitting the face into more edges
like this?
Yes
Similar issue
But if i checked triangulate faces option when exporting model it kinda worked
only the area above the doors is broken
Doesn't look broken
Not "broken" broken
It's expected that lightmap texels from different UV regions can be different
Unless Stitch Seams is enabled and there's enough lightmap space for the necessary variance
But in your case the UV island is barely bigger than one lightmap texel
Meaning the lightmap resolution is incredibly low
If the resolution you're baking at is lower than minimum lightmap resolution in mesh lightmap UV generation settings, then leaking will occur and make that kind of problem worse
I can try baking at higher resolution
What is the resolution
How tall is the hallway in unity units?
but i never heard about stitch seams
how can i check that
Compare it to the grid
Or to the one unit Unity default cube mesh by placing one in there as comparison
it's around 3 units
And what lightmapping resolution is this image baked on?
That would mean the texels on the floor and walls actually have a effective resolution closer to 0.5 or less
Logically if the wall heightwise has just one and a half lightmap pixels, it can't accurately represent shadows and the pixels will be cut off by UV seams too
That typically occurs when you export meshes in wrong scale
i have noticed something
i can cause the issue
my wall for some reason is at scale 100 100 100
The reason is exporting meshes in wrong scale
Possibly unapplied transforms but more likely wrong fbx unit scale
https://polynook.com/learn/how-to-export-models-from-blender-to-unity
Fbx export settings
i am exporting my mesh with this settings
Use the settings detailed in the article
Or use an export script/plugin that does it right
i exported the model and now the walls have scale of 1
When the lightmap resolutions aren't totally wrong because of object scale, next pay attention not to bake with lower resolution than the lightmap UV generation defines as minimum
40 is considered relatively high resolution
https://forum.unity.com/threads/lightmapping-troubleshooting-guide.1340936/
c.10 for seam stitching between UV islands within the same mesh
it's better i guess?
stitch seams is enabled
Okay, I fixed the issue by removing the additional cuts I had made before.
Anyway, @jaunty orbit , thank you for helping and for spending your time.
If the whole wall can fit in the lightmap UV space without having to have its size changed, it's as good as solved
But eventually you'll need to place seams like that in some places
In that case it'll be an important to know how to avoid light bleeding issue like that and to investigate its causes