Repository navigation
A posed skinned model is posed in place under software traversal - #184
Merged
Merged
Conversation
Made again, or its boxes taken again in a kept tree, and how much worse such a tree walks (ignored; THREERT_SKIN_GLB). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Its mesh was written out as world-space triangles in the still tree, and every pose rebuilt the scene. Now it has a tree as any unit's mesh: the shape of the tree over its model's bind pose (one shape a model; the model's corners and the mesh's triangles in its order), its boxes the pose's. A new pose takes the boxes again on the CPU from the corners placed by the pose, and the skinning pass writes the triangles (it has a variant without BLAS output). Hidden, shown and removed, it is a unit's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… motion held by tests The pass-against-the-CPU-skin test runs under both traversals: under software traversal each mesh's tree is read back (its model's links, the pose's boxes), its bounds and its unit's leaf of the top tree checked, after poses in place and after a build. A unit test of the refit. The runtime doc's table. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rsal Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…and it Two branches by traversal that mutation showed no test could tell apart: the commit ignores the list of meshes to build under software traversal, as it does for other edits; the pass's bind group is made again in one place, with the BLAS input or what stands there. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tions Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Under software traversal a mesh that deforms was written out into the still scene's tree, so every pose of a skinned model rebuilt the scene. Now it is a unit as any mesh, posed in place.
units::refit: a leaf's from its triangles, an interior node's from its children), the nodes written where they lie, the unit's new bounds to the top tree. The skinning pass writes the triangles and attributes as under hardware traversal, without the BLAS input (override BLAS).Why the boxes alone: a tree made again for a pose costs sixty times as much (a character of 13,744 triangles, one core: 3.0 ms against 0.05) and traces 5 % faster where characters fill the view; the clip's first pose is no better a shape than the bind pose.
Still a rebuild under software traversal: a skinned model added. Its triangles and its tree need room, which a scene has there only with geometry of its own to edit, and which does not grow there.
Measured
Software traversal, 1280 x 720:
Hardware traversal is as it was: the pose path there is main's. GPU time a frame at 1080p on twelve scenes, alternated against main after a run thrown away: all within 0.8 %, the crowd of skinned walkers +0.0, +0.0, +0.5 and -0.2 % in four pairs measured alike. The pictures are main's.
Checks
🤖 Generated with Claude Code
Note
Medium Risk
Changes the live commit path for animated meshes, GPU skinning bindings, and BVH correctness under software traversal; broad test coverage mitigates risk, with a known ~11% static trace cost when many skinned units are present.
Overview
Software traversal no longer flattens deforming skinned meshes into the static scene tree on every pose (which forced full rebuilds). They are units like rigid meshes: one BVH shape from the model’s bind pose, boxes refit on the CPU each pose (
units::refit), nodes uploaded withwrite_nodes, and the top tree updated from the unit bounds—while the skinning pass still updates triangles/attributes.The skin compute shader gains a
BLASpipeline override so software traversal skips BLAS vertex writes;skin_passbinds a stub buffer when there is no hardware accel. Scene/load plumbing keepsskin_sources,skin_rest, andskin_treeson the CPU for in-place repose (repose_skinned).Edits/docs/tests: pose, hide/show, and remove skinned models in place under both traversals where tests previously skipped software paths; adding a new skinned model under software traversal still triggers rebuild when edit room cannot grow. ROADMAP and RUNTIME document behavior and measured CPU gains (e.g. per-frame character pose ~30.6 ms → ~3.2 ms) with a small static-trace cost when units are used.
Reviewed by Cursor Bugbot for commit 0f66ea3. Bugbot is set up for automated code reviews on this repo. Configure here.