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

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.36-cp313-cp313-win_amd64.whl (146.3 kB view details)

Uploaded CPython 3.13Windows x86-64

almeshmerge-0.1.36-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (437.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

almeshmerge-0.1.36-cp312-cp312-win_amd64.whl (146.8 kB view details)

Uploaded CPython 3.12Windows x86-64

almeshmerge-0.1.36-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (438.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

almeshmerge-0.1.36-cp311-cp311-win_amd64.whl (146.6 kB view details)

Uploaded CPython 3.11Windows x86-64

almeshmerge-0.1.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (438.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for almeshmerge-0.1.36-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6f6400c11dfcde3e3c0ab207909c8f65a4b6749d9135049e4e5e82c9e8b206c9
MD5 478c65523324a18f439bb3c98fbfc587
BLAKE2b-256 08c4e626168c3eaeda9982641970ea6e8be14a1befeb667d3541500ecf56286b

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.36-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.36-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.36-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be906abb54ca68932ef65ed2849187854517ee5b12541a8f6934e12d069a1714
MD5 3658e1efb09c7381c27896e5f3d75894
BLAKE2b-256 34ecc9b6b829986727954ea77ef66d9a0266b85966688d0a53288fa881759f02

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.36-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_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.36-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.36-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 850037b5067d1fe8a646febab47977384d9d5e23e77a3fb2dab60a4029b3424b
MD5 f5c6029b942d33dd798c9de85c1e0ca6
BLAKE2b-256 89c25ead976aa33274851de01bc079308891bc1b51c1c48cd862816db3f6ac3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.36-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.36-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.36-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 548b58d23ba2f2332ab732f2d88dd34d9e1c5d9c576cb2c8b94438e4644a5071
MD5 e13c8e799a03e2d69f7ffe5d66677597
BLAKE2b-256 00791b4ee7c3226fc337130a190c18e93f8ad99484f54d80a372de5071b14095

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.36-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_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.36-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.36-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8a28c17af2c86182d641565e18e85ea1333577a2ccdc4868ccad44c03f41a006
MD5 b12b03543418c2249c15d83a85adf096
BLAKE2b-256 d56e884638ccd13618723e0f3a10b6c0c240058d70c09c8232796ebd7d4c9efc

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.36-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.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for almeshmerge-0.1.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 09cbd492e41630c61503b7c1ba05aa89b543e5dec7c15ed5294b5400989e508b
MD5 68b01feac4904074c89b7362e1b755b0
BLAKE2b-256 57f7c448fe920ed605f985eb477a98b3cf10ed061e631c8cef41c549cd0e7819

See more details on using hashes here.

Provenance

The following attestation bundles were made for almeshmerge-0.1.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_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