Generate lightmap uv’s doesn’t always respect the pack margin when unfolding geometry.
Example: A wall with a cubical hole in it, like for a window.
Unity/Beast kept one of those inner sides connected to the main wall-piece and folded it into the hole of the main uv-piece. This is an illegal operation because now edges are touching that aren’t touching in xyz and the pack margin is ignored completely.
I could work around this by lowering the angle threshold, so maybe the geometry in question was not perfectly rectangular. But my point is to show that the unwrap process seems to be flawed.
hm, i’m not quite sure i understand what you mean 8). Can you please provide an example? (or bug report with repro model - whatever suits you best)
Angle threshold works like that: when we unwrap part of geometry we check that resulting triangles have “similar” angles to source ones. By default we have quite strict threshold, so lowering it will allow to unwrap moar stuff will less seams (you can say unwrap is more aggressive).
After writing all this - i think i started to understand you have overlap (almost overlap) inside one uv-island? Yeah, that can happen - the pack margin is for space between islands.
Anyway - i would like to see the model in question, yes, and your thinking about lowering angle threshold is correct too.
thanks for your time
I have submitted the model under case 536114
I’m afraid I wasn’t using the correct terms. The angle error does play a role, because I set both this and area error to 1 to have a unwrap as rectangular as possible. I also lowered the hard angle threshold so the piece in question wouldn’t stay attached to the main wall. The resulting unwrap did work for me.
However the almost overlap inside the uv-island is something that shouldn’t happen in the first place. I realise now that it’s probably called “pack” margin for a reason.
But the same margin should be already respected while unwrapping/unfolding, shouldn’t it?
. (There is a grey zone here but lets say for uv angles smaller than 70 degrees. )
A second big gripe I have with the automatic unwrap is that it doesn’t split up coplanar surfaces / those that stay under the hard angle threshold to save uv space.
But especially in case of coplanar faces there is no way to split them up at all by default, safe for adding extra geometry like bevels and such or splitting the object up in advance.
Now there should probably be a checkbox to allow Unity/Beast to split or not, I guess there are a lot of cases where one wants continuous surfaces,
but imagine a baseboard running around the base of a room with some nooks and crannies, modeled from one piece. (e.g. by a extrusion. Just as an example. )
There are many angles that are perfect for splitting up the uv’s but the top part of this board(s) is coplanar, so Unity will unwrap the top as one big piece which basically looks like the room seen from above. That’s a huge waste of uv-space for something that could be very small on the Atlas.
or imagine a long straight railing. Even if there are edges where Unity could split, it won’t. As a result only one thin part of the uv"box" for this object is put to use.
This has become more important with U4 since it no longer fills up the holes but keeps the uvboxes separate. (But I sure like the ability to bake selected without ruining older bakes. )
But those things are why I find myself unwrapping more and more objects externally.
as it is angle/area error - you should move this higher, to allow bigger error (thus lowering threshold). Though i must say we allow too much of an error, though that’s a different question.
As for mesh in question - what unity version are you using? For me it unwrapped nicely in (more or less) 2 “planes” or “sides” (with default settings)
maybe i’m missing smth?