Packing

AVX2
This feature uses AVX2 instructions.
UV Packing is a robust and polygon count independent solution to pack UV shells optimally on the given 0..1
UV space.
Example
In this example, 2468 UV sheels are packed from 94 objects, overall 224903 polygons in just 6.1 seconds.
Pack UV and PackUV (Heuristics)¶
Pack UV by deisng has two different modes you can work with. They both do the same things, but with different approach and different outcome.
Pack UV is the base version of UV packing. It fills up the available space with the selected UV shells or all of the UV shells if nothing is selected and tries to fit as much to the available UV space as possible. This means that if something cannot be fitted to the UV space, then it will just drop that UV shell to the 0,0 coordinate.
Numeric Properties¶
Packer Res¶
Packer Resolution determines the resolution of the packing area. The bigger value increases the precision of the packing. Normally 512 px is perfectly enough. This value is in direct relation with the Padding value.
Padding¶
Padding is the additional extension of the UV shell in pixels. This means that the UV shell will be expanded by 1px to prevent overlaps.
Padding / Resolution relation
Packer Res and Padding is in direct connection. To keep the same distance between UV shells while increasing the Packer Res, you also have to increase the Padding as well. Also by increasing the resolution, increases the time that is necessary for packing. The following table shows the relation.
Packer Res | Padding | Time |
---|---|---|
512px | 1px | 1x |
1024px | 2px | 4x |
2048px | 4px | 16x |
4096px | 8px | 256x |
Below you can see, that not much has changed, only the packing has become a bit stricter. In most cases the default values are perfectly fine you don't need to change these values
Num Threads¶
The number of threads decreases the time, necessary for the packing and increases heuristics precision. Normally if you increase this value, you can decrease the Heuristics Depth as well.
Heuristics Depth¶
This is a numerical search depth and linearly scaling. The more layers you add, the more precision you get. This means that the system will increase the decimal depth with each step.
Heuristics Depth Precision
Heuristics Depth | 1 | 2 | 3 | 4 |
---|---|---|---|---|
Numerical Precision | 0.1 | 0.01 | 0.001 | 0.0001 |
The algorithm scales the UV shells by these percentage, while packing. The first depth finds the best scale for the first decimal to pack the UV shells. The second depth finds the second best decimal, the third finds the third decimal etc. Normally 3 decimals are perfectly enough with 8 threads. This is the best setup, so you don't have to change it.
Warning
If you change the number of threads, the system will use different decimal settings, like 0.0909 if you set it to 9 or 0.11 if you set it to 7.
Switch Properties¶
Normalize Clusters¶
Cluster normalization first rescales all the UV shells to match the same Texel Density Ration for all the UV shells. If you leave this off, the system will keep the ratio of the UV shells to each other and it will try fit the UV shells to the UV space.
Note
The Texel Density will obviously change with the scale. Only the ratio of the scale of the UV shells will be kept.
Rotate To Optimal¶
Rotate to optimal uses an algorithm, so called rotating calipers. This algoithm always try to find the best possible bounding box area
to UV area
ratio. In UVReactor the algorithm is slightly modified, since it tries to find the minimum height of the UV shell, so basically the outcome will be a horizontally aligned UV shell. This approach provides the best UV area ratio in many cases.
Pack Selected¶
Using the Pack Selected switch, will force the algorithm to pack only the selected UV shells to the available UV space. Note that using the Pack UVs algorithm will keep the already packed shells in their place and it will tries to find a place for the selection. This way you can add UV shells to your already packed UV space, where you may have space left.
Pack To UDIM¶
Pack to UDIM as the name says, will pack you UV shells to the UV space where they are currently.
Note
The center determines the UV shell about which UDIMs part it is.