Repository navigation
A posed skinned model is a mesh of its own - #182
Merged
Merged
Conversation
…hored tangent follows its joints Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new shared pose sent every triangle of its mesh: 180 bytes each, skinned on the CPU. Now the CPU sends the pose's matrices and a compute pass skins the mesh from its model's corners: triangles, shading attributes, BLAS input. The CPU keeps no triangles of such a pose; a click or a query skins the mesh when it asks. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Models in the same pose shared one mesh, and one of them taking another pose rebuilt the scene. Now a model's mesh is its own, skinned by the pass at each new pose: another clip or time is in place whatever the others do, and the model is hidden and shown in place by its instance. 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>
A posed model the scene did not call movable was moved by skinning it again where it stands. One that is an instance of a deforming mesh was not moved at all: no pose had changed, and nothing rebuilt. Its move is recorded as a move now; the renderer moves an instance and skins world-space triangles again. The test's fixture: 72 triangles (two blocks of the pass), a joint turned about an axis that is neither the normals' nor the tangents', a node that mirrors its mesh, a clip that turns it back. The test: two model files in two poses (two sources, two jobs), a model moved alone, posed and moved at once, after the scene's buffers grew, and a pose that mirrors other primitives. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A mesh's triangles were in its model's order, and first in the GPU's, in every scene the tests had: corners left in the model's order, and a job counted from the pool's start, passed. The fixture's materials now go light, grey, light, and the scene has a rect light's card before the meshes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts: # renderer/src/live/inplace_tests.rs
…e rebuild Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
yujiaxu-ops
marked this pull request as ready for review
November 21, 2026 09:22
# Conflicts: # docs/ROADMAP.md # renderer/src/gpu.rs # renderer/src/live/edits.rs # renderer/src/live/mod.rs # renderer/src/scene.rs
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.
Models in the same pose (the same clip and time) shared one mesh, found by the build. One of them taking another pose had to leave it, and that rebuilt the scene; a rebuild then grouped whichever models happened to be in one pose. A model alone in its pose was no mesh at all: world-space triangles, skinned on the CPU.
Now every posed skinned model is an instance of a mesh of its own, skinned by the pass at each new pose, never shared.
Still a rebuild: a skinned model added or removed; one hidden when the scene was built, shown; every pose under software traversal. Still world-space triangles skinned on the CPU: a model with emitting triangles. Each its own step.
Measured
A crowd of 150 walkers in 8 walk phases, hardware traversal, the builds in turn at 60 fps after a run thrown away:
With the CPU skin the same 150 meshes cost 20 ms of commit (40 fps): the reason the pass came first.
GPU time a frame at 1080p on twelve scenes, two alternated pairs against main after a run thrown away: all within 0.8 % (the crowd, a mesh a walker: +0.2 and +0.3 %). The quality figures against the offline references are main's.
Checks
🤖 Generated with Claude Code
Note
Medium Risk
Touches scene build, GPU skinning, and live edit/commit for animated models; crowd performance shifts toward more BLAS rebuilds, but coverage is broad (inplace + render tests).
Overview
Every posed skinned model now owns a dedicated deforming mesh instead of being grouped with others that share the same clip and time. The build no longer uses
PoseGroup/THREERT_POSE_SHAREgrouping; each placement gets ascene::Skinnedrecord,MeshKind::Skinned, and its own BLAS that the GPU skinning pass updates per pose change.Live commit paths follow that model:
repose_groupsbecomesrepose_skinned(one job per model), andshow_meshescan hide/show a skinned instance in place—pose updates while hidden are deferred until show, when the mesh is re-skinned to the current animation. Software traversal still flattens deforming meshes and may rebuild on hide/show when there is no instance to mask.Docs and tests reflect the behavior: roadmap notes more BLAS work for large crowds (e.g. 150 walkers), and inplace/render tests assert two models in the same pose are two meshes sharing one skin source, with new coverage for per-model pose, hide/show, and GPU-vs-CPU skin parity.
Reviewed by Cursor Bugbot for commit 54cde25. Bugbot is set up for automated code reviews on this repo. Configure here.