Skip to main content

Volume-based mesh proxy generator. Voxelize, marching-cubes, smooth, remesh. Fast, watertight, hands-off.

Project description

anvil-reduce

Watertight mesh proxy generator: exact narrow-band distance field, marching cubes, smooth, remesh, exact surface projection. Fast, verifiable, hands-off. Native Rust core, Python bindings via PyO3.

Install

pip install anvil-reduce

Inside DCCs:

mayapy -m pip install anvil-reduce          # Maya
hython -m pip install anvil-reduce          # Houdini
# Blender: install into the addon's bundled Python or vendor the wheel

Quick start

One-shot file pipeline (the path most pipeline TDs want):

from anvil_reduce import proxy_from_path

result = proxy_from_path(
    "hero.usd",
    "hero_proxy.usd",            # .usd/.usdc = binary, .usda = ASCII
    quality="balanced",          # "fast" | "balanced" | "high"
    transfer_normals=True,
)
print(f"{result['input_faces']} -> {result['output_faces']} in "
      f"{result['wall_seconds']:.2f}s")

NumPy-driven workflow:

import numpy as np
from anvil_reduce import Mesh, generate_proxy

mesh = Mesh.from_numpy(positions, indices)   # (N,3) f64, (M,3) u32
proxy = generate_proxy(mesh, quality="balanced", target_faces=20_000)
positions, indices = proxy.positions(), proxy.indices()

Functions

Function What it does
proxy_from_path(in, out, **kw) File-to-file pipeline, returns a stats dict
generate_proxy(mesh, **kw) Proxy for an in-memory Mesh
generate_lod_chain(mesh, levels=4, **kw) List of meshes: the original, then each level at half resolution
load(path) / save(mesh, path) Mesh I/O: .obj, .glb, .gltf, .usd, .usda, .usdc
Mesh.from_numpy(positions, indices) Build a mesh from numpy arrays

USD output is a Mesh prim with purpose = "proxy" and an authored extent, so usdview and DCCs bind it as proxy geometry directly. USD input is sniffed: crate (binary) and ASCII layers both load. No composition — flatten referenced assets with usdcat --flatten first.

Quality presets

Preset voxel_res smooth remesh
fast 64 3 0
balanced 128 5 3
high 256 5 5

Override individual knobs by passing them explicitly. target_faces hits an output face budget (resolution and remesh edge length are derived from it). offset is the standoff from the input surface in voxel cells (0 = surface-exact, default 0.1, larger = looser hull); close seals gaps in open meshes; project caps the final exact projection onto the offset surface.

The output is closed, outward-wound, and free of degenerate triangles; verify with the CLI's check command.

See https://github.com/voidreamer/anvil-reduce for the full project.

Project details


Download files

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

Source Distribution

anvil_reduce-0.2.4.tar.gz (104.4 kB view details)

Uploaded Source

Built Distributions

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

anvil_reduce-0.2.4-cp39-abi3-win_amd64.whl (973.5 kB view details)

Uploaded CPython 3.9+Windows x86-64

anvil_reduce-0.2.4-cp39-abi3-manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ x86-64

anvil_reduce-0.2.4-cp39-abi3-manylinux_2_28_aarch64.whl (993.2 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

anvil_reduce-0.2.4-cp39-abi3-macosx_11_0_arm64.whl (955.9 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file anvil_reduce-0.2.4.tar.gz.

File metadata

  • Download URL: anvil_reduce-0.2.4.tar.gz
  • Upload date:
  • Size: 104.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for anvil_reduce-0.2.4.tar.gz
Algorithm Hash digest
SHA256 dcc468d66d7601b407b4f91a4cc5ede8b70ade9516cebd68937898a2a5ca09cd
MD5 53d7b2b3a9b67df0167e8c5fffc4db76
BLAKE2b-256 c1b465cacdc9ae3a778526e3d806f32504c3547493b72980fd4e26ba9c97cc70

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.4.tar.gz:

Publisher: wheels.yml on voidreamer/anvil-reduce

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

File details

Details for the file anvil_reduce-0.2.4-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: anvil_reduce-0.2.4-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 973.5 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for anvil_reduce-0.2.4-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a4b5a99ccbb9a45c369798e9ed869e7a2d21eb9b53a65ceb5b4dfeb52a213be8
MD5 d442f89ccfa1b3695ec9da5d5e3681a2
BLAKE2b-256 246e16347413e10a4198683b46ca0d7f745405cc0ad37caf2ed36ecbc87d1dcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.4-cp39-abi3-win_amd64.whl:

Publisher: wheels.yml on voidreamer/anvil-reduce

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

File details

Details for the file anvil_reduce-0.2.4-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anvil_reduce-0.2.4-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6ce3ce0beae29b314888061ef4031bcedc0442f5d023b6d59100bd2c280bb328
MD5 92f66839459efc2b1d3bcb14cb6e5589
BLAKE2b-256 540aa1f0848c76fa3d40422da7c4604b7922d8ccfad17f0e40ba634c7f0d2f81

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.4-cp39-abi3-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on voidreamer/anvil-reduce

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

File details

Details for the file anvil_reduce-0.2.4-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for anvil_reduce-0.2.4-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e081829335037a55865adb8e93b7432e6239dd8c0fe0756492d9b0064b02f075
MD5 5d4a4ddf9030741fc0b363edf54cff15
BLAKE2b-256 34f6776140211189e8139044e9c9de2589fd0a2bfd1318c3e5185a11964dfb62

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.4-cp39-abi3-manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on voidreamer/anvil-reduce

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

File details

Details for the file anvil_reduce-0.2.4-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anvil_reduce-0.2.4-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 04c865cd6a74b569141b0096beb64de049ca9e04f86ca444f4959612e6d1d484
MD5 9e77fd6db3dc2e6e9f9d7607190a4d9d
BLAKE2b-256 637ce2df6fafd2105908c27361a4a7e03f9bd8ff6beac915ec65f97accdbf731

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.4-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: wheels.yml on voidreamer/anvil-reduce

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