Realative margin for uv islands with different size.

I just wonder - is there such thing? It would save a lot of time, because we could use smart uv projection more often, instead of time-consuming and boring manual uv-mapping. (I’ve just spend about five hours for uv-mapping).

For example, i have several different uv islands. These uv islands have very different size. Some islands are huge, others are tiny. If i use automatic packing (Ctrl+A, Ctrl+P) with fixed margin for every uv island (for example 0.40) i recieve a non-optimized texture with lots of blank space, where small uv islands looks like holes in cheese.

So it would be nice if there happen to be some algorithm which can set up relative margin for smaller uv islands - the smaller the island, the smaller its margin. With this algoritm we could have properly packed textures, even after automatic uv mapping.

I mean, we could deliver another one devastating strike to destroy manual uv mapping forever :wink:

Large margins around large islands and small margins around small islands ?
If the small margin is large enough to not cause any render/painting issues why wouldn’t you just have this small margin around all islands. Why would you need a large margin around some islands just because they are larger ?

No-no. I just want small islands not to have a huge amount of blank space around them.
Actually we would need non-linear dependence here. May be we can calculate it taking in account size of uv island. I mean amount of square which uv island occupy. And margin also shouldn’t be larger than user specified amount. So, we would have absolute high value, above which margin can’t be in any case.
Then, at least we can make algorithm to create margins which are not bigger than square (or preimeter may be) of smaller uv islands. I think there are room for tweaking here.

But why do your larger islands require a larger margin simply because they are bigger? Why do you need different margin sizes at all?

And Blender’s autopack will never be that great for a lot of shapes until it is smart enough to put islands into holes in other islands, or interlock oddly shaped islands. It appears to use the bounding box of each island to avoid overlap rather than the actual coverage, which leads to a ton of blank space with weirder-shaped islands.

I don’t need different margin size for all uv islands. I just want smaller margin for small islands. To avoid larger margins having larger islands we can manually specify the highest margin value. For example, i specify 0.40 as highest margin value, so, no uv island (no matter how big it is), may have margin larger than 0.40 It will be not worse than current packing algorithm.

Now we have to deal with smaller uv islands. I guess, we can calculate their margin taking in account square occupied by this islands. Relative square in comparison to overall uv-map size, or, may be, in comparison to bigger uv island.

Talking about free space inside large uv islands, why not use masking to mark which square of uv-map occupied, and which square is still free? It shouldn’t be so difficult, i belive. In terms of algorithms, of course. May be practical implementation will be much more difficult.
For example, we can mask all uv islands, project this mask on uv-map and mark this part of uv map as “occupied”, so other part of uv-map will be marked as “free”. Using this algorithm for several iterations, may do the trick, i guess.