FMA torso anatomy: filled smooth triangle-mesh cockpit#57
Conversation
The Railway cockpit-server build now compiles q2-ndarray with a v4 floor (CARGO_BUILD_RUSTFLAGS=-C target-cpu=x86-64-v4), flipping on target_feature="avx512f" so ndarray's simd.rs dispatch selects the native simd_avx512 backend. BF16 + AMX tile GEMM ride ndarray's runtime autodetect polyfill (simd_caps + the AMX arch_prctl XTILEDATA enable + CPU-model detect) — lit only when the host has them, AVX2/ scalar fallback always compiled. Documents the requirement (a v4 floor makes the binary require AVX-512 at run time; SIGILL otherwise) and the x86-64-v3 fallback for deploy targets that may lack it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Pivot the BodyParts3D bake from the part-of trunk subtree to the is_a TYPE decomposition. part-of is regional (walking up a muscle hits chest-wall -> thorax, never a muscular system) and carries non-canonical names; is_a classifies every structure to its canonical type (muscle organ / artery / vein / nerve / bone organ / cartilage / ...), ships canonical names, and is a mesh superset of part-of (2234 vs 1258 FJ, +976) with finer organ segmentation (no single aorta/heart concept; split into ascending/arch/descending/abdominal, each its own mesh). - bake_torso_splat.py v4, is_a-primary: tissue resolved by walking the is_a type tree (O(1), cached); conventional atlas palette (bone tan, muscle red, artery red, vein blue, nerve yellow, viscera distinct); depth-peel opacity (wall/muscle translucent, deep organs/vessels/bone solid) so inner structures show through. - Addressing: each structure's is_a DistinguishedName path (upper- ontology stripped) materialises to a numeric container:identity GUID (container = tissue class). Stored per node alongside centroid+bbox. - Whole body, no spatial clip — region focus (torso, an organ) is a future select -> camera-zoom on the SoA centroid/bbox, not a bake filter. - Asset: 602,341 gaussians / 1658 is_a structures (414 arteries, 382 muscles, 221 veins, 203 bones, 126 nerves, full viscera), 12.6 MB SPL2 (wire unchanged; existing decoders parse it as-is). - Source: BodyParts3D 4.0 (DBCLS), CC-BY 4.0 / CC-BY-SA 2.1 JP — permissive, commercial-safe. Gap-analysis research note + plan update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Re-render the /torso CPU EWA turntable (20 frames) from the v4 is_a-primary whole-body asset: a standing figure, tissue-coloured (muscle red, veins blue down the limbs), depth-peel translucency revealing deeper structure, lit from the baked surface normals. Driver orientation fixed (+90 about X; the body had been landing head-down). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
/torso-live (TorsoSplat) and /torso-map (TorsoMap) now decode the SPL2 normal + opacity and render through a lit ShaderMaterial — hemisphere (sky/ground) ambient + key diffuse + soft fill from the surface normal, with per-gaussian depth-peel opacity. Same recipe as the CPU driver, so all three views agree; orientation matches the +90 flip (no more points.rotation hack). Performance work for the 602K-point whole-body load: - LazyLock: geometry built ONCE; selection + throttle drive uniforms / drawRange, never a rebuild or re-upload. A shuffled index makes an adaptive drawRange prefix a uniform spatial subsample (thins evenly, not by structure order). - Adaptive-FPS: an EMA of the frame time thins the draw range and drops pixelRatio before a stutter lands, recovering when frames are cheap. Active fraction + fps surfaced in-view (never silent decimation). cockpit build (tsc + vite) green. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Per-triangle oriented surfels (one disk per face, not per vertex) sized by per-structure k-NN local spacing (~0.55x the 3-nearest distance) -- the metric Sigma-fit, replacing the hand-rolled sqrt(stride) bridge that over-inflated disks into marbles. SPL3 wire (22 B body adds a per-surfel scale byte; header f32 becomes scale_max, the disk-radius dequant ref). export_isa_classification.py emits the full FJ->tissue/system/GUID/DN table (1658 concepts / 2234 meshes) for the certified- gaussian session, reusing the same is_a walk so both renders share one classifier. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
…fog) The "ghost" was the renderer, not the asset: the soft-Gaussian point material composited alpha tails through the translucent depth-peel surfels -> halo + fog. All three views (/torso, /torso-live, /torso-map) now render OPAQUE depth-tested surfels, sized per-gaussian from the SPL3 scale byte: nearest surface wins, hard edge, no alpha accumulation -> crisp. uFloor gates the skin/flesh shell out (press S on /torso-live to toggle). TorsoMap realigned to the v4 node schema (tissue/container/identity/guid/is_a; the stale `tiers`/`root` refs would have crashed on select). Turntable frames re-rendered crisp (jpg -> png). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Operator: "connect to a triangle filled surface ... kurvenlineal over triangles
(Quadro/AutoCAD)" + "stay with highest quality, do NOT coarsen." The BodyParts3D
OBJs are already triangulated with per-vertex normals, so render the FACES filled
(THREE.Mesh) instead of sampling centroids as splat points. Vertex-cluster decimation
averages the normals per cell (the smooth "curve-ruler" over triangles); filled +
Phong it is a solid surface (ivory bone, red muscle, blue cartilage) — the Open 3D
Man material aesthetic, no sequins, no fog. Decisively beats the surfel splat.
- bake_torso_mesh.py: SPM1 indexed mesh (vert 21 B [pos|normal|rgb|opacity|node_row]
+ tri 12 B), reuses the is_a tissue classifier. Highest quality: cell 3.6 mm =
1.40M triangles / 594K verts (29 MB), NOT coarsened.
- TorsoMesh.tsx: live THREE.Mesh, custom Phong shader (smooth interpolated normals,
two-sided via gl_FrontFacing), opaque depth-tested. uFloor cuts the skin/flesh
shell so the anatomy shows; S toggles skin.
- Routes: /torso-live = the filled mesh hero; /torso-splat = the opaque surfels
(kept for comparison); /torso turntable frames re-rendered at 1.4M (jpg->png).
Note: torso.mesh is a 29 MB binary asset (quality-first, per operator). Web-weight
coarsening was rejected ("skull looks terrible" at cell 5.5 mm).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Records the triangle-surface answer (SPM1 filled mesh beats surfels) and the read-only ndarray investigation: simd_soa MultiLaneColumn + Morton cascade pattern + cesium SSE/HLOD + aabb.rs batch cull are all gaussian-free and reusable for an opaque mesh; the splat3d render half (project/tile/raster/sh) is gaussian+alpha-blend. Verdict PARTIAL — strong reusable substrate, must build the triangle render layer on top (no gaussian coupling). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (40)
📒 Files selected for processing (19)
📝 WalkthroughWalkthroughUpgrades the torso anatomical visualization pipeline from SPL2 gaussian soft-splats to SPL3 opaque triangle surfels and adds a new SPM1 filled triangle mesh view. The bake tooling switches from ChangesTorso v4 is_a-primary pipeline
Sequence Diagram(s)sequenceDiagram
participant Browser
participant TorsoMesh
participant decodeSpm1
participant ThreeJS as Three.js Scene
Browser->>TorsoMesh: fetch /torso.mesh
Browser->>TorsoMesh: fetch /torso.mesh.manifest.json
TorsoMesh->>decodeSpm1: ArrayBuffer (SPM1 binary)
decodeSpm1-->>TorsoMesh: Mesh {positions, normals, colors, opacity, index}
TorsoMesh->>ThreeJS: mount(container, mesh) — build BufferGeometry + ShaderMaterial
ThreeJS-->>TorsoMesh: fps via onStats (adaptive pixel ratio loop)
Browser->>TorsoMesh: keydown "S"
TorsoMesh->>ThreeJS: update uFloor uniform (skin shell toggle)
sequenceDiagram
participant OBJ_Files as BodyParts3D OBJ Files
participant load_isa
participant read_obj_tris
participant knn_radii
participant encode_SPL3 as SPL3 Encoder
participant Outputs as torso.splat + nodes.json + manifest.json
load_isa-->>encode_SPL3: is_a ownership, tissue_of, isa_dn, tissue_color
OBJ_Files->>read_obj_tris: parse triangle surfels
read_obj_tris->>knn_radii: per-surfel positions → per-surfel disk radii
knn_radii->>encode_SPL3: quantized scale, scale_max (99th pct)
encode_SPL3->>Outputs: SPL3 binary + enriched JSON sidecar files
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed due to a network error. 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 |
…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
What
Real human anatomy (BodyParts3D, FMA-keyed) rendered in the q2 cockpit, ending on a filled, smooth, Gouraud/Phong triangle surface — solid ivory bone, red muscle, blue cartilage, the Open 3D Man material aesthetic. Three render generations, each correcting the last:
Cockpit views
/torso-live— the hero: liveTHREE.Mesh, custom two-sided Phong shader (gl_FrontFacing), opaque depth-tested. Skin/flesh shell gated off so the anatomy shows; press S to toggle skin./torso— turntable of the same surface (pre-rendered frames)./torso-splat— the opaque surfel point cloud (kept for comparison)./torso-map— the splat as the GUID substrate: click a structure → its FMA node → tissue /container:identityGUID / is_a DistinguishedName / partonomy. (Also fixes a latent crash: it read staletiers/rootfields the v4 bake no longer emits.)Bake tooling (
crates/osint-bake/tools/)bake_torso_mesh.py— SPM1 indexed triangle mesh (vert 21 B[pos|normal|rgb|opacity|node_row]+ tri 12 B), vertex-cluster decimation with cell-averaged normals (smooth), is_a tissue colour.bake_torso_splat.py— SPL3 per-triangle surfels with k-NN local-spacing disk sizing (replaced a hand-rolledsqrt(stride)over-inflation; the surfel path is retained).export_isa_classification.py— full FJ→tissue/system/GUID/DN table (1658 concepts / 2234 meshes), one classifier shared with the gaussian-render session.Substrate alignment (investigated read-only)
The operator asked whether the Morton tile pyramid +
simd_soa.rs"gridlake" can give batched-shader synergy for the mesh without the gaussian artifacts. Verdict: PARTIAL —simd_soa.rsMultiLaneColumn, the Morton min/max cascade pattern, cesiumsse/hlod, andaabb.rsbatch cull are all gaussian-free and reusable; the splat3d render half (project/tile/raster/sh) is gaussian + alpha-blend, so an opaque triangle render needs its own tiler + projection + z-buffer raster on top. This matches ndarray's own 3DGS render-depth-certification plan, which already frames the mesh as the exact geometry anchor ("CAD mesh says wall is here") and the 3DGS gaussian as the radiance skin — unified by the geometry-agnostic HHTL / 4×4-SoA / depth-certificate substrate. The "opaque now (mesh), gaussian later (3DGS skin)" split is that planned reality-skinned-CAD/BIM architecture. Full write-up:claude-notes/research/2026-06-24-splat-on-substrate-jc-clam-cesium-hhtl.md.Notes
cockpit/public/torso.meshis a 29 MB binary (quality-first, per operator direction).🤖 Generated with Claude Code
https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes