UV packing

Thank you for quick reply. I’m using Linux. Shortly after posting I have tried to remove all old files before installing new ones, and this this fixed the problem… except json_out issue, but since there is easy workaround for it and you say in future release you fix it for good, consider my issues solved.

Blender internal packing will separate your stacked uv islands, that is not an option for us in game development where saving uv resolution space is important.

@fiendish55: Yes that’s true I have to keep that in mind. Good point. Although is there a workflow where you unwrap in Blender and it directly gives you overlapping islands? Overlapping islands are often generated after unwrap for example applying a mirror modifier.

It’s still something I really need to take a look into why it behaves that way. It would be better if there was no need to CTRL-P at all after unwrap.

New release on Gumroad that should fix Lissanros issue. Also new stuff:

  • Separate overlapping UV islands (based on overlap detection setting)
  • Collapse UV islands, everything that is outside 0-1 UV boundaries, gets moved back in by steps of 1

Awesome! This will speed up my workflow a lot! Thank you :wink:

Hi! Could you update info about what each button and checkbox do, please)

Awesome! Baking will be much easier now!

Cheers,
n1k

@ambi Hi! After BA migration my message magically dissapeared…
I bought your addon long time ago and it is very help on my work.
Recently new UV pack solution was released - [UV Packmaster].
It is C++ based and multithreaded. Could you please take a look and give some commentary?
Because the only real problem for me is speed (mostly need to pack around 1000 islands).

I’m working on a C++ module that should speed up the packing speed considerably. There are still some bugs to work out, but it should be out soon-ish.

2 Likes

Great to hear about that big improvement!
I got a quick look to UV Packmaster addon, and as my knowledge it is simply run a command line C++ program on background?

hey ambi,

somehow “use texture dimensions” is not working. even if i turn it off and enter a width of 2 and height of 1 it always packs 1:1.

EDIT: seems i have to turn off “faster annealing” then it works :slight_smile:

also what is pruning? :flushed:

Hey actimelvanille. Currently I’m rewriting a lot of the algorithm functionality. The dimensions setting should work in the new version.

Pruning makes the algorithm faster by simplifying polygons by merging sequences of segments that are close to one single line. The pruning value is simply the multiplier of the island margin, how much imprecision is allowed.

More pruning = faster packing. Less pruning = tighter pack. Basically having something like 0.01 is default as it doesn’t really affect packing ratio, but can make it a lot faster.

ah okay. thanks for the answer, ambi! :slight_smile:

Update: Added Shotpacker C++ accelerated beta version to Gumroad. (shotpacker-accel-beta-win64.zip) Currently only Windows 64-bit supported.

Requires Microsoft Visual C++ Redistributable for Visual Studio 2017 installed. https://aka.ms/vs/15/release/vc_redist.x64.exe

If the C++ module activates properly, there should be a “Use accelerator” check-box in Shotpacker Packing > Performance. Set the max threads to what your CPU has, more has really no use.

The initial install should be possible straight from Blender, but any subsequent ones must be done through removing the Shotpacker folder and unzipping the new one there, while Blender is turned off, because Python captures the module while Blender is running and it can’t be turned off until Blender (Python running inside Blender) is closed.

Performance should be quite a bit faster than the Python/Numpy version.

If the C++ module can’t be loaded, it falls back to the old Python/Numpy version.

6 Likes

Waaay faster, nice

Works like 10 times faster! Impressive work!
I’m curious about threads count. I’m not much know about that, but is that some kind of limit?

Thread count is how many threads it will use on CPU.

Hi! Yup, I know. My question is about it’s limit.

It limited by number of threads your CPU have unless there is some other limitations in code. It’s probably mainly option to leave few threads for background operations while it packs.

Using 32 threads (max value that I can set) is on 1500 islands and 256 iterations gives me 64 sec. Same with 8 threads. Did I miss something?:no_mouth: