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

add-ons
commercial

(red2blue) #304

Hi,
i have a qeuestion about this. I own UVPackmaster Pro. How much do I have to pay to upgrage to UVPackmaster 2? I payed 12$ during the sale. Will this be taken into account, and I lose the advantage of the sale?
Thank you!


(Bohdan Lvov) #305

whoa, that’s just BADASS


(glukoz) #306

RELEASE 1.91.3

This is a small release for people who still want to use UVPackmaster1 for now. It includes fixes for recent bugs found in Blender 2.8 version of the add-on:

  • a fix for packing multi objects being instances of each other.
  • a fix for having non-mesh object selected when packing

This release also increases the maximal value for the rotation step parameter to 180 (applies to both versions: Blender 2.79 and Blender 2.80).

(Note that all those improvements are already included in UVPackmaster 2.0).


(glukoz) #307

@Michael_Knubben Sure, UVPackmaster2 already contains this improvement. Note that UVPackmaster1 also contains it in the small update we’ve just released (1.91.3), so you don’t have to necessarily update to UVP2 only for this fix (though we highly recommend doing it :slight_smile: )

@red2blue We wouldn’t like people to lose the advantage of the sale, so you will only pay the difference between the normal add-on price.


(glukoz) #308

UVPACKMASTER 2.0 NEW FEATURES, EPISODE 2: Cuda packing

Yes, UVPackmaster2 will support different types of packing devices, not only CPU. You can select a packing device to use in the add-on interface:

Screenshot%20from%202019-02-02%2020-44-26

Currently the only non-CPU packing devices supported are Cuda-enabled GPUs (compute capability 3.0 or higher). Important thing to keep in mind is that the Cuda version of the packing algorithm is at the beginning of its way to being 100% optimized. It means that you shouldn’t always assume that packing on Cuda will be significantly faster than packing on CPU. The performance ratio depends on specific GPU and CPU models you have in the system and packing parameters. The rule of thumb is that the larger the ‘Precision’ value and the smaller the ‘Rotation Step’ value, the more advantage GPU packing takes over CPU packing.

As always we prepared some benchmarks for you:

System spec:

CPU: Ryzen 2700, 8 cores
GPU: GeForce RTX 2070

UV map:

SCENARIO 1:

Precision: 200
Rotation Step: 90 (4 orientations per island)

Packing times:

CPU: 35 ms
GPU: 31 ms

In this scenario the ‘Precision’ value is not so large, at the same time the ‘Rotation Step’ is quite large, that is why GPU is only slightly faster than CPU.

SCENARIO 2:

Precision: 200
Rotation Step: 10 (36 orientation per island!)

Packing times:

CPU: 238 ms
GPU: 101 ms

In this scenario I set the ‘Rotation Step’ parameter to a small value and now GPU is two times faster than CPU. Now let’s see what happens if we also increase the ‘Precision’ parameter:

SCENARIO 3:

Precision: 500
Rotation Step: 10 (36 orientation per island)

CPU: 1345 ms
GPU: 211 ms

After the ‘Precision’ value was increased you can see that GPU totally outperforms CPU :slight_smile:

Summary: packing on GPU is currently most useful when packing islands with a higher precision or if you want to consider many orientations of every island. It is especially useful when the heuristic search functionality is in use at the same time: when processing many orientations the heuristic search algorithm will examine a very broad set of solutions so the performance (i.e. time of a single packing iteration) is critical here. When packing on GPU the performance penalty from the large number of orientations will be small so the number of iterations performed in a given time will be much larger - you can find an extremely tight solution in a short time this way.

Another advantage of GPU packing is that your CPU resources are free during a heuristic search, so you can comfortably perform other tasks on your computer while UVPackmaster is searching for a solution.

In the UVPackmaster2 interface you will also find a benchmark tool, which will allow you easily compare packing times on different devices:

Screenshot%20from%202019-02-02%2021-41-59

Happy GPU packing :slight_smile:


(Bohdan Lvov) #309

Is it even legal to make solutions so awesome? I thought it was already fast in 1.9, but JEEZ.
I think unwrapping as a dedicated specialization died off right in this thread.

Only downside is that users of UV Packmasters won’t ever understand this meme


(Piotr Adamowicz) #310

That’s all very lovely, but how do I upgrade to 2.0?

Edit: Nevermind, email sent :slight_smile:

I suggest putting this info in the opening post.


(Michael Knubben) #311

Loving 2.0’s beta so far! Do you guys publish a roadmap somewhere?
My main request at this point is the ability to scale islands according to a value you apply yourself. The most logical solution to me seems a vertex group with different weight painting per island (ideally: to be set from and displayed in the UV window)
Do you think this would be possible?


(glukoz) #312

The problem with this idea is that the relation between 3D verts and UV verts is not 1-1: there can be a few UV verts belonging to different islands, such that each of them corresponds to the same 3D vert.


(Michael Knubben) #313

Hmm, good point. I know vertex colour can offer colour-per-face rather than vertex, would this be an option?


(glukoz) #314

As far as I know vertex color is also defined per-3D vertex. Could you describe a situation when the functionality proposed by you would be useful?


(glukoz) #315

UVPACKMASTER 2.0 NEW FEATURES, EPISODE 3: Non-square packing redesign

Non-square packing workflow was redesigned in UVPackmaster2. What was the reason for this? The original non-square packing functionality from UVPackmaster1 had following drawbacks:

  • after islands were packed into a non-square texture the user could not pack them again without manually reseting them to default proportions. Islands deformations would be introduced in such situation

  • ‘Pack To Others’ option was not supported when packing into a non-square texture.

The new design introduced in UVPackmaster2 addresses those issues. The procedure for non-square packing in the new version is as follows:

  • unwrap your islands in the usual manner so they are not deformed when displayed at the unit UV square
  • open or create a non-square texture in the UV editor. You will notice that islands will be deformed now
  • next step is adjusting islands to the texture i.e. applying non-uniform scaling so they have correct proportions with the given texture. You can do it manually, you can also use the addon to perform scaling automatically. In order to do that select all islands you want to adjust and click ‘Adjust Islands To Texture’ button. You will see that islands will have correct proportions after action is done (they will be no longer deformed with the given non-square texture). Note that this operation must be performed only once for the given islands
  • enable the ‘Use Texture Ratio’ option
  • from now you can run the packing operation normally. You can pack islands multiple times and their proportions will always be correct with the given non-square texture

As I already noted now you can use the ‘Pack To Others’ option also when packing to a non-square texture. But rembember that all new islands you want to add to the UV map must be adjusted to the given non-square texture first (for example by using the ‘Adjust Islands To Texture’ operation)

You can also easily undo the adjustment operation using UVPackmaster2. In order to do that select given islands and click ‘Undo Islands Adjustment’ button. After the action is done islands will be deformed again when dispalyed at the non-square texture. When you close the texture you will see that the islands will have proper proportions at the unit UV square. Note that for the undo operation to work properly the texture used at the time of undoing must have the same ratio as the texture islands were orginally adjusted to.

You can get UVPackmaster2 from here.


(Michael Knubben) #317

There are typically islands you want to keep relatively smaller (insides of items, parts that won’t usually be seen) or larger (the face, other areas of interest), and it’s nice to know they’ll always be packed at their correct size. I tend to use alt-a a lot to keep things at a similar texel density, and that fucks up any manual sizing, so having it be defined per-island would be a real lifesaver!
As for per-face vertex painting: image
This button allows you to mask by selection, and only paints on those specific faces, meaning: with hard edges around it.


(glukoz) #318

I see, I will add this feature to our road map - thank you for suggestion


(glukoz) #319

UVPACKMASTER 2.0 NEW FEATURES, EPISODE 4: Python code refactoring

The core of UVPackmaster provides a very efficient packing algorithm, but before it can begin its work the Python part of the add-on must prepare UV data accordingly. This initialization part causes some overhead. In the first release of UVPackmaster the initialization phase wasn’t noticable with average UV maps - packing started immediately after the button was pressed. Unfortunately the problem was visible if the UV map contained a lot of islands (1000+), in such situation Python overhead could be noticed and in extreme cases (a map with a huge number of islands) it was really significant. To mitigate this issue we refactored a lot of Python code in UVPackmaster2. Also some work done previously in the Python phase was moved to the core which resulted in a significant speed up.

In order to give you an idea of the performance boost resulting from refactoring we will show you an extreme example (a UV map with more than 4000 islands - the number is so huge that it is hard to see a space between them in the picture):

The initialization phase for this map takes about 10 second in UVPackmaster1. The user needs to wait so long before packing even starts. With UVPackmaster2 the initialization is performed in less than a second :slight_smile:

You can get UVPackmaster2 from here.


(IdleJohn) #320

Very cool stuff!
Is there any way of automatically grouping connected geometry parts together?
(I know you have material grouping but that takes time on complex objects with many separate parts)


(Dheim) #321

What’s the method for getting shell rotation to work? My assumption was that if I set the Rotation Step to 90 that it would take my existing shells and only rotate them in 90-degree increments, yet I’m finding that not to be the case. My shells end up in all sorts of angles but that’s not what I’m looking for.


On the left is the initial layout of the shells just from me cutting them up. You can see the 90-degrees set there. On the right is what I get after packing all of those shells. You can see the “T” shaped ones get put at random angles, but I wanted to keep them at 90-degree increments of what they are from the orientation on the left side.


(Michael Knubben) #322

You’ll need to make sure you turn ‘pre-rotation disable’ on, and it should work then.


(glukoz) #323

@IdleJohn Currently there is no such option available

@Dheim As Michael already pointed out, you can achieve what you want by enabling the ‘Pre-Rotation Disable’ option.


(Dheim) #324

Thank you both!