Skip to main content

High-performance OBJ merge and texture atlas pipeline

Project description

almeshmerge

High-performance OBJ merge and atlas generation library.

Build

chcp 65001 && uv build --wheel --out-dir dist

Local Build Matrix (Windows host + Docker Desktop)

Use this when you want to avoid GitHub Actions quota and build all wheels locally.

Target matrix:

  • Windows: cp311, cp312, cp313, cp314
  • Linux (manylinux via Docker): cp311, cp312, cp313, cp314

One-command build:

powershell -ExecutionPolicy Bypass -File .\scripts\build_local_wheels.ps1

The script will:

  • build Windows wheels with local Python 3.11~3.14
  • build Linux wheels with cibuildwheel in Docker
  • copy all wheels to a host folder like artifacts/wheelhouse/<timestamp>

Optional arguments:

# custom output folder on host
powershell -ExecutionPolicy Bypass -File .\scripts\build_local_wheels.ps1 -OutputDir "D:\wheel-output"

# build only Linux wheels
powershell -ExecutionPolicy Bypass -File .\scripts\build_local_wheels.ps1 -SkipWindows

# build only Windows wheels
powershell -ExecutionPolicy Bypass -File .\scripts\build_local_wheels.ps1 -SkipLinux

# build then upload from host (requires host-side PyPI credentials)
powershell -ExecutionPolicy Bypass -File .\scripts\build_local_wheels.ps1 -UploadToPyPI

If you prefer manual upload, run:

powershell -ExecutionPolicy Bypass -File .\scripts\upload_wheels.ps1 -WheelDir ".\artifacts\wheelhouse\<timestamp>"

CI Release (GitHub Actions)

  • Workflow: .github/workflows/release.yml
  • Trigger:
    • Push tag: v* (recommended, for example v0.1.29)
    • Manual run: workflow_dispatch
  • Build matrix:
    • OS: Linux (ubuntu-latest) and Windows (windows-latest)
    • Python: 3.11, 3.12, 3.13, 3.14 (wheel via cibuildwheel)
  • Publish:
    • Uses PyPI Trusted Publisher (OIDC), no API token required in repository secrets.
    • A pre-publish guard checks that tag version matches pyproject.toml version.

Recommended release commands:

git tag v0.1.29
git push github v0.1.29

If a run fails due to transient CI issues, rerun the failed jobs from the GitHub Actions UI or use workflow_dispatch.

Python API

from almeshmerge import merge_obj_to_atlas

result = merge_obj_to_atlas(
    input_objs=["a.obj", "b.obj"],
    output_dir="out",
    split_o=True,
    split_g=True,
    atlas_max_size=8192,
    atlas_padding=4,
    atlas_pow2=True,
    atlas_allow_rotate_90=True,
    atlas_max_count=0,
    spatial_cluster_radius=-1.0,
    atlas_target_utilization=0.92,
    uv_repeat_exclude_merge=True,
    simplify_ratio=0.8,
    vertex_key_mode="pos",  # default: keep topology vertex count stable
)
print(result)

Parameters

  • split_o: Whether to split by o objects.
  • split_g: Whether to split by g groups.
  • front_axis / up_axis: Input axis convention, defaults to Y-front and Z-up.
  • right_handed: Use right-handed axis transform.
  • atlas_max_size: Max atlas side length.
  • atlas_padding: Padding pixels between packed textures.
    • Default is 4.
    • For Blender viewport preview, 8 or higher is often safer if you see tile-edge bleed.
    • In Blender, prefer Image Texture Extension=Extend or Clip for atlas materials.
  • atlas_pow2: Force atlas width/height to powers of two.
  • atlas_allow_rotate_90: Allow 90-degree placement rotation.
  • atlas_max_count: Max number of generated atlases (0 means unlimited).
  • spatial_cluster_radius: Spatial clustering radius for unit-wise texture packing (<=0 disables clustering).
  • atlas_target_utilization: Target utilization threshold used to trigger extra packing refinement.
  • uv_repeat_exclude_merge: Exclude UV-repeat units from merge and keep them as original textures.
  • simplify_ratio: Mesh simplification ratio before export.
  • vertex_key_mode: Export dedup key mode. pos is default and keeps topology vertex count stable while writing split v/vt/vn indices; pos_uv ignores normal in dedup; full keeps position+UV+normal in a unified index.

Diagnostics for Atlas Stability

merge_obj_to_atlas() now returns extra diagnostics that help locate parameter-sensitive texture issues:

  • diagnostics.atlas_rot90_count / diagnostics.atlas_rot90_ratio
  • diagnostics.uv_edge_01_hits / diagnostics.uv_near_edge_hits
  • compose_diagnostics.crop_size_mismatch_count
  • compose_diagnostics.crop_size_mismatches (first 20 samples)

Interpretation:

  • crop_size_mismatch_count == 0 means C++ crop estimation and Python crop execution are consistent.
  • uv_edge_01_hits == 0 means remapped UVs do not collapse to exact 0/1 boundaries.
  • Large changes in atlas_rot90_ratio across parameter sets are expected and indicate different packing paths.

Regression Matrix (Recommended)

For Blender preview stability, run at least:

  • atlas_padding: 4, 8
  • atlas_max_size: 2048, 4096, 8192

Pass criteria:

  • No visible large-scale texture scramble in Blender.
  • compose_diagnostics.crop_size_mismatch_count == 0.
  • diagnostics.uv_edge_01_hits == 0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

almeshmerge-0.1.38-cp314-cp314-win_amd64.whl (151.6 kB view details)

Uploaded CPython 3.14Windows x86-64

almeshmerge-0.1.38-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (439.1 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

almeshmerge-0.1.38-cp313-cp313-win_amd64.whl (146.7 kB view details)

Uploaded CPython 3.13Windows x86-64

almeshmerge-0.1.38-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (439.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

almeshmerge-0.1.38-cp312-cp312-win_amd64.whl (147.2 kB view details)

Uploaded CPython 3.12Windows x86-64

almeshmerge-0.1.38-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (439.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

almeshmerge-0.1.38-cp311-cp311-win_amd64.whl (147.0 kB view details)

Uploaded CPython 3.11Windows x86-64

almeshmerge-0.1.38-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (439.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file almeshmerge-0.1.38-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.38-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8990869ec8e9ddda21e462b28908e8fa487a4bf59c7bb667b371c4ae2372f000
MD5 f2ab00948313114b54d4cc97c3d981e2
BLAKE2b-256 2b935d25b8255689038ae68fd0eaa915522556d6557d98b3430b4683aeae66b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.38-cp314-cp314-win_amd64.whl:

Publisher: release.yml on alunAlunnnnn/almeshmerger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file almeshmerge-0.1.38-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.38-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8f3f062d64dc27ac113aa2882afb5885059bf6430f4a38ad7f8ea8c7cf4d4a4f
MD5 1a2697bbf682ad2728db3104f53feff3
BLAKE2b-256 083eb8c0fa35fffbb193e014346249126ad8d9468d7a915144fd7d82efaa2c95

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.38-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on alunAlunnnnn/almeshmerger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file almeshmerge-0.1.38-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.38-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e7808ad7cca750cc9ae1f0ddab9f030cf0130f2792855fb89a2848619df8b4c3
MD5 c64c683a42dd45d047b6817f7fd23202
BLAKE2b-256 7b732f51cc6a0c41748ab24ce97709f0183fbf5db61d7345951f7de0fccceb0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.38-cp313-cp313-win_amd64.whl:

Publisher: release.yml on alunAlunnnnn/almeshmerger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file almeshmerge-0.1.38-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.38-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 834231ae63004474cb98c2932bd32c6cea285a8a73aa51fe10160f462972bdc1
MD5 16df6b9cceb7b9443d18701f37f27896
BLAKE2b-256 bd721a16e20b1546556d4ec727954a5e1811a55d967b3185f84d34cc1e4d861d

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.38-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on alunAlunnnnn/almeshmerger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file almeshmerge-0.1.38-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.38-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d66aa1796d7a082c6ff5911c1fb7be6f21123955b2c17f0eb5a9d6b1cf553bee
MD5 baf4018d9918171f7edaf32b2565ccfc
BLAKE2b-256 94ece015739e2e1ef95f6e2b4b595bdeb8cb14ec3cc5f1d696bcdd1ff6d5e46d

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.38-cp312-cp312-win_amd64.whl:

Publisher: release.yml on alunAlunnnnn/almeshmerger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file almeshmerge-0.1.38-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.38-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 de79e86f501a197c3c5aa6bd1200641c6bf9fd4e0eb26355fa45ee21a92321ca
MD5 16149227e68b578f6c570f873e222f91
BLAKE2b-256 c979199d707efb23294c498cb915161d592fba4d41151360269fdb6a126bd42b

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.38-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on alunAlunnnnn/almeshmerger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file almeshmerge-0.1.38-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.38-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1c55e85fa6b9293e9e3b671d7ef25cd689269df0c90db993308807ffe5e4b455
MD5 edab67f2439ada665ecfed96456b7c1f
BLAKE2b-256 59deabfe5be528c38df9b05ad8511b0c4729617bb9cb6da92ec6d331c00bf52a

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.38-cp311-cp311-win_amd64.whl:

Publisher: release.yml on alunAlunnnnn/almeshmerger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file almeshmerge-0.1.38-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.38-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4094d3fb4a575cc23fd5ebecd4c00fb1cf61c322883857a03cd9e32b91a092a0
MD5 06bd66a8d9f50c04254d734b4e9efb42
BLAKE2b-256 15456f691c58b478226df98328d6a422318de808244b41059ce734f1aaa9976f

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.38-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on alunAlunnnnn/almeshmerger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page