cockpit/torso: real BodyParts3D anatomy as a gaussian splat (splat3d CPU + three.js orbit)#52
Conversation
FMA has no geometry, so the /fma heart slice (PR #51) synthesizes its layout from the 8:8 HHTL address. This adds a TORSO rendered from REAL anatomical meshes: BodyParts3D (DBCLS) keys 3D OBJ meshes directly on FMA concept IDs in one shared whole-body frame, so there are no synthesized positions. Per the BodyParts3D NAR 2009 mereotopology, the FMA part_of relation IS spatial containment of those meshes (child coveredBy parent) — so the FMA partonomy selects and colours the real geometry. - tools/bake_torso_splat.py: BFS the FMA part_of subtree at FMA7181 (trunk) over BodyParts3D's partof tree -> 178 concepts -> 577 OBJ meshes -> ~694K verts. Colours each mesh by its DEEPEST owning concept (compound concepts list all descendant elements, so claim deepest-first) -> 102 structures, distinct hues. Recenter + normalize (max half-extent = 1) -> SPL1 gaussian asset (231K gaussians, deterministic stride-3 downsample). - cockpit/public/torso.splat (3.7 MB) + torso.manifest.json (attribution + legend). - cockpit/src/TorsoSplat.tsx (/torso-live): SPL1 decoder + three.js Points (soft gaussian sprite, per-structure colour, OrbitControls auto-rotate), oriented upright (BodyParts3D superior-inferior = model +Z -> world +Y). - main.tsx: /torso-live route. Source geometry: BodyParts3D 4.0 part-of OBJ (decimated 99%), CC-BY 4.0, (c) The Database Center for Life Science. Attribution is shown in-view (required by the licence). The 62 MB OBJ archive + the ~1.4 MB mapping txt files are external (download URLs documented in the bake tool); only the derived splat is committed. This is the "live orbit" of the two requested torso pages; the CPU splat3d render (/torso) via ndarray::hpc::splat3d is the next step. tsc clean; the browser render was not exercised in this environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Adds the second torso page (/torso, the "splat") and softens the colours on both pages per request. - /torso (TorsoRender.tsx): a turntable of frames rendered bake-side by ndarray::hpc::splat3d (CPU-SIMD EWA, no GPU) over the same torso.splat the live page orbits. Drag to scrub, click to pause. A scratchpad torso-render driver reads SPL1 -> Gaussian3D -> splat3d turntable (no Inria .ply needed), under ndarray's own pinned 1.95 toolchain so q2's workspace stays free of the ndarray dependency. 20 JPEG frames (720x960) -> cockpit/public/torso-frames/. - Muted palette: per-structure golden-angle hue at S=0.34 V=0.78 (was the neon S=0.62 V=0.96). torso.splat re-baked; the live three.js page (/torso-live) picks it up directly, the splat3d frames re-rendered. - main.tsx: /torso route; TorsoSplat nav cross-links splat <-> live orbit. Render verified by viewing the frames: real BodyParts3D torso anatomy, upright, 102 structures in soft pastels. tsc clean. Geometry: BodyParts3D, CC-BY 4.0, (c) The Database Center for Life Science (attribution shown in-view). 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 (20)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughAdds an end-to-end FMA torso Gaussian splat feature: a Python bake script ingests BodyParts3D OBJ meshes, emits a binary SPL1 asset and ChangesFMA Torso Gaussian Splat Pipeline
Sequence DiagramsequenceDiagram
participant User
participant ReactRouter
participant TorsoSplat
participant ServerAssets as Static Assets
participant decodeSpl1
participant ThreeJS as Three.js Scene
User->>ReactRouter: navigate to /torso-live
ReactRouter->>TorsoSplat: render TorsoSplat
TorsoSplat->>ServerAssets: fetch /torso.splat
TorsoSplat->>ServerAssets: fetch /torso.manifest.json
ServerAssets-->>TorsoSplat: SPL1 ArrayBuffer
ServerAssets-->>TorsoSplat: Manifest JSON
TorsoSplat->>decodeSpl1: decode(ArrayBuffer)
decodeSpl1-->>TorsoSplat: Spl1 { positions, colors, count }
TorsoSplat->>ThreeJS: mount(container, splat)
ThreeJS-->>User: WebGL orbit view with auto-rotate
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
✨ 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 |
What
Two new cockpit pages rendering a torso as a gaussian splat from real anatomical geometry — the follow-on to the
/fmaheart slice (#51), which had to synthesize its layout because FMA itself has zero geometry.The fix is BodyParts3D (DBCLS): it realizes FMA concepts as 3D OBJ meshes in one shared whole-body frame and keys each mesh directly on its FMA concept id. So the torso needs no synthesized positions — these are real anatomical coordinates. Per the BodyParts3D mereotopology (NAR 2009, Table 1:
A part_of B ⟺ A° ⊂ B°, coveredBy), the FMApart_ofrelation is the spatial containment of those meshes — so the FMA partonomy selects, nests, and colors the real geometry.The two pages (one shared asset)
/torso— splat3d CPU render (the "splat"): a turntable of frames rendered bake-side byndarray::hpc::splat3d(CPU-SIMD EWA, no GPU) overtorso.splat. Drag to scrub, click to pause. Rendered under ndarray's own pinned 1.95 toolchain via a scratchpad driver (SPL1 →Gaussian3D→ splat3d), so q2's workspace stays free of the ndarray dependency./torso-live— three.js live orbit (the "live orbit"): the sametorso.splat, orbitable in WebGL.Both read one baked asset, so geometry is identical across pages.
Data (measured)
FMA7181 trunk→ 178 concepts → 577 OBJ meshes → ~694K verts (thoracic segment 548, body wall 81, abdominal 24, perineum 4). The heart (osint/fma: hydrate the bake from the real FMA heart subtree, not a fixture #51) nests inside it.cockpit/public/torso.splat(3.7 MB, SPL1 binary) +torso.manifest.json+ 20 JPEG frames (~0.7 MB).Pipeline
Licence / attribution
Geometry: BodyParts3D, © The Database Center for Life Science, CC-BY 4.0. Attribution is shown in-view on both pages (required). The 62 MB OBJ archive + ~1.4 MB mapping files are external (download URLs documented in the bake tool); only the derived splat + frames are committed.
Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
Generated by Claude Code
Summary by CodeRabbit