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

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.

2 Likes