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

add-ons
commercial

(glukoz) #1

[UPDATE]:

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.

[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:


UV packing
(renderhjs) #2

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.


(fiendish55) #3

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:


(carbon2) #4

looks very interesting, i’d like to file such request
thanks


(renderhjs) #5

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:


(renderhjs) #6

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


(Hoverkraft) #7

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


#8

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


(kabu) #9

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…


(JoseConseco) #10

I got also invalid topology error. Steps to reproduce:

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

#11

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


#12

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?


(glukoz) #13

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.


#14

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)

(sus_unn) #15

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.


(helluvamesh) #16

It’s in the UV editor.


(Stromberg) #17

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:


(TeaCrab) #18

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.


(glukoz) #19

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:


(glukoz) #20

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).