PrimMesher: implement sculpt meshes, vertex indexing, and OBJ output #43

Closed
opened 2026-08-08 08:17:26 +00:00 by hugo · 1 comment
Owner

Objective

Implement SculptMap/SculptMesh, normals, viewer faces, VertexIndexer, copy/transform operations, and deterministic OBJ export.

Deliverables

  • Decode sculpt inputs through the imaging abstraction.
  • Preserve topology modes, wrapping/mirroring, LOD, normals, UVs, polygon grouping, and material/face associations.
  • Validate all indices and bounded input dimensions.

Validation

  • All sculpt/indexer/OBJ translated tests pass.
  • OBJ golden output is stable.
  • Malformed images/topology return typed errors without panic.

Prerequisite

Types and StructuredData are implemented and the global API/test gates are complete.

Project constraints

  • Native Rust implementation only; optional third-party native codecs stay behind documented features.
  • Keep mapped signatures fixed and preserve translated geometry/pixel assertions exactly.
  • Enforce checked sizes and indices, then update docs and coverage status.
## Objective Implement SculptMap/SculptMesh, normals, viewer faces, VertexIndexer, copy/transform operations, and deterministic OBJ export. ## Deliverables - Decode sculpt inputs through the imaging abstraction. - Preserve topology modes, wrapping/mirroring, LOD, normals, UVs, polygon grouping, and material/face associations. - Validate all indices and bounded input dimensions. ## Validation - All sculpt/indexer/OBJ translated tests pass. - OBJ golden output is stable. - Malformed images/topology return typed errors without panic. ## Prerequisite Types and StructuredData are implemented and the global API/test gates are complete. ## Project constraints - Native Rust implementation only; optional third-party native codecs stay behind documented features. - Keep mapped signatures fixed and preserve translated geometry/pixel assertions exactly. - Enforce checked sizes and indices, then update docs and coverage status.
hugo added this to the 06 - Imaging and PrimMesher implementation milestone 2026-08-08 08:17:26 +00:00
hugo added the enhancement label 2026-08-08 08:17:26 +00:00
Author
Owner

Implemented and pushed as c6171dc.

Native Rust implementation:

  • Added checked SculptMap sampling through ManagedImage and ITextureCodec, including reference LOD resizing, grayscale replication, and mirror behavior.
  • Added SculptMesh plane, sphere, torus, cylinder, and rectangular height-map geometry with reference wrapping, poles, winding, inversion, normals, UVs, viewer faces, deep copy, transforms, and deterministic raw output.
  • Added VertexIndexer with per-prim-face coordinate deduplication and wired PrimMesh to it.
  • Added bounded OBJ ingestion preserving object/group output and position, UV, and normal associations, with typed errors for malformed UTF-8, numbers, and indices.
  • Added native golden and malformed-input tests and updated generated API exports, docs, coverage, and the controlled baseline.

Verification:

  • cargo test -p libremetaverse-prim-mesher: 13 passed
  • translated PrimMesh/indexer focus: 27 passed
  • controlled workspace audit: 266 passed, 1155 expected standardized failures, 0 ignored/unexpected
  • format, mapping/shim generation, API coverage, reviewed parity, API compile, default/all-feature workspace checks, default/all-feature Clippy with warnings denied, rustdoc with warnings denied, and package listing all passed.

Reviewed against issue #43 and the pinned C# SculptMap.cs, SculptMesh.cs, VertexIndexer.cs, and ObjMesh.cs reference; the acceptance criteria are complete.

Implemented and pushed as c6171dc. Native Rust implementation: - Added checked SculptMap sampling through ManagedImage and ITextureCodec, including reference LOD resizing, grayscale replication, and mirror behavior. - Added SculptMesh plane, sphere, torus, cylinder, and rectangular height-map geometry with reference wrapping, poles, winding, inversion, normals, UVs, viewer faces, deep copy, transforms, and deterministic raw output. - Added VertexIndexer with per-prim-face coordinate deduplication and wired PrimMesh to it. - Added bounded OBJ ingestion preserving object/group output and position, UV, and normal associations, with typed errors for malformed UTF-8, numbers, and indices. - Added native golden and malformed-input tests and updated generated API exports, docs, coverage, and the controlled baseline. Verification: - cargo test -p libremetaverse-prim-mesher: 13 passed - translated PrimMesh/indexer focus: 27 passed - controlled workspace audit: 266 passed, 1155 expected standardized failures, 0 ignored/unexpected - format, mapping/shim generation, API coverage, reviewed parity, API compile, default/all-feature workspace checks, default/all-feature Clippy with warnings denied, rustdoc with warnings denied, and package listing all passed. Reviewed against issue #43 and the pinned C# SculptMap.cs, SculptMesh.cs, VertexIndexer.cs, and ObjMesh.cs reference; the acceptance criteria are complete.
hugo closed this issue 2026-08-09 05:00:31 +00:00
Sign in to join this conversation.