UV packing


(Lissanro) #201

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.

(fiendish55) #202

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.

(ambi) #203

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

(ambi) #204

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

(50Groszy) #205

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

(jellbelle) #206

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

(n1k) #207

Awesome! Baking will be much easier now!


(Oleg Stepanov) #208

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

(ambi) #209

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.

(Oleg Stepanov) #210

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?

(actimelvanille) #211

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:

(ambi) #212

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.

(actimelvanille) #213

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

(ambi) #214

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.

(Dzmitry) #215

Waaay faster, nice

(Oleg Stepanov) #216

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?

(Dzmitry) #217

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

(Oleg Stepanov) #218

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

(Dzmitry) #219

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.

(Oleg Stepanov) #220

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: