fma: (place:tissue) render convergence + /fma-body cockpit + 1M SoA scan PoC#59
Conversation
…key-driven solid render Converges BOTH the baked address AND the render onto the canonical (place:tissue) key, across three additive slices (all under fma/, zero change to existing bins): 1. Located skeleton (converge.rs) — classid-dispatched HhtlMode. For 0x0A02 bones with a mesh centroid, the `place` high-bytes are the Morton spatial cell of the centroid (the exact anchor IS the key — the anchor.rs hybrid); soft tissue (0x0A01) keeps the part_of Cascade rank. Both keep is_a in the low byte. Verified: thoracic vertebrae T9/T10/T11 share Morton HEEL (same octant), descend in HIP/TWIG as their centroids descend; 369 Located via centroid, 0 collisions. 2. connected_to (converge.rs) — the canonical EdgeBlock: part_of siblings are the in-family adjacency (the aortic segments / heart chambers that physically connect), the is_a parent is the out-of-family link. Emits nodes.tsv + edges.tsv (render-ready). 6289 edges over 1368 nodes. 3. Key-driven solid render (new graph.rs) — renders the SOLID triangle surface (the same z-buffered Gouraud rasterizer as mesh.rs), but driven by the converged key: every mesh colored by its `tissue` byte (is_a), and a GUID **prefix** SELECTS which addressed subtree draws — `graph … 00000a02` renders just the skeleton (922K triangles), the address routing the geometry. The deepest-FMA pick keys each bone mesh to its skeletal leaf (not a soft-tissue parent). converge gains optional args [parts_dir] [element_parts]; absent ⇒ Cascade + structural edges only (still runs on the committed trees). graph is dep-free (png + std), like the rest of the crate. docs/graph_skeleton.png shows the prefix-selected skeleton. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ4NVBSjq1w5h7RmTbVafb
…er toggles + transparency Adds MY interactive cockpit viewer, additive to the other session's /torso* (#57/#58 — their TorsoMesh/torso.mesh are untouched; main.tsx gains only one import + one route). - cockpit_bake (new fma bin): bakes the full body → cockpit/public/fma_body.mesh, the same SPM1 wire the cockpit already decodes, but the per-vertex `opacity` byte carries a clean LAYER id (1 skin·2 muscle·3 organ·4 skeleton·5 vessel·6 nerve·7 connective·8 other) instead of a continuous alpha — so each layer can be toggled exactly. Color is the converged `tissue` byte (is_a); geometry is the BodyParts3D is_a OBJ set, vertex-cluster decimated (a Rust port of bake_torso_mesh.py's cluster_decimate). 329K verts, 745K tris. - cockpit/src/FmaBody.tsx (new): loads /fma_body.mesh, renders the solid THREE.Mesh with the same (-x,z,y) upright decode as TorsoMesh (head-up), and a shader that gates each layer via uEnabled[9] (indexed by the vertex layer id) + a global alpha. UI: a button per layer (skin/muscle/organ/skeleton/vessel/nerve) toggling visibility, and a solid↔transparent switch. Skin off by default so the anatomy shows. - cockpit/src/main.tsx: + route /fma-body (additive; /torso* unchanged). - README: fix the v3 image (the removed dot-graph PNG → the skeleton render) and document cockpit_bake + /fma-body. Verified: cockpit `npm run build` (tsc && vite build) is green (102 modules). The live browser render was not exercised in this environment (no browser) — the component mirrors the working TorsoMesh exactly and shares its decode, so it should render head-up on deploy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ4NVBSjq1w5h7RmTbVafb
Proves the OGAR canon's "the key prerenders nodes with zero value decode" at scale. A NodeRow is 512 B = key(16) + edges(16) + value(480); laid out columnar (SoA) as a contiguous key column + value column, a key-only prefix-route scan (count the skeleton subtree by classid 0x0A02 — the same routing /fma-body's skeleton button does) touches ~30x less memory than materializing the value slab, and is cache-resident at the key column's size. Measured (best-of-7, x86-64-v4): rows key-only (route) value (decode slab) speedup 64000 2209 M/s 35.3 GB/s 17 M/s 8.1 GB/s 130x 256000 1581 M/s 25.3 GB/s 17 M/s 8.1 GB/s 94x 1000000 1507 M/s 24.1 GB/s 17 M/s 8.1 GB/s 89x key-only stays ~1.5 G rows/s and flat as N grows (the 16 MB key column at 1M is cache- resident); the value scan is RAM-bandwidth-bound over 480 MB. The 30x is the pure memory floor; the ~90x adds the key column's cache residency + the per-row slab decode work. 1M is synthetic (real FMA ~1368 placed / ~75K terms — the throughput is the point), seeded by the FMA addressing distribution. Dep-free (std only), like the rest of the crate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ4NVBSjq1w5h7RmTbVafb
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Builds on the merged
fma/plateau (#56). Three commits, all additive — the only non-fma/change is one import + one route incockpit/src/main.tsx(verified: no/torso*line touched; #57/#58 untouched).1 · v3 render convergence — Located skeleton +
connected_to+ key-driven solid render (492cf934)Converges both the baked address and the render onto the canonical
(place:tissue)key:converge) —classid-dispatched OGARHhtlMode. For0x0A02bones with a mesh centroid, theplacehigh-bytes are the Morton spatial cell of the centroid (the exact anchor is the key); soft tissue (0x0A01) keeps thepart_ofCascade rank. Both keepis_ain the low byte. Verified: thoracic vertebrae T9/T10/T11 share a Morton HEEL (same octant), descend in HIP/TWIG as their centroids descend.connected_to(converge) — the canonical EdgeBlock:part_ofsiblings are the in-family adjacency (the aortic segments / heart chambers that physically connect). Emits render-readynodes.tsv+edges.tsv. 6289 edges / 1368 nodes.graph) — the SOLID triangle surface (same z-buffer + Gouraud asmesh), colored by thetissuebyte, with a GUID prefix that selects the subtree:graph … 00000a02renders just the skeleton (922K triangles). The address routes the geometry.2 ·
/fma-bodycockpit page — layer toggles + transparency (d75ef844)My interactive full-body viewer, additive to
/torso*:cockpit_bake(newfmabin) bakes the body →cockpit/public/fma_body.mesh(the same SPM1 wire the cockpit decodes, but the per-vertexopacitybyte carries a clean layer id), vertex-cluster decimated. 329K verts / 745K tris.cockpit/src/FmaBody.tsxrenders the solidTHREE.Mesh(same(-x,z,y)upright decode asTorsoMesh) with per-layer toggle buttons (skin / muscle / organ / skeleton / vessel / nerve) + a solid↔transparent switch — each layer gated by the converged key in-shader./fma-bodyroute added (additive).npm run build(tsc + vite) is green (102 modules). Live browser render not exercised here (no browser) — mirrors the workingTorsoMeshand shares its decode. Needs a cockpit redeploy to go live.3 ·
soa_scan— 1M-row SoA scalability PoC (05752598)Proves the canon's "the key prerenders nodes with zero value decode" at scale.
NodeRow= 512 B = key(16) + edges(16) + value(480); columnar SoA. Key-only prefix-route scan vs full value-decode scan, best-of-7, x86-64-v4:Key-only stays ~1.5 G rows/s and flat as N grows (the 16 MB key column is cache-resident); the value scan is RAM-bound over 480 MB. 30× is the pure memory floor; ~90× adds cache residency + per-row slab decode. (1M is synthetic — real FMA is ~1368 placed / ~75K terms; throughput is the point.)
Scope / safety: every change is under
fma/except the additive cockpit page;/torso,/torso-live,/torso-splat,/torso-mapandtorso.meshare byte-for-byte untouched. All newfmabins are dep-free (png+std) and clippy-clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01GJ4NVBSjq1w5h7RmTbVafb
Generated by Claude Code
Summary by CodeRabbit
New Features
/fma-bodypage for browsing the combined body mesh.Documentation