[UV Packmaster] Efficient UV packing solution for Blender (C++ based, multithreaded)

Ah, didn’t know that. Yes, I’m on Windows, but using the zip distribution. Thank you

RELEASE 2.4.4

  • A new option was added: Normalize Islands - Automatically scale selected islands before packing so that the average texel density is the same for every island.
  • Invalid topology reporting was improved so that the packer output is more informative.

All improvements are available in both packer editions: STANDARD and PRO.

14 Likes

Hi,

I am trying to automate unwrapping process which utilizes UVPackmaster.

I am getting into an issue where UVP fails to finish packing when I exit back to object mode before packing finishes:


At the same time, I don’t want my operator to leave me in the edit mode when I launch it from object mode.

class OBJECT_OT_QuickUVMap(bpy.types.Operator):
    bl_idname = "mesh.quick_uv_map"
    bl_label = "Quick UV Map"

    @classmethod
    def poll(cls, context):
        return len(bpy.context.selected_objects) > 0

    def execute(self, context):

        SelectedObjects = bpy.context.selected_objects

        for Object in SelectedObjects:

            bpy.context.view_layer.objects.active = Object

            # Create UVMap UV layer if there's none present
            if Object.data.uv_layers.find("UVMap") == -1:
                Object.data.uv_layers.new(name="UVMap")

            Object.data.uv_layers['UVMap'].active = True
            bpy.ops.uv.smart_project(angle_limit=45.0, island_margin=0.05, use_aspect=False, stretch_to_bounds=False)

            bpy.ops.object.editmode_toggle()
            bpy.ops.uv.select_all(action='SELECT')
            bpy.ops.uvpackmaster2.uv_pack()
            bpy.ops.object.editmode_toggle()

        return {'FINISHED'}

If I comment out “bpy.ops.object.editmode_toggle()” the packing finishes, but I am left in the edit mode.

Do you have any idea how could I tackle this? Is there some sort of event I could bind to so I can exit to object mode only after packing has finished?

Or perhaps better, would it be possible to have some sort of operator which would always pack all geometry (not only selected) of the given object which could be launched from the object mode, so that one would not need to use that clunky “emulate button presses” kind of scripting like:

bpy.ops.object.editmode_toggle()
bpy.ops.uv.select_all(action='SELECT')
bpy.ops.uvpackmaster2.uv_pack()
bpy.ops.object.editmode_toggle()

Thanks.

Your script works properly for me when I run your operator using the F3 search menu.

Make sure you have the latest UVP version installed: 2.4.4.

Yup, works now with 2.4.4. Thanks! :slight_smile:

I just bought the UV Packmaster.

Wow Wow wow. Super easy, barely an inconvenience.

Wish I had bought it much sooner. Thanks sooo much for a great add-on.

2 Likes

Thank you! Over the last few years we put a lot of effort to make UVP the most efficient UV packer out there, indeed. It’s great to see how useful it is for our users :slight_smile:

FOR USERS INFORMATION: Blender 2.9 is going to be released soon. Although the latest UVP version was officially released for Blender 2.83, I tested it with the latest Blender 2.9 beta build and didn’t encounter any problems. As such UVPackmaster should be fully compatible with Blender 2.9. In any case if you encounter an issue with it, I will be grateful for reporting it at [email protected]

6 Likes

No, sir. It’s us who should be thanking YOU for making our lives so much easier. :smiley:

1 Like

All UVPackmaster products and licenses are on sale starting from today! Visit our site to learn more.

6 Likes

hi, firstly thanks for fantastic product, and secondly, i have very minor bug report. i develop addons and i use Reload Scripts very often, this is output i get in terminal when i run reload scripts:

Exception in module unregister(): '/Users/REDACTED/Library/Application Support/Blender/2.83/scripts/addons/uvpackmaster2/__init__.py'
Traceback (most recent call last):
  File "/Applications/Blender/blender-2.83.5.app/Contents/Resources/2.83/scripts/modules/addon_utils.py", line 434, in disable
    mod.unregister()
  File "/Users/REDACTED/Library/Application Support/Blender/2.83/scripts/addons/uvpackmaster2/__init__.py", line 172, in unregister
    del UVP2_Preferences.stats_array
AttributeError: stats_array

identical error is when you disable uvp in preferences
uvp 2.4.4 pro, mac os x

Thank you for reporting it. Does it happen every time for you or occasionally?

every time, i think…

RELEASE 2.4.5

Improvements for the PRO edition:

  • Add support for Lock Groups: lock an arbitrary group of islands so their relative position is maintained during packing (islands don’t have to overlap in any way):

obraz

  • Add a new grouping mode: UDIM Tile - islands placed in the same UDIM tile will belong to the same group.
8 Likes

Download the latest version 2.4.5 - the bug should be fixed.

Is it possible to pack in a square without scaling for the entire uv coordinates?

You can try using a square packing box

1 Like

There is no such option currently, but there is a great chance that I will add it in the future :slight_smile:

2 Likes

It would be convenient if there was a Scale Enable checkbox like the existing Rotation Enable checkbox in Basic Options.

I understand. Note, that there is already the Fixed Scale option available in the packer - it also prevents islands from being scaled, though the packing approach is not packing to the smallest square possible, but filling the packing area from bottom to top. You might find it useful as a workaround for now.

What if you can select then put each islands into four groups, each group pack their relative islands into a compact square, then each square fill a quarter of the UV square? (like the screenshot posted by so3Datel)