High-performance OBJ merge and texture atlas pipeline
Project description
almeshmerge
High-performance OBJ merge and atlas generation library.
Build
$env:CMAKE_BUILD_PARALLEL_LEVEL = [Environment]::ProcessorCount
chcp 65001 && uv build --wheel --out-dir dist
Release Wheels (Windows/Linux)
- GitHub Actions workflow:
.github/workflows/wheels.yml - Uses
cibuildwheelto build platform wheels:- Windows: installs OpenCV via Chocolatey and bundles dependent DLLs via
delvewheel - Linux: installs OpenCV dev package in manylinux image and repairs wheels via
auditwheel
- Windows: installs OpenCV via Chocolatey and bundles dependent DLLs via
- Triggered on tags like
v0.1.19or manually viaworkflow_dispatch
PyPI Auto Publish (Trusted Publisher, 2FA Compatible)
This project uses PyPI Trusted Publisher (OIDC), so no long-lived PyPI token is required.
One-time PyPI setup
- Open PyPI project settings ->
Publishing->Add a new pending publisher. - Configure:
- Owner: your GitHub org/user
- Repository:
almeshmerge - Workflow name:
Build And Publish Wheels - Environment name:
pypi
- Save and confirm.
Release flow
- Automatic release: push a tag that matches
pyproject.tomlversion:- If version is
0.1.19, pushv0.1.19.
- If version is
- Manual republish: run
Build And Publish Wheelswith:artifact_run_id: existing successful build run idrebuild:false- Optional
release_tag: must still matchv<project.version>
Safety guards
- Workflow validates
tag == v<project.version>before publishing. - Publish job uses minimal permission (
id-token: write) only. - GitHub Environment
pypican enforce manual approvals.
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=8,
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 byoobjects.split_g: Whether to split byggroups.front_axis/up_axis: Input axis convention, defaults toY-front andZ-up.right_handed: Use right-handed axis transform.atlas_max_size: Max atlas side length.atlas_padding: Padding pixels between packed textures.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 (0means unlimited).spatial_cluster_radius: Spatial clustering radius for unit-wise texture packing (<=0disables 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.posis default and keeps topology vertex count stable while writing splitv/vt/vnindices;pos_uvignores normal in dedup;fullkeeps position+UV+normal in a unified index.
Project details
Release history Release notifications | RSS feed
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file almeshmerge-0.1.20-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: almeshmerge-0.1.20-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 137.8 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
002d20bc0a247029af6a5388217f757eed154c7e4a2926111b893357c632a317
|
|
| MD5 |
360b807ef242bb4c8eacdf587ca52473
|
|
| BLAKE2b-256 |
b8d3a4da9a5f0c12c3844860207d1d5d43c17617bd80d6157820d63426465661
|