Some checks failed
Native code generation / deterministic (push) Failing after 2m7s
Imaging and meshing gate / native (push) Failing after 4m9s
JPEG 2000 feature / linux (push) Successful in 2m55s
Native Rust workspace compile / compile (push) Failing after 6m15s
Skia feature / linux (push) Successful in 30m59s
59 lines
2.8 KiB
Markdown
59 lines
2.8 KiB
Markdown
# LibreMetaverse simple renderer
|
|
|
|
`libremetaverse-rendering-simple` is the small, deterministic reference
|
|
pipeline for geometry that is already represented by a `Primitive` or a
|
|
decoded sculpt map. It has no windowing, GPU, Skia, voice, RLV, or LSL
|
|
dependency. The only geometry backend is the workspace's checked native
|
|
`libremetaverse-prim-mesher` crate.
|
|
|
|
## Supported inputs and output
|
|
|
|
`SimpleRenderer` implements both its concrete C#-mapped methods and the shared
|
|
`IRendering` trait. It supports:
|
|
|
|
- linear and flexible paths, plus circular prim paths;
|
|
- square, circular, half-circle, and all three triangular profiles;
|
|
- profile/path cuts, hollow profiles, shear, taper, twist, skew, radius offset,
|
|
and revolutions at all four `DetailLevel` values;
|
|
- plane, cylinder, sphere, and torus sculpt maps supplied as `ManagedImage`;
|
|
- faceted output grouped by prim face, and flattened simple output that keeps
|
|
each face's independent vertex/normal/UV domain;
|
|
- per-face texture-entry inheritance, including texture, legacy material, and
|
|
render-material UUIDs; and
|
|
- default and planar texture transforms with repeat, offset, rotation, and
|
|
primitive scale.
|
|
|
|
Positions are emitted in prim-local coordinates. Every face contains finite
|
|
positions, normals, and UVs, in-range triangle indices, its local bounds and
|
|
center, and its effective texture-entry face. Identical inputs produce
|
|
byte-for-byte-identical floating-point and index sequences; the compatibility
|
|
suite pins a golden high-detail box.
|
|
|
|
## Bounds and errors
|
|
|
|
Each face and flattened mesh is limited to the 16-bit index domain (65,536
|
|
vertices), and aggregate vertex/index growth uses checked arithmetic before
|
|
allocation or conversion. Non-finite construction data, malformed mesher
|
|
domains, invalid indices, unsupported topology, and budget overflow return
|
|
`Error::Rendering`. That error includes the source primitive UUID and a static
|
|
operation context so callers can identify the object that failed. Invalid
|
|
standalone texture-transform arguments return `Error::Argument` because that
|
|
API has no primitive parameter from which to derive source context.
|
|
|
|
## Deliberate boundary
|
|
|
|
A sculpt whose type is `Mesh` names an encoded mesh asset rather than a sculpt
|
|
height map. `SimpleRenderer` does not fetch or decode assets, so that input
|
|
returns a typed `mesh sculpt requires a decoded mesh asset` error. Mesh-asset
|
|
decoding, skin weights, secondary UVs, and rigged-mesh metadata belong to the
|
|
separate MeshFoundry renderer. The simple renderer also performs no world
|
|
transform, scene traversal, material shading, texture download, or drawing.
|
|
|
|
Run the focused implementation gates with:
|
|
|
|
```console
|
|
python3 tools/check_milestone_10_issue_76.py
|
|
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-compat-tests --test rendering_shims --locked -j1
|
|
CARGO_BUILD_JOBS=1 cargo test -p libremetaverse-rendering-simple --locked -j1
|
|
```
|