Repository navigation
A posed rigid model is edited in place - #177
Conversation
…in place under software traversal Hidden, its parts are instances no ray sees and it is posed and moved on; shown, it is placed where it stands; removed, its instances are no object's. Its pose update goes through what is above the instances under either traversal (the TLAS, or the units' top tree), where it needed the TLAS. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…osed rigid one as its parts' instances The placement of one instance is a function of its own (its rows, its emitters, its record, its place above the triangles): a mesh's, a still model's, and each part of a posed rigid model, whose records are a run of the room. A still model whose mesh emits was a rebuild's to place again: its emitters are made as a mesh's are. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…y a rebuild; one made visible in the commit that adds it Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…idden emitters' areas, a model that never moved removed, parts where a build places them, one with flattened triangles placed again Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ngles Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e build's do After the merge of main: a pose may name nodes beside its clip, and they move too. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 4c704e4. Configure here.
| rigid.instances.push((node, (record + j) as u32)); | ||
| } | ||
| } | ||
| scene::Draw::Rigid(rigid) |
There was a problem hiding this comment.
Edit-placed rigid model corrupts object pivot
Medium Severity
An in-place placement of a posed rigid model builds RigidModel from Default, so rest.object stays 0. The build path sets that field to the object's table index. A later pose or move in repose_rigid then writes the new pivot into objects[0] instead of this model's row, leaving the model's own pivot at spawn and overwriting whichever object owns the first entry.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 4c704e4. Configure here.
There was a problem hiding this comment.
Real: a model placed by an edit kept the default row, so its next pose or move wrote its pivot into the first object's row. Fixed in b830519; the placed-again test compares each model's row of the object table with a build's now (it failed before the fix).
… pose that names other nodes is a rebuild A placed rigid model given another clip, or a pose that named another node, was posed in place with the parts made for the first pose: the nodes the new one moves stayed in the part merged for the old one. Its parts do not depend on the clip that plays now, so another clip is posed in place; it remembers the nodes its pose named, and a pose that names others rebuilds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new pose or a move wrote its pivot into the first object's row (the review's finding). The test compares each model's row with a build's now. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>


After #173 a posed rigid model is instances of its parts' meshes. This makes it one an edit can change in place, as a mesh and a still model are.
An edit places an instance by one function now (its rows, its emitters, its record, its place above the triangles), for a mesh, a still model and a rigid model's part alike. With it a still model whose mesh emits is placed again in place, where that was a rebuild's.
A fault of #173's, fixed here
A placed rigid model's parts were the nodes the clip it was built with moves. Given another clip, or (since #175) a pose that names another node, it was posed in place with those parts: the nodes the new pose moves stayed in the part merged for the old one, a wrong picture. Found by reading; the test of it failed before the fix.
Still a rebuild: a rigid model with triangles flattened beside its parts hidden, removed or placed again; a pose that names other nodes; a model hidden when the scene was built, shown; a skinned model added, hidden or removed; a model the scene has not, added.
Measured
Software traversal, an interior of 7,300 nodes whose clip plays (4,181 units), 1280 x 720 at half scale:
The paths a frame takes are not touched. GPU time a frame at 1080p on twelve scenes, alternated pairs against main after a run thrown away, four pairs over two heads: all within 0.8 %. The quality figures against the offline references are main's.
Checks
tests/render/data/two-clips.glb); one whose pose names a node no clip moves, by a rebuild, then posed on in place, a second placed with the same node named in place. A placed model's row of the object table against a build's (the review's finding: its pivot went to another object's row). Each against a build's light list and picture. A posed rigid model is its parts' instances #173's two tests of posing and moving run under software traversal too.🤖 Generated with Claude Code