Files
MetaCrate/docs/imaging-meshing.md
Chili Palmer 88408c9680
Some checks failed
Native code generation / deterministic (push) Failing after 1m58s
Imaging and meshing gate / native (push) Failing after 4m10s
JPEG 2000 feature / linux (push) Successful in 3m0s
Native Rust workspace compile / compile (push) Failing after 6m12s
Skia feature / linux (push) Has been cancelled
Implement MeshFoundry pipeline (#77)
2026-08-10 22:37:43 +00:00

3.4 KiB

Imaging and meshing integration

Milestone 06 owns the native implementations in libremetaverse-imaging, libremetaverse-imaging-skia, and libremetaverse-prim-mesher. The core imaging and meshing crates contain no CLR bridge, subprocess adapter, foreign RPC, or generated failure-only shim. The rendering crates consume the checked mesh data but remain a separate milestone: SimpleRenderer now provides the reference prim/sculpt conversion pipeline. MeshFoundry now adds bounded mesh asset, rigging, tangent, secondary-UV, terrain, and convex-hull handling without changing the milestone 06 ownership boundary. See the SimpleRenderer guide and MeshFoundry guide.

Feature boundary

Surface Default build Opt-in build Native dependency
Managed images and TGA enabled n/a none
JPEG 2000 disabled libremetaverse-imaging/jpeg2000 OpenJPEG 2.5.x
BMP/GIF/ICO/JPEG/PNG/WBMP/WebP disabled libremetaverse-imaging-skia/skia Skia
Prim and sculpt meshing, OBJ ingestion enabled n/a none

OpenJPEG is excluded from the default workspace and is reachable only through the optional dependency. Skia is an optional, target-specific dependency; Linux and Windows use the Vulkan-capable binary configuration while macOS uses the corresponding non-Vulkan binary configuration. Dedicated workflows build both optional features on Linux, macOS, and Windows. The default imaging-meshing workflow proves that no native codec is needed for the owned Rust and translated compatibility tests.

Bounds and rendering contract

Decoded images are limited to 4,096 by 4,096 pixels and encoded inputs to 64 MiB. Channel sizes, resize products, codec buffers, sculpt-map dimensions, profile/path sizes, mesh vertex counts, face indices, viewer groups, and OBJ indices use checked arithmetic before allocation or indexing. Malformed input returns a typed error.

The rendering-facing integration tests verify that PrimMesh and SculptMesh produce finite positions, normals, and UVs; aligned face and viewer-face data; preserved prim-face grouping; in-range indices; and the 16-bit index range used by the pinned MeshFoundry reference at every supported sculpt topology and LOD.

Reproducible gates

Run the fixed ownership and feature audit with:

python3 tools/check_milestone_06.py

The audit rejects owned Rust stubs, feature leakage, missing platform jobs, missing performance targets, or drift in the 48 reviewed ManagedImage, Coord/Quat, and PrimMesh compatibility cases. The cross-platform workflow also runs each reviewed group explicitly, native crate tests, workspace test compilation, Clippy with warnings denied, rustdoc with warnings denied, and benchmark compilation.

The focused performance baselines are executable Rust programs rather than wall-clock assertions, so slower shared runners do not weaken or destabilize correctness tests:

cargo bench -p libremetaverse-imaging --bench image_pipeline
cargo bench -p libremetaverse-prim-mesher --bench meshing

The image baseline clones, bilinearly resizes, and exports a 2,048-square RGBA image. The meshing baseline builds and indexes a high-detail cut, hollow, twisted circular extrusion. Both report elapsed time and allocation counts so regressions can be compared using the same inputs.