uvunwrap
Fast automatic UV unwrapping and atlas packing for lightmaps, texture baking and texture painting: Python bindings for the uvunwrap Rust crate. Prebuilt wheels, no compiler needed; Python 3.11+, no required dependencies.
pip install uvunwrap
Usage
import uvunwrap
# A unit quad as two triangles of one polygon.
positions = [[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]]
indices = [0, 1, 2, 0, 2, 3]
mesh = uvunwrap.Mesh(positions, indices, polygons=[0, 0])
atlas = uvunwrap.generate([mesh], page_size=1024, padding=2)
out = atlas.meshes[0]
out.uv # array('f'): u, v per output vertex, in [0, 1]
out.xref # array('I'): the input vertex each output vertex came from
out.indices # array('I'): the same triangles, indexing output vertices
out.corner_uvs # array('f'): u, v per triangle corner
Output meshes keep the input triangles in order; vertices on chart seams are
duplicated, and xref maps each one back to its input vertex so other
attributes can be copied. corner_uvs gives one UV per triangle corner
directly, for UV maps stored per polygon corner (e.g. Blender's).
Inputs accept anything with the buffer protocol (array.array, numpy arrays
of any common dtype, memoryview) or plain sequences, flat or nested.
Background jobs, progress and cancellation
job = uvunwrap.start([mesh])
while not job.done:
print(job.progress) # e.g. Progress(parameterizing, 1200/5856)
... # or job.cancel(); result() then raises uvunwrap.Cancelled
atlas = job.result()
The unwrap runs in a background thread, so a UI stays responsive.
Options
Keyword arguments of generate and start:
| Option | Default | |
|---|---|---|
page_size |
1024 |
Page size in texels. |
texels_per_unit |
None |
None: the highest density that fits one page. A number: that fixed density, on page_size pages (page_size=None: one page that grows to fit). |
padding |
2 |
Empty texels around each chart. |
packing |
"shape" |
"shape" (densest) or "fast" (milliseconds for thousands of charts). |
max_chart_angle |
70.0 |
Maximum angle in degrees between a face and its chart's average normal. |
max_area_distortion |
4.0 |
Maximum per-triangle area distortion before a chart is split. |
allow_rotation |
True |
Rotate charts by multiples of 90° while packing. |
max_chart_size |
0 |
Largest chart side in texels (0: no limit). |
block_align |
False |
Give every chart whole 4×4 texel blocks (for BC/ASTC compression). |
Mesh also takes polygons (the polygon each triangle came from, so
polygons stay whole), face_materials, ignored_faces, scale,
instance_scales and existing_uvs; see the
crate documentation for their details.
License
MIT
Metadata
Release files for uvunwrap 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| uvunwrap-0.2.0.tar.gz | 99.5 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| uvunwrap-0.2.0-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| uvunwrap-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| uvunwrap-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| uvunwrap-0.2.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| uvunwrap-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 4.9 MB
Release files / uvunwrap-0.2.0.tar.gz
| Download URL | uvunwrap-0.2.0.tar.gz |
|---|---|
| Size | 99.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a04a9d3abefe2b1262de6a3ac7c82f20afc7e239c55174a7f77351e10a890973
|
|
BLAKE2b-256 checksum How to use checksums |
ce6a68e6cfd16ec3c659cb7bf8ebddea3d791557a8fd469dc1a66d224485a193
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / uvunwrap-0.2.0-cp311-abi3-win_amd64.whl
| Download URL | uvunwrap-0.2.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 930.1 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7bc9962bb93db478f7f2c225e4417a85c5e0309f5372b9b2fcbfb860bf0203a1
|
|
BLAKE2b-256 checksum How to use checksums |
7915055d5c9f4b354b168c9a23f95a925bb65d40b79f152b5872d3d0245df103
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / uvunwrap-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | uvunwrap-0.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7295195d7f41f0b629fe575ccda7defbef291bacdbd06d7acd99a4d9054b3a60
|
|
BLAKE2b-256 checksum How to use checksums |
54d9952e9deb50925da67ffe6e8fdf1e699b95d2cf7c53a004d1cc737ffd5b04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / uvunwrap-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | uvunwrap-0.2.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 851.6 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
e984d20876477be790254f7d3e4b745d374be70376b9b0f9cd8be354569f0973
|
|
BLAKE2b-256 checksum How to use checksums |
1bc964db31c04bd98b05a35828592a3de0da24521b704b2fd8009e84985750fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / uvunwrap-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | uvunwrap-0.2.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 742.0 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
98698a0df2c56e0437c270f0f90f898f3d2b927853f2195f61ddd257cbb384fa
|
|
BLAKE2b-256 checksum How to use checksums |
605881e34dbcb58a3b2b430947f8b3e5c95f7174c6f84fc2cb7321c4738b8130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / uvunwrap-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | uvunwrap-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
c5f3bf31dd9b88ab5ad11bf79034c1d34b6727e2d6462060ae0d560fd998fb3c
|
|
BLAKE2b-256 checksum How to use checksums |
23e3b4079669e0acc0973158830d936f2062affe51ec57117a81b953457fe363
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logSecurity for uvunwrap 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for uvunwrap-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.