Repository navigation
Scene: one proxy an object - #146
Merged
Merged
Conversation
Where what an object draws landed was spread over nine maps keyed by the object (its object-table entry, its card's
material, its dynamic triangles, its instance, whether its moves are the instance's, its rigid model, its pose
group, whether its mesh is its own, its emitter mesh, its instanced copies). They are one table, `Retained::proxies`:
`Proxy { object, card, draw }`, `Draw` = Fixed | Dynamic | Instance | Rigid | Instanced. The commit and the
geometry edit read it. No behaviour change.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The edits kept four maps of their own by object (the record they placed it at, its instance or procedural object as picks test it, an instanced object's range, the mesh it draws), and the build's procedural objects a fifth. An object's proxy holds its record; `instances[record]` and `procs[record - the first procedural record]` hold its value, for what an edit places as for the build's (hidden fillers at the records between). "An edit placed it" is its record being the room's. A mesh a body drives moves as an instance because its proxy says so, whoever placed it (`placed_movable` is gone). An instanced place names its mesh. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rd's slot by one rule Two faults that went with the maps, each shown by a test first. An instanced object the build flattened was in none of them: removing it in place did nothing, and it stayed in the picture. It has a proxy (Draw::Fixed), and an object with a proxy and no record an edit can clear is rebuilt out. An instanced object an edit added had an object entry of its own beside its copies', so its node's power or customData wrote over copy 0's: it has an entry a copy only, as the build's. A record's slot is `inst_base` + it for every record: the two sites that said it another way for procedural objects say that, and `Top::proc_base` is gone. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…here proxies change From a re-read. An instance's pose group was a field every instance had beside its mesh's kind (a pose with a mesh of its own could be written): it is a kind, `MeshKind::Pose`. `Retained::instance` for `placed`. Whether anything moves as an instance was asked of every proxy each frame where two maps' emptiness answered before: it is kept in the loaded scene, set at the load and by a geometry edit (the only places proxies change), and the driven-mesh test holds it. 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.
Scene step B, second part: one proxy an object. No picture changes; two faults that lived between the maps are fixed.
What
Where what an object draws landed was spread over fourteen maps keyed by the object: nine the build filled (
Retained: its object-table entry, card, dynamic triangles, instance, whether its moves are the instance's, rigid model, pose group, whether its mesh is its own, emitter mesh, instanced copies), four the edits kept beside them for what they placed (EditState: its record, its value as picks test it, an instanced range, the mesh it draws) and one for procedural objects (LoadedScene::proc_of).scene::Retained::proxies:Proxy { object, card, draw },Draw=Fixed | Dynamic | Instance | Procedural | Rigid | Instanced. The build fills it;commitand the geometry edit read and keep it.instances[record], orprocs[record - the first procedural record], for what an edit places as for the build's (hidden fillers at the records between).edit.added,edit.placed,edit.instanced,edit.mesh_of,proc_of,Picked,unpickare gone;pickandnode_triswalk the two stores only.inst_base+ it, for every record: the two sites that said it another way for procedural objects say that (Top::proc_baseis gone).EditState::in_room), not a second set of maps. A mesh a body drives moves as an instance because its proxy says so, whoever placed it (placed_movableis gone).Two faults, each shown by a test first
Draw::Fixed), and an object with a proxy and no record an edit can clear is rebuilt out.Smaller behaviour changes
Checks
live::inplace_tests: the two new tests (failing before the fixes), the moves, edits and resize tests;live::instanced_tests(picks, a driven mesh added in place, moved instances) with the mover flag asserted. 165 unit tests, 239 render tests.bench-destruction, sustained), main / this: debris route frame interval p50 21.12 / 21.39 ms against 21.17 / 20.65,edit0.66 against 0.65 / 0.67; batch route 23.42 / 23.87 against 23.06 / 22.46,edit0.86 / 0.83 against 0.76 / 0.69; no fallback, 10467 objects at the end on both.renderer/webbuild.Not in this PR
in_roomtests say so. One mechanism is step E.instancesandprocsare two stores indexed by record; one array of records would be the plain form.geometry-grow-liveleft no output under render-identity (main in the whole suite, this branch alone). Its message was not caught.🤖 Generated with Claude Code
Note
Medium Risk
Large refactor of live scene commit, GPU placement, and picking paths; fixes are covered by inplace/render identity tests but regressions could surface in edge-case edits or instancing.
Overview
Replaces fourteen per-object maps (build
Retainedtables plus liveEditStateplacement/pick side maps andproc_of) with a singlescene::Retained::proxiestable: each object gets aProxy { object, card, draw }and geometry is classified viaDraw(Fixed,Dynamic,Instance,Procedural,Rigid,Instanced).Live commit and geometry edits now route through proxies: record values live only in
instances[record]orprocs[record - proc_first], TLAS slots useinst_base + recordeverywhere (Top::proc_baseremoved), and edit-placed objects are identified withEditState::in_roominstead of separateplaced/added/mesh_of/Pickedmaps. Picking andnode_trisread those stores only; removal/hiding usesundrawon the proxy’s draw kind.Behaviour fixes called out in tests: build-flattened instanced objects get a proxy so in-place remove actually clears them; edit-added instanced meshes no longer steal copy 0’s object-table row.
moving_instancestracks proxy-driven instance motion for kernel motion vectors.Reviewed by Cursor Bugbot for commit a302aaa. Bugbot is set up for automated code reviews on this repo. Configure here.