Improve UV packing to pack more tightly (not just considering bounding boxes) #68889

Closed
opened 2019-08-20 19:58:09 +02:00 by Dalai Felinto · 69 comments

Better UV island packing algorithm that does not only consider bounding boxes of islands and packs more tightly (even if slower).

Possible algorithms:

We'd likely want to take the implementation from those libraries and adapt it rather than adding the library as a dependency.

Better UV island packing algorithm that does not only consider bounding boxes of islands and packs more tightly (even if slower). Possible algorithms: * [xatlas](https://github.com/jpcy/xatlas) * tetris packing (as implemented in [geogram](https://github.com/BrunoLevy/geogram/wiki/Texturing)) We'd likely want to take the implementation from those libraries and adapt it rather than adding the library as a dependency.
Author
Owner

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Added subscriber: @LukasS

Added subscriber: @LukasS

Removed subscriber: @LukasS

Removed subscriber: @LukasS

Added subscriber: @item412

Added subscriber: @item412

Added subscriber: @Zuorion-4

Added subscriber: @Zuorion-4

Added subscriber: @SecuoyaEx

Added subscriber: @SecuoyaEx

In terms of UV packing and UV unwrapping, it's common in other software to have a progressive heuristic solver. Something that you let run for a couple of seconds until you're satisfied with the result.

In terms of UV packing and UV unwrapping, it's common in other software to have a progressive heuristic solver. Something that you let run for a couple of seconds until you're satisfied with the result.

Added subscriber: @0o00o0oo

Added subscriber: @0o00o0oo

Added subscriber: @giakaama

Added subscriber: @giakaama

Added subscriber: @moisessalvador

Added subscriber: @moisessalvador

Is there a task for to improve the UV editor itself? Right now it still has remnamts of the image editor and it could be improved. I made a couple of proposals about it [here ]] and [ https:*blender.community/c/rightclickselect/cQdbbc/ | here

Is there a task for to improve the UV editor itself? Right now it still has remnamts of the image editor and it could be improved. I made a couple of proposals about it [here ]] and [[ https:*blender.community/c/rightclickselect/cQdbbc/ | here ](https:*blender.community/c/rightclickselect/bQdbbc/)

Added subscriber: @mrlemonyfresh

Added subscriber: @mrlemonyfresh
Campbell Barton changed title from UV Mapping Improvements to Improve UV packing to pack more tightly (not just considering bounding boxes) 2019-11-27 04:19:47 +01:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Split out tasks #71958 (Automatic UV seam creation tool), #71959 (Improve UV unwrapping balance between angle and area preservation) since merged tasks are harder to manage.

Split out tasks #71958 (Automatic UV seam creation tool), #71959 (Improve UV unwrapping balance between angle and area preservation) since merged tasks are harder to manage.

Added subscriber: @1D_Inc

Added subscriber: @1D_Inc

In #68889#784315, @SecuoyaEx wrote:
In terms of UV packing and UV unwrapping, it's common in other software to have a progressive heuristic solver. Something that you let run for a couple of seconds until you're satisfied with the result.

Do you mean Packmaster / Shotpacker addons?

> In #68889#784315, @SecuoyaEx wrote: > In terms of UV packing and UV unwrapping, it's common in other software to have a progressive heuristic solver. Something that you let run for a couple of seconds until you're satisfied with the result. Do you mean Packmaster / Shotpacker addons?
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Also, please, remember, that current packing behavior is good because it is fast, that is suitable for the most cases and especially nice for heavy meshes.
If to completely replace it with heuristics instead of adding it, it is possible to get the same problem as with the undo - low perfomance for every use case instead of when it's really needed.

Also, please, remember, that current packing behavior is good because it is fast, that is suitable for the most cases and especially nice for heavy meshes. If to completely replace it with heuristics instead of adding it, it is possible to get the same problem as with the undo - low perfomance for **every** use case instead of when it's really needed.

Removed subscriber: @moisessalvador

Removed subscriber: @moisessalvador

Added subscriber: @muhuk

Added subscriber: @muhuk

Removed subscriber: @SecuoyaEx

Removed subscriber: @SecuoyaEx
Member

Added subscribers: @Chris_Blackbourn, @DanielBystedt

Added subscribers: @Chris_Blackbourn, @DanielBystedt
Member

@Chris_Blackbourn Asked me to give some feedback and provide a diagnostic test scene as an example of how uv packing could be improved in Blender.

In the attached image you can see how there is a lot of waisted space that is not utilized during packing.

image.png

Blender file example
bad packing from Bystedt 220920.blend

@Chris_Blackbourn Asked me to give some feedback and provide a diagnostic test scene as an example of how uv packing could be improved in Blender. In the attached image you can see how there is a lot of waisted space that is not utilized during packing. ![image.png](https://archive.blender.org/developer/F13533111/image.png) Blender file example [bad packing from Bystedt 220920.blend](https://archive.blender.org/developer/F13533121/bad_packing_from_Bystedt_220920.blend)

Comparison with Packmaster addon, in case if it will be useful.

The default packing: fast, but lots of unused space since islands proceeded as convex shapes.
Islands rotation is disabled (sometimes it is needed).
The result - 46.4% of the area is used:
image.png

The default packing.
Islands rotation is enabled.
The result - 48.2% of the area is used:
image.png


Packmaster (3 seconds heuristics): islands are proceeded as concave shapes
Islands rotation is disabled.
The result - 59.4% of the area is used:
image.png

Packmaster (3 seconds heuristics).
90 degrees islands rotation is enabled.
The result - 68.5% of the area is used:
image.png

Comparison with Packmaster addon, in case if it will be useful. The default packing: fast, but lots of unused space since islands proceeded as **convex shapes**. Islands rotation is disabled (sometimes it is needed). The result - 46.4% of the area is used: ![image.png](https://archive.blender.org/developer/F13571856/image.png) The default packing. Islands rotation is enabled. The result - 48.2% of the area is used: ![image.png](https://archive.blender.org/developer/F13572070/image.png) _____________________ Packmaster (3 seconds heuristics): islands are proceeded as **concave shapes** Islands rotation is disabled. The result - 59.4% of the area is used: ![image.png](https://archive.blender.org/developer/F13571892/image.png) Packmaster (3 seconds heuristics). 90 degrees islands rotation is enabled. The result - 68.5% of the area is used: ![image.png](https://archive.blender.org/developer/F13571897/image.png)

Added subscriber: @Dangry

Added subscriber: @Dangry

@1D_Inc Can you share that geometry in a .blend file?

@1D_Inc Can you share that geometry in a .blend file?

In #68889#1422526, @Chris_Blackbourn wrote:
@1D_Inc Can you share that geometry in a .blend file?

I checked legal notices - and, actually, yes, I can share this one. After all, if even Google and Nvidia use my models for their datasets, why not use them for Blender developers.
However, I have to do this clearly so I uploaded it to Blendswap, it's awaiting moderation, which usually takes a few days.
It will be available at this link - https://blendswap.com/blend/30606

> In #68889#1422526, @Chris_Blackbourn wrote: > @1D_Inc Can you share that geometry in a .blend file? I checked legal notices - and, actually, yes, I can share this one. After all, if even Google and Nvidia use my models for their datasets, why not use them for Blender developers. However, I have to do this clearly so I uploaded it to Blendswap, it's awaiting moderation, which usually takes a few days. It will be available at this link - https://blendswap.com/blend/30606

In #68889#1422526, @Chris_Blackbourn wrote:
@1D_Inc Can you share that geometry in a .blend file?

The model is available.

> In #68889#1422526, @Chris_Blackbourn wrote: > @1D_Inc Can you share that geometry in a .blend file? The model is available.
Member

Hi Chris!

I made version of my earlier file, but this time with good packing so that you can compare if needed.

image.png

good packing from Bystedt 220927.blend

Hi Chris! I made version of my earlier file, but this time with good packing so that you can compare if needed. ![image.png](https://archive.blender.org/developer/F13577123/image.png) [good packing from Bystedt 220927.blend](https://archive.blender.org/developer/F13577126/good_packing_from_Bystedt_220927.blend)

Nice! Loving the fireplace! I've got both models in the debugger, should be a good challenge :D

Nice! Loving the fireplace! I've got both models in the debugger, should be a good challenge :D

In #68889#1423173, @Chris_Blackbourn wrote:
Nice! Loving the fireplace! I've got both models in the debugger, should be a good challenge :D

Here is a problem with my model - it is very polished.
There are no self-intersecting islands contours, non-unwrapped mesh chunks, overlapping islands that are used to save UV area, or other possible threats or hints. It doesnot even contain tris or ngons, since it is an onlyquads model.

That usually means that such a model is good as a result, but is quite bad as a test subject, since provides sterile conditions that are very uncommon for realword production process.
This better be taken into account at some point.

> In #68889#1423173, @Chris_Blackbourn wrote: > Nice! Loving the fireplace! I've got both models in the debugger, should be a good challenge :D Here is a problem with my model - it is very polished. There are no self-intersecting islands contours, non-unwrapped mesh chunks, overlapping islands that are used to save UV area, or other possible threats or hints. It doesnot even contain tris or ngons, since it is an onlyquads model. That usually means that such a model is good as a result, but is quite bad as a test subject, since provides sterile conditions that are very uncommon for realword production process. This better be taken into account at some point.

I used Texel density checker addon to calculate UV filling precentage, can be useful.
https://github.com/mrven/Blender-Texel-Density-Checker
Also I want to mention that the default (convex shapes) method is more useful during cutting UV seams and unwrapping process, because it gives a clearer picture how your resulting islands looks like (individual shapes of islets after a convex packing are better humanly recognizable than after a concave one). So it is reasonable to use the default convex packing during UV unwrapping process to check islands shapes and use concave packing at the end to form the final result.

Since they are all useful and have their own benefits, I would like to suggest calling packings "convex/concave" rather than "good/bad".

I used Texel density checker addon to calculate UV filling precentage, can be useful. https://github.com/mrven/Blender-Texel-Density-Checker Also I want to mention that the default (convex shapes) method is more useful during cutting UV seams and unwrapping process, because it gives a clearer picture how your resulting islands looks like (individual shapes of islets after a convex packing are better humanly recognizable than after a concave one). So it is reasonable to use the default convex packing during UV unwrapping process to check islands shapes and use concave packing at the end to form the final result. Since they are all useful and have their own benefits, I would like to suggest calling packings "convex/concave" rather than "good/bad".

Added subscriber: @Metrons

Added subscriber: @Metrons

Hi @Chris_Blackbourn Thank you for working on better packing. Is there any hope that we can have group packing at some point in the future? I'm wondering if that's on your mind at all. For example, my character's hands, fingers i could assign to group 1 and the arms and torso, group 2 etc and when i pack it keeps my groups together. This way when i'm texturing i'm not looking all over my uvs for fingers or something.

Hi @Chris_Blackbourn Thank you for working on better packing. Is there any hope that we can have group packing at some point in the future? I'm wondering if that's on your mind at all. For example, my character's hands, fingers i could assign to group 1 and the arms and torso, group 2 etc and when i pack it keeps my groups together. This way when i'm texturing i'm not looking all over my uvs for fingers or something.

Hi @Metrons ! Welcome :D

"Group Packing" isn't really on my radar at the moment, as it needs a way to specify what makes a "group". I have access to materials, so maybe assign fingers to the finger material etc? Or perhaps there's a better way. In any case, I don't know of a Task for group packing. It might make sense to create one.

There might also be a partial solution in some of these tasks which are in the "Under Discussion" category:

Hope this helps!

Hi @Metrons ! Welcome :D "Group Packing" isn't really on my radar at the moment, as it needs a way to specify what makes a "group". I have access to materials, so maybe assign fingers to the finger material etc? Or perhaps there's a better way. In any case, I don't know of a Task for group packing. It might make sense to create one. There might also be a partial solution in some of these tasks which are in the "Under Discussion" category: * #78395 * #78396 * #78398 Hope this helps!

image.png Just a quick note on the difficulty

  • Red axis-aligned-bounding-box (AABB) is where I'm currently working to specify exact margin and improve performance on large meshes.
  • Green Convex hull is quite a bit more challenging and needs a different approach.
  • Blue Concave hull is like Convex Hull but slower (and adds complexity).
  • Hole filling (not shown) is even slower still.
![image.png](https://archive.blender.org/developer/F13583877/image.png) Just a quick note on the difficulty * Red axis-aligned-bounding-box (**AABB**) is where I'm currently working to specify exact margin and improve performance on large meshes. * Green **Convex** hull is quite a bit more challenging and needs a different approach. * Blue **Concave** hull is like Convex Hull but slower (and adds complexity). * Hole filling (not shown) is even slower still.

I think time isn't an issue here.
Waiting 30 sec or 1 min until solver finishes the job is still better than spend an hour manually moving pieces back and forth looking for better coverage.

I think time isn't an issue here. Waiting 30 sec or 1 min until solver finishes the job is still better than spend an hour manually moving pieces back and forth looking for better coverage.

Added subscriber: @NahuelBelich

Added subscriber: @NahuelBelich

There are AFAIK curently 3 packing plugins for blender ( UVPackmaster, UVShotpack, UVPacking ).
All of them support Concave shapes with holes. And that good packing with Concave shapes is heavily requested, at least in gamedev community.

Here are examples of examples:

Shotpacker UV Packmaster UV-Packer
image.png image.png image.png

In terms of speed all of those addons were near instant at bysted example, and have some kind of performance-precision setting like "Good/Efficient" or number of iterations.
And on default settings with mesh FIREPLACE_MF_0018_A from 1D times they achieve: are around 3-7sec (and can ba cranked up) while Blender Packing is sub 1s. So i agree with 1D that there could be ultra-fast option for really heavy meshes if thats not too much duplicated work.

Also each addon have option: Allowable Island rotations: No rotation/90°/45°/etc. where with more steps they tend to be significantly slower.

There are AFAIK curently 3 packing plugins for blender ( UVPackmaster, UVShotpack, UVPacking ). All of them support Concave shapes with holes. And that good packing with Concave shapes is heavily requested, at least in gamedev community. Here are examples of examples: | Shotpacker | UV Packmaster | UV-Packer | -- | -- | -- | | ![image.png](https://archive.blender.org/developer/F13593477/image.png) | ![image.png](https://archive.blender.org/developer/F13593508/image.png) | ![image.png](https://archive.blender.org/developer/F13593543/image.png) In terms of speed all of those addons were near instant at bysted example, and have some kind of performance-precision setting like "Good/Efficient" or number of iterations. And on default settings with mesh FIREPLACE_MF_0018_A from 1D times they achieve: are around 3-7sec (and can ba cranked up) while Blender Packing is sub 1s. So i agree with 1D that there could be ultra-fast option for really heavy meshes if thats not too much duplicated work. Also each addon have option: Allowable Island rotations: No rotation/90°/45°/etc. where with more steps they tend to be significantly slower.
Chris Blackbourn self-assigned this 2022-10-14 23:18:10 +02:00

Please let me know if you are working on this one.

Please let me know if you are working on this one.

Added subscriber: @AndyCuccaro

Added subscriber: @AndyCuccaro

Added subscriber: @FDesimpel

Added subscriber: @FDesimpel

For lightmaps and 3d painting and such these seem better, though i hope those will be additional choices, the former may seem wastefull though nicer for hand painting with the aligned circles for instance.

For lightmaps and 3d painting and such these seem better, though i hope those will be additional choices, the former may seem wastefull though nicer for hand painting with the aligned circles for instance.
Daniel Bystedt added this to the Modeling project 2023-03-14 09:00:41 +01:00

WIP: #105821

WIP: https://projects.blender.org/blender/blender/pulls/105821

If you want a sneak-peek, first pass of this should be in the daily builds, https://builder.blender.org/download/daily/

There's still more work to be done improving packing efficiency, so please wait making direct comparisons with other packers until we can get the rest of the changes in.

If you want a sneak-peek, first pass of this should be in the daily builds, https://builder.blender.org/download/daily/ There's still more work to be done improving packing efficiency, so please wait making direct comparisons with other packers until we can get the rest of the changes in.

@Chris_Blackbourn a colleague of mine that has being testint the last builds and he has a machine with a slower cpu, he brought my a situation, a monkey (suzzane) with the uv reseted (each face is an island), when all the island in that monkey are selected it takes a long time to do the first pack, in my machine eventually works but in his machine blender softlock, his solution was to run a phyton command bpy.ops.uv.pack_islands(shape_method="AABB") to start the first pack with AABB that its the fastest, then with all the island separated the softlock in his blender doesn't happend, and packs convex/concave properly
Probably the default packer for the moment should be Bounding box and not convex or lowering the margin value from 0.001 to 0.01 for us alpha tester.

@Chris_Blackbourn a colleague of mine that has being testint the last builds and he has a machine with a slower cpu, he brought my a situation, a monkey (suzzane) with the uv reseted (each face is an island), when all the island in that monkey are selected it takes a long time to do the first pack, in my machine eventually works but in his machine blender softlock, his solution was to run a phyton command bpy.ops.uv.pack_islands(shape_method="AABB") to start the first pack with AABB that its the fastest, then with all the island separated the softlock in his blender doesn't happend, and packs convex/concave properly Probably the default packer for the moment should be Bounding box and not convex or lowering the margin value from 0.001 to 0.01 for us alpha tester.

I'm not too concerned if the daily build has problems. On a philosophical level, that's exactly what the daily builds are for, to shake out the problems before we make a release.

If there's a test-case which has poor performance on the daily build, can you send through a .blend and repro steps, highlighting the test case, and we'll try and address the performance issue first before applying work-arounds.

Blender should definitely be usable on slow machines too, so this is a use case we need to support.

I'm not *too* concerned if the daily build has problems. On a philosophical level, that's exactly what the daily builds are *for*, to shake out the problems before we make a release. If there's a test-case which has poor performance on the daily build, can you send through a .blend and repro steps, highlighting the test case, and we'll try and address the performance issue *first* before applying work-arounds. Blender should definitely be usable on slow machines too, so this is a use case we need to support.

sshould i tell him to do a conventional bug report or poke him to come here? since the PR of the xatlas packing was already merged

sshould i tell him to do a conventional bug report or poke him to come here? since the PR of the xatlas packing was already merged

sshould i tell him to do a conventional bug report or poke him to come here? since the PR of the xatlas packing was already merged

This issue is still open, so here is fine. A conventional bug report will work too, just be sure to mark which version it's on.

> sshould i tell him to do a conventional bug report or poke him to come here? since the PR of the xatlas packing was already merged This issue is still open, so here is fine. A conventional bug report will work too, just be sure to mark which version it's on.
Member

Amazing work @Chris_Blackbourn! I tested the new packing and it works great. I also compared to a uv packing addon that I have bought and the result of your algorithm got better result than the addon.

addon uv area ratio = 0.645

Chris cool packing area ration = 0.673
(Shape method = Exact shape, margin method = fraction)

Amazing work @Chris_Blackbourn! I tested the new packing and it works great. I also compared to a uv packing addon that I have bought and the result of your algorithm got better result than the addon. addon uv area ratio = 0.645 Chris cool packing area ration = 0.673 (Shape method = Exact shape, margin method = fraction)

idea: use operator_menu_enum instead of just operator in Pack Islands. According to @Chris_Blackbourn

Screenshot_20230323_021712.png

idea: use operator_menu_enum instead of just operator in Pack Islands. According to @Chris_Blackbourn ![Screenshot_20230323_021712.png](/attachments/09118aed-c9a3-4951-93b6-c14bd22307cd)

Amazing work @Chris_Blackbourn! I tested the new packing and it works great. I also compared to a uv packing addon that I have bought and the result of your algorithm got better result than the addon.

Great stuff! There's still more efficiency improvements to be committed, exciting times :D

> Amazing work @Chris_Blackbourn! I tested the new packing and it works great. I also compared to a uv packing addon that I have bought and the result of your algorithm got better result than the addon. Great stuff! There's still more efficiency improvements to be committed, exciting times :D
Member

After doing some testing it seems like the current default settings for packing generates great results and is also fast

Current default:
Pack to: Closest UDIM
Rotate = True
Margin method = Scaled
Margin = 0.001
Shape method = Exact shape (Concave)

I tried some different settings. Margin_method = fraction was way slower, so 'scaled' seems like a good default setting.

Some thoughts on improving the user experience:

Progress bar
The packing process can potentially take a long time due to uv complexity and hardware. One thing that could improve the user experience is to add a progress bar

Interrupt packing with escape
It would be great if users could interrupt the process by pressing ESC on the keyboard or pressing the X next to the progress bar

image

After doing some testing it seems like the current default settings for packing generates great results and is also fast Current default: Pack to: Closest UDIM Rotate = True Margin method = Scaled Margin = 0.001 Shape method = Exact shape (Concave) I tried some different settings. Margin_method = fraction was way slower, so 'scaled' seems like a good default setting. Some thoughts on improving the user experience: **Progress bar** The packing process can potentially take a long time due to uv complexity and hardware. One thing that could improve the user experience is to add a progress bar **Interrupt packing with escape** It would be great if users could interrupt the process by pressing ESC on the keyboard or pressing the X next to the progress bar ![image](/attachments/cf12ed42-608d-4672-a6fd-c4cdcd7f0780)

Hey peeps!

Getting close to closing this issue as "complete".

There's still the progress bar to go, and a couple more bits'n'bobs that are open on my machine trying to make it in 3.6. Either way it won't be long now.

If there's any more changes you want, now is the time to shout out before I close it up!
image

Hey peeps! Getting close to closing this issue as "complete". There's still the progress bar to go, and a couple more bits'n'bobs that are open on my machine trying to make it in 3.6. Either way it won't be long now. If there's any more changes you want, now is the time to shout out before I close it up! ![image](/attachments/74dfe189-cdfa-4db7-8ab0-22950174cd95)

Wonderful)
Is it planned "packing with grouping by material", or it better be a separate proposal/task?
How this one can be tested?

Wonderful) Is it planned "packing with grouping by material", or it better be a separate proposal/task? How this one can be tested?
Member

If there's any more changes you want, now is the time to shout out before I close it up!

If I could request a feature, this would be great to add:

image

image

A usecase is this:
The artist is modeling a complex character with a suit. After the uv layout is done, and texturing has started the client/art director want to add some emblems to the suit. The artist wants to add the emblems without loosing existing texture and uv layout. By pinning the existing uv's and packing the new emblem geometry/uv to the existing uv layout, the existing uv's are kept and the emblems are packed to the free uv space.

> If there's any more changes you want, now is the time to shout out before I close it up! If I could request a feature, this would be great to add: ![image](/attachments/5e6a6d75-baf5-4372-a801-8e0bb2dfe2d7) ![image](/attachments/ae95ed3d-0ea6-4813-a597-52c65b75d476) A usecase is this: The artist is modeling a complex character with a suit. After the uv layout is done, and texturing has started the client/art director want to add some emblems to the suit. The artist wants to add the emblems without loosing existing texture and uv layout. By pinning the existing uv's and packing the new emblem geometry/uv to the existing uv layout, the existing uv's are kept and the emblems are packed to the free uv space.

it would be a good idea to add the ability to manually specify the UDIM in which to pack the islands, directly from the Redo panel
1 Variant:
Screenshot_20230417_110117.png

2 Variant:
Screenshot_20230417_110117_gfd.png
This concept can turn into something cooler, for example, a modal operator that will allow you to select the target UDIM/UDIM's with the mouse on the screen

it would be a good idea to add the ability to manually specify the UDIM in which to pack the islands, directly from the Redo panel 1 Variant: ![Screenshot_20230417_110117.png](/attachments/dd995fa9-2161-459b-b13d-746e9e980ddb) 2 Variant: ![Screenshot_20230417_110117_gfd.png](/attachments/af1ddffb-43e2-495c-a74e-78ac61d62f4e) This concept can turn into something cooler, for example, a modal operator that will allow you to select the target UDIM/UDIM's with the mouse on the screen
Member

it would be a good idea to add the ability to manually specify the UDIM in which to pack the islands, directly from the Redo panel

We already have the functionality of choosing to

  • pack to the closest UDIM (based on selected uv's center position)
  • pack to the active udim (based on 2d cursors position)

Therefore I don't think we need additional uv target options in the pack islands operator.

In order to target a specific udim, your active texture needs to be a udim texture, or you need to increase the tiles in the uv editors overlay options.

> it would be a good idea to add the ability to manually specify the UDIM in which to pack the islands, directly from the Redo panel We already have the functionality of choosing to - pack to the closest UDIM (based on selected uv's center position) - pack to the active udim (based on 2d cursors position) Therefore I don't think we need additional uv target options in the pack islands operator. In order to target a specific udim, your active texture needs to be a udim texture, or you need to increase the tiles in the uv editors overlay options.

Therefore I don't think we need additional uv target options in the pack islands operator.

I also think that current realization in this area sounds workflow-complete and flexible enough.

Not sure about Shape method = Exact shape (Concave) though.
It is nice for the final result, but during unwrapping convex brings cleaner picture about islands shapes.
How it can be tested?

> Therefore I don't think we need additional uv target options in the pack islands operator. I also think that current realization in this area sounds workflow-complete and flexible enough. Not sure about Shape method = Exact shape (Concave) though. It is nice for the final result, but during unwrapping convex brings cleaner picture about islands shapes. How it can be tested?

Not sure about Shape method = Exact shape (Concave) though.
It is nice for the final result, but during unwrapping convex brings cleaner picture about islands shapes.
How it can be tested?

Can you expand on this a little? I'm not quite following the change you would like to see here?

> Not sure about Shape method = Exact shape (Concave) though. > It is nice for the final result, but during unwrapping convex brings cleaner picture about islands shapes. > How it can be tested? Can you expand on this a little? I'm not quite following the change you would like to see here?

I mean that Convex method better fits unwrapping process because it pack islands in a way that makes the shape of the separatare islands more recognisable (which is better for seams debugging process), and Concave method better fits packing of the final result.
So during unwrapping you usually do lots of Convex packing which ends with final Concave packing.

Don't have a strong opinion on this though, since Convex method is quite available.

I mean that Convex method better fits unwrapping process because it pack islands in a way that makes the shape of the separatare islands more recognisable (which is better for seams debugging process), and Concave method better fits packing of the final result. So during unwrapping you usually do lots of Convex packing which ends with final Concave packing. Don't have a strong opinion on this though, since Convex method is quite available.

If I could request a feature, this would be great to add:

image

Done ! 5abb3c96cf

> If I could request a feature, this would be great to add: > > ![image](/attachments/ae95ed3d-0ea6-4813-a597-52c65b75d476) Done ! 5abb3c96cfa5e16f4432241aafab8712c70945e9

And after 4+ years, I am CLOSING this issue! :D :D :D

And after 4+ years, I am *CLOSING* this issue! :D :D :D
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-05-07 08:17:42 +02:00

Hello!
First, I really love the improvements on the packer tool.

Here are the most important issues I feel need addressing in future:

  1. It doesn't the ability to force packing vertically or horizontally. It will bias the rotation to whatever is closest to the X or Y axis. This is problematic as 95% of the time, you want to align islands on a single axis (wood planks for example). Currently, you will have to manually rotate any islands that don't match your desired axis.

  2. Multi-UDIM packing

  3. Ability to change the packing shape - bottom to top/top to bottom/square (current implementation)

Thanks!

Hello! First, I really love the improvements on the packer tool. Here are the most important issues I feel need addressing in future: 1) It doesn't the ability to force packing vertically or horizontally. It will bias the rotation to whatever is closest to the X or Y axis. This is problematic as 95% of the time, you want to align islands on a single axis (wood planks for example). Currently, you will have to manually rotate any islands that don't match your desired axis. 2) Multi-UDIM packing 3) Ability to change the packing shape - bottom to top/top to bottom/square (current implementation) Thanks!

Hi Seithr, Welcome!

I'm glad you love the new packer :D

Those seem like some great ideas.

It feels like maybe the first one is more closely related to unwrapping rather than packing? Perhaps take a look at this one for some similar ideas : #109906

The third idea shares some similarity with #78408 .. I wonder if we could merge those somehow?

And then the second idea might need a bit more detail, but yeah, that's one thats requested fairly regularly, but doesn't yet have an open issue.

In any case, this particular issue ( #68889 ) is already 4 years old and very long. I'd be pretty surprised if it gets re-opened. I think the best path forward might be to open a new issue (or three!) or add to some of the existing UV issues where appropriate.

Awesome,
--Chris

Oh, and have a look on https://blender.community/c/rightclickselect ... there might be more there too...

Hi Seithr, Welcome! I'm glad you love the new packer :D Those seem like some great ideas. It feels like maybe the first one is more closely related to unwrapping rather than packing? Perhaps take a look at this one for some similar ideas : https://projects.blender.org/blender/blender/issues/109906 The third idea shares some similarity with https://projects.blender.org/blender/blender/issues/78408 .. I wonder if we could merge those somehow? And then the second idea might need a bit more detail, but yeah, that's one thats requested fairly regularly, but doesn't yet have an open issue. In any case, *this* particular issue ( #68889 ) is already 4 years old and very long. I'd be pretty surprised if it gets re-opened. I think the best path forward might be to open a new issue (or three!) or add to some of the existing UV issues where appropriate. Awesome, --Chris Oh, and have a look on https://blender.community/c/rightclickselect ... there might be more there too...

Hey Chris,
Thanks for the response and links.

I have to disagree about the suggestion of the X/Y packing alignment being an unwrap issue. I agree the unwrap should have this option by default. But its also very important to expose this to the packer as well as you are not always unwrapping in blender. Often In a studio environment we have to worth with other peoples models or ingest models from other studios and have to redo the UVs on a regular basis. Having to unwrap everything again just to have the correct orientation isn't a viable solution.

I'll open a few issues.

Looking forward to seeing how the packer comes along, you are a true hero tackling UVs in blender.

Cheers,
-Nick

Hey Chris, Thanks for the response and links. I have to disagree about the suggestion of the X/Y packing alignment being an unwrap issue. I agree the unwrap should have this option by default. But its also very important to expose this to the packer as well as you are not always unwrapping in blender. Often In a studio environment we have to worth with other peoples models or ingest models from other studios and have to redo the UVs on a regular basis. Having to unwrap everything again just to have the correct orientation isn't a viable solution. I'll open a few issues. Looking forward to seeing how the packer comes along, you are a true hero tackling UVs in blender. Cheers, -Nick
Member

Hello!
First, I really love the improvements on the packer tool.

Here are the most important issues I feel need addressing in future:

  1. It doesn't the ability to force packing vertically or horizontally. It will bias the rotation to whatever is closest to the X or Y axis. This is problematic as 95% of the time, you want to align islands on a single axis (wood planks for example). Currently, you will have to manually rotate any islands that don't match your desired axis.

  2. Multi-UDIM packing

  3. Ability to change the packing shape - bottom to top/top to bottom/square (current implementation)

Thanks!

1. Align rotation of uv islands
This is already possible. Before packing, align the rotation of the uv islands with uv > align rotation. The operator has multiple options. For example using world space geometry alignment for aligning uv islands. After the uv islands are aligned - pack the uv's with rotate = False

2. Multi UDIM packing
This is already possible. Increase the number of udim tiles in uv editor > overlay > tiles X/Y. Then you position the uv islands you want to pack to a specific udim and then pack to closest udim.

3. Packing horizontally/vertically,
This is a planned task #78408 (as @Chris_Blackbourn mentioned). The plan is to have this as a separate operators than putting too many options in the packing operator, This way you don't need to switch packing options back and forth all of the time, You can also use the current packing option "Pack to original bounding box" if you position the uv islands in a min x/y max x/y bounding box before packing.

> Hello! > First, I really love the improvements on the packer tool. > > Here are the most important issues I feel need addressing in future: > > 1) It doesn't the ability to force packing vertically or horizontally. It will bias the rotation to whatever is closest to the X or Y axis. This is problematic as 95% of the time, you want to align islands on a single axis (wood planks for example). Currently, you will have to manually rotate any islands that don't match your desired axis. > > 2) Multi-UDIM packing > > 3) Ability to change the packing shape - bottom to top/top to bottom/square (current implementation) > > Thanks! **1. Align rotation of uv islands** This is already possible. Before packing, align the rotation of the uv islands with uv > align rotation. The operator has multiple options. For example using world space geometry alignment for aligning uv islands. After the uv islands are aligned - pack the uv's with `rotate = False` **2. Multi UDIM packing** This is already possible. Increase the number of udim tiles in uv editor > overlay > tiles X/Y. Then you position the uv islands you want to pack to a specific udim and then pack to closest udim. **3. Packing horizontally/vertically,** This is a planned task #78408 (as @Chris_Blackbourn mentioned). The plan is to have this as a separate operators than putting too many options in the packing operator, This way you don't need to switch packing options back and forth all of the time, You can also use the current packing option "Pack to original bounding box" if you position the uv islands in a min x/y max x/y bounding box before packing. 2.

Hey Daniel, thanks for the detailed reply.

1) Unfortunately the current implementation of align rotation doesn't solve the issue. It seems using the "geometry" method of the tool only takes into consideration the objects local orientation. If we have objects at different angles in world space with transforms applied we have no way of orienting the UVs in one direction.
The other option in the tool is setting it to "auto" however this has the same issue as the packer, where it randomly aligns things to X and Y. So if I align a hundred pipes, many of them will be aligned in the wrong axis and I have no way of fixing that without manually rotating them 90 degrees.
Instead I think we need to have the option in the packer to force the orientation in X/Y based on the longest dimension of the UV bounding box.

2) This also isn't a viable solution. I work in VFX we often have to layout geometry that takes up 10-100+ UDIMs. Manually moving every single island to a individual UDIMs and hoping it fills the UDIM efficiently isn't a great solution especially when dealing with thousands of UV islands (I should mention that I tested using the technique you suggested and it seems to still only pack to the 1 UDIM closest to where the UV islands are in UV space, not multi UDIMs)
Proposed functionality:
-If you disabled "scale UVs", the packer should be smart enough to know that once 1 UDIM is filled, to move onto the next and continue packing until all islands are finished.
-If you enable "scale UVs", then you should be able to set a grid size (eg, 1x1, 2x2, 1x10, 10x10 etc) And it will automatically scale the UVs to fit into the desired tile count.

I hope that makes sense.

Cheers,
-Nick

Hey Daniel, thanks for the detailed reply. **1)** Unfortunately the current implementation of align rotation doesn't solve the issue. It seems using the "geometry" method of the tool only takes into consideration the objects local orientation. If we have objects at different angles in world space with transforms applied we have no way of orienting the UVs in one direction. The other option in the tool is setting it to "auto" however this has the same issue as the packer, where it randomly aligns things to X and Y. So if I align a hundred pipes, many of them will be aligned in the wrong axis and I have no way of fixing that without manually rotating them 90 degrees. Instead I think we need to have the option in the packer to force the orientation in X/Y based on the longest dimension of the UV bounding box. **2)** This also isn't a viable solution. I work in VFX we often have to layout geometry that takes up 10-100+ UDIMs. Manually moving every single island to a individual UDIMs and hoping it fills the UDIM efficiently isn't a great solution especially when dealing with thousands of UV islands (I should mention that I tested using the technique you suggested and it seems to still only pack to the 1 UDIM closest to where the UV islands are in UV space, not multi UDIMs) **Proposed functionality:** -If you disabled "scale UVs", the packer should be smart enough to know that once 1 UDIM is filled, to move onto the next and continue packing until all islands are finished. -If you enable "scale UVs", then you should be able to set a grid size (eg, 1x1, 2x2, 1x10, 10x10 etc) And it will automatically scale the UVs to fit into the desired tile count. I hope that makes sense. Cheers, -Nick

I think all of it worths at least mentioning and taking into account during long-term UV development, since there are indeed lots of aspects that forms workflow-dependent demands picture.

I think all of it worths at least mentioning and taking into account during long-term UV development, since there are indeed lots of aspects that forms workflow-dependent demands picture.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
22 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#68889
No description provided.