Packing & algorithms
TexelPack gives you four packing strategies and a stack of refinements — rotation, straightening, stacking, grouping and destinations — to squeeze the most out of your atlas.
The four packing modes
| Mode | Speed | Quality | Best for |
|---|---|---|---|
| MAXRECTS | ★★☆ | ★★★ | Final assets, production quality |
| Guillotine | ★★★ | ★★☆ | Everyday use |
| Shelf | ★★★ | ★☆☆ | Fast iteration on simple meshes |
| Max Quality | ★☆☆ | ★★★ | Shape-aware packing by real geometry |
The quality mode selector (Fast / Balanced / Max Quality) sits at the top of the algorithm panel. In Balanced you choose the individual algorithm; Fast forces Shelf; Max Quality uses shape-aware mask packing.
Max Quality (shape-aware) mode
Instead of packing axis-aligned bounding boxes, Max Quality packs islands by their real rasterized shape, so small pieces slot into the holes and concavities of larger ones. Give it a time budget with search time and it keeps trying alternative layouts until time runs out, always keeping the best result found (an "anytime" search).
Rotation & straighten
- Rotation step — allow 90°, 45°, 30° or 15° rotations for tighter packing. Smaller steps pack tighter but take longer.
- Straighten — tilted islands are pre-rotated to their minimal bounding box before packing, so diagonal geometry packs as tight as axis-aligned geometry.
Stacking & lock
Stack identical islands
Repeated parts — bolts, bullets, modular pieces — are detected (including mirrored copies) and stacked onto a single UV slot, so they share texels and multiply effective texture resolution. A similarity tolerance slider controls how close two islands must be to count as identical: 0 is an exact match; raise it to stack organic, near-identical parts.
Lock overlapping islands
UVs you intentionally stacked on top of each other (mirrored halves, for instance) are detected by matching footprint and moved together as a rigid group, instead of being torn apart during packing.
Group packing
Pack one UDIM tile per object, material or collection — built for level-atlasing pipelines where each logical group needs its own tile.
Destinations & excluded regions
- Destination — pack into a specific UDIM tile or an arbitrary sub-region of the 0–1 UV space, leaving everything else untouched. Pinned islands are exempt.
- Excluded regions — reserve rectangular atlas areas (logos, trim sheets) that the packer must avoid. Add as many as you need in the advanced panel.
Pinned islands & UDIM
- Pinned islands — islands with pinned UVs (P in the UV Editor) stay exactly where they are; everything else packs around them.
- UDIM — distribute islands across multiple UDIM tiles when one tile isn't enough.
Margins & pixel precision
- Per-island margin — set spacing globally, or override it on individual islands.
- Pixel-exact padding — the spacing you ask for is the spacing you get (±1 px), which is critical for avoiding bake bleeding between islands.
- Pixel grid alignment — snap island positions to the atlas pixel grid for low-res textures and pixel art.
Performance
On heavy meshes, TexelPack uses vectorized (numpy) island extraction: a 100k-polygon mesh is analyzed in well under a second. Packing runs incrementally in a background thread, so the UI stays responsive and Esc really cancels.