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.3.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.3-cp39-abi3-win_amd64.whl (973.4 kB view details)

Uploaded CPython 3.9+Windows x86-64

anvil_reduce-0.2.3-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.3-cp39-abi3-manylinux_2_28_aarch64.whl (993.1 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

anvil_reduce-0.2.3-cp39-abi3-macosx_11_0_arm64.whl (956.0 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: anvil_reduce-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 47284b1438659ff4d927a1400d87ef8f8f3cee5ef510e22326d38132591868c7
MD5 f85bb93e253b2c384184623e725625f1
BLAKE2b-256 e04ed5402f0d8cd005c7442b3bd73f07cf12528dfd7ec8d84bbf280b4227c153

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.3.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.3-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: anvil_reduce-0.2.3-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 973.4 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.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 12909578c97cb460a827ab2f467156c874cc827c269f5ea82ae1495ad1901161
MD5 6b4bf5e29dfe6e5ee0f3b8be08204ca7
BLAKE2b-256 a9600c5da12cdc8f86aedc70e1647e7be6fc02528ce247c02d3320e0c8979cb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.3-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.3-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anvil_reduce-0.2.3-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b03c5d8bb7be5087abb842c9bab9ec930917fc22b778d9e46e0fabf9d7b98bb
MD5 94e02679b779faa7dc1c6b6b6078f20b
BLAKE2b-256 f78d37296aaac6d43dd40a7cc19a316f332933fb148ba9a1c85ec89eec1a7f32

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.3-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.3-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for anvil_reduce-0.2.3-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2042bcd27fa6158af4f1b7125c0ccbd04575d7467dd3253f0f446178d79b81d0
MD5 91aac6fcba8e12e4c248677d0a6fc6b6
BLAKE2b-256 59e7c000623333fe321464e64b82ecbf187c5e9ed133694ac15ffc0538f79a7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.3-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.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anvil_reduce-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 478fa7da752738545f599a28f61e4c51111fe93a11c4c21fc57b1cea58b63784
MD5 872d28017601da186ed7f5a5cf5bbd03
BLAKE2b-256 1fd38c39e3376904c9d351e8b7503499cd68b2787f17535b1e7c39cd0f52e0ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for anvil_reduce-0.2.3-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