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

[UPDATE]:

UVPackmaster 3 has just been released! :slight_smile:

For answers to most important questions regarding UVPackmaster 3, visit the FAQs on our site (recommended especially if you are a UVPackmaster 2 user already).

Visit our site for the full set of UVPackmaster 3 features.

[UPDATE]:

For detailed info about the packer read: https://glukoz.dev/uvp/blender/

UVP videos:

[ORIGINAL POST]:

I developed a new UV packing solution for Blender. It is very efficient due to the core of the algorithm is performed by a multithreaded C++ application. (Is it the first C+Ā±based Blender addon ever? Do you know any other? ;). Still the solution is a usual Blender plugin from the user viewpoint - you install it like a standard add-on.

In order to prove how efficient it is I will give you 2 examples:

  1. It took less than 3 sec. on my quite old i5-2450M (two cores) to generate such packing:


  1. More extreme example: 1015 islands! On the same processor it took about 21 sec. to generate packing:


What is more the underlying algorithm used by the packer was designed with a bunch of useful features in mind, e.g. grouping islands by material, packing additional islands to those already packed. I am going to implement them soon.

Currently the add-on is supported on two platforms: Linux 64 bit and Windows 64 bit. I will add Mac support if there are many requests for it. If you still are on a 32 bit platformā€¦ well itā€™s time to refresh your hardware probably :wink:

Note that I didnā€™t have possibility to test the application on many systems and configurations, so some errors still might be present. If you encounter any issue please let me know. I will try to fix it as soon as possible.

The add-on will be available in two versions: basic and extended. The basic version has limited functionality, but it is available for free.

Functionalities NOT available in basic version:

  • rotating islands during packing
  • checking for overlapping islands (might be useful when you do some manual packing).

You can download the basic version from here: [EDIT]: the basic version is currently available on gumroad only: https://gum.co/uvpackmaster (free download).

I am going to upload extended version to gumroad in a few days. Beware :wink:

36 Likes

Hey this is exciting, also good idea for setving a free and pro version, will give more people a reason to try this.

Will give this a spin later today, anyway looking forward to more updates on this.

Looks very promising, what kinda planned features you have in mind for the future of this packing addon? IPack that and headus uv layout has some very good ideas you could try to implement to this as well :slight_smile:

looks very interesting, iā€™d like to file such request
thanks

So I just gave it a test run, it is indeed just a straight addon install but it really runs fast :slight_smile:

I did a test here, the tool appears in the Tools panel in edit mode within the UV image editor. You can see below a packed result with a time of about 6 seconds to pack. I got one error but the UV layout on the right is what it packed successfully.

Regarding the error:
In a test model that I have I did run into this error popup stating that selected islands have invalid topology. Here is a more in depth screen to show only the ā€˜invalid topologyā€™

Apart from that the UI could use some love, e.g. your own tab, bigger Pack button. Overall very promising and fast :slight_smile:

1 Like

Also I hope you donā€™t mind, here is some UI development feedback as I had a look through your UI code

Debug mode
Blender has this neat bpy.app.debug_mode build in which you can trigger using Ctrl + Alt + D. So when I wrap your debug code into this

https://farm1.staticflickr.com/965/26796935857_b187716cc2_o.gif

All I have to do is press Ctrl + Alt + D and change the value other than the default 0 to show the debug stuff. I use this a lot in TexTools to hide incomplete features in public releases.

https://farm1.staticflickr.com/867/40773885665_3f64964e3b_o.gif

Bigger buttons
To get bigger button in Blender, e.g. your Pack button to stand out more, wrap it into another layout e.g. row and set the scale. Itā€™s something that I recently discovered and have been applying to TexTools as well for dominant features.

https://farm1.staticflickr.com/835/27795863868_8169b416a3_o.png

Custom Tab
To have your own tab instead of inside the Tools tab just use your own name here:
https://farm1.staticflickr.com/883/40954188744_1b657f9e93_o.png

7 Likes

Just wanted to give a thumbs-up to glukoz for the already helpful addon and also to renderhjs for the additional support.

Really perfect! I would like to askā€¦

  • Will it support custom rotation angle?
  • Will it support offset for overlay Islands?
  • Will it support offset for islands size? (This is a thing that always have doubts, if a pack system can suport a little difference in texel density to make better packs)
  • Will it support Island groups?
  • Will it support a better margin input format? (in pixels)

PD: I have tried a 1000 iterations solutions, and instead of make a solution in the x3 time that 300 iterations (2s) the addon need near to one minute to give a solution Āæit is normal? Similar happens when I tried big margins.

PD2: maybe the multithread doesnā€™t work always? my monitor tell that only use 14% of the CPU

pD3: +1 to OSX support

Iā€™m on Os X and Iā€™d like to try itā€¦
Regarding other C++ plugin, there should be fewā€¦
Growth Nodes, Animation nodes, openvdb remeshā€¦

I got also invalid topology error. Steps to reproduce:

  • use smart uv Project on Suzane - defautl settings.
  • do packing - error pops -> bad topo.

Smart UV in suzanne cerate bad topology (overlap and vertex merge in bad way)

on a i7-3770 cpu it also shows maximum 12/13% usage of the uvpack.exe.

Even thou its necessary in most cases to avoid overlappings,could there be for the cases where the user intentionally
wants to pack with overlaps, an ā€œignore overlappingā€ function be added?

First of all thank you for all comments.

renderhjs, thank you for your tips, I didnā€™t know about Blender built-in debug mode, it is very useful thing indeed. Also could you send me a blend file containing only the islands which were reported as having invalid topology? It would be nice to take a look on them. I guess that for some of them invalid topology state is perfectly expected (for example an island with all verts scaled to single point), but for other the issue might be on packer side.

DcVertice, yes, it is expected that algorithm run time grows faster than linearly with iterations increasing. It is more sophisticated than that. Anyway, 300 iterations is usually enough to get decent result.

Also you cannot see much mulithreading usage, because currently it is mostly used when enabling island rotations, and this feature is not present in basic version. It will come with extended version :slight_smile:

Regarding new features: what you can see now is just early phase of development. Working on this project is nice experience for me, thatā€™s why I am planning to develop a lot of features to make it more useful. The only question which bothers me is which functionalities should have priority now. In other words: which features are the most wanted? Maybe I should create a survey regarding this :wink:

I can see people successfully using the packer on Windows. Can anybody confirm that it also works on a Linux system? I would like to check whether it runs smoothly on an end user machine.

Thanks for your answer!

imho the priorities are

  • rotation
  • Pack only selected islands (and ignore or use not selected islands)
  • Overlap detection
  • Island groups
  • Overlap Groups (you tell a group of island that are equal and the pack system make the overlap)

Help
I enabled this add-on, I suppose it has to be in 3D View>Tools Panel in toolbar at Edit mode, but I canā€™t find its menu anywhere.

Itā€™s in the UV editor.

Very cool, Iā€™ve been wanting a improved uv pack inside blender, right now I use a external tool for uv packing.
I also got the same error as @renderhjs I also got this error
blender_2018-05-06_18-46-06

When it worked though it made a nice and tight pack, excited to try it when it gets rotation++ :slight_smile:

This is beautiful. It even works per-selected island.

Packing additional islands to those already packed. - This feature could be particularly useful.

Packing pre-grouped islands are also very useful. VERY.

Youā€™ll have my support when the gumroad version goes live.

The extended version is finally available on gumroad: https://gum.co/uvpackmaster

A few updates:

  • thanks to a new developer in the team we were able to implement additional feature for the first release: the heuristic search algorithm for an optimal packing.
  • we decided to enable island overlap check feature in the basic version as well so even if you are not going to buy the extended version I recommend doing an update.

Donā€™t forget to watch the presentation video :wink:

1 Like

Stromberg: were you able to reproduce this error or it just happened only once? If you can reproduce it, could you send a blend file? (scale all the geometry to single point if you donā€™t want to share your work).