fix wasd speed during training#1307
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes camera WASD navigation speed during dataset training by preventing dataset container nodes from inflating the whole-scene bounds used to derive movement scaling.
Changes:
- Exclude
core::NodeType::DATASETnodes fromInputController::computeWholeSceneBounds()so the movement scale reflects actual visible/training geometry rather than the dataset-root aggregate.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
2383
to
2386
| if (node->type == core::NodeType::GROUP || node->type == core::NodeType::PLY_SEQUENCE || | ||
| node->type == core::NodeType::DATASET || | ||
| node->type == core::NodeType::CAMERA_GROUP || | ||
| node->type == core::NodeType::IMAGE_GROUP) |
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.
Summary
After commit
eeaa9ed95dd171deb8cbba881e071ac85ca16837, WASD movement speed became scale-dependent. This worked correctly when viewing/editing a splat, but during dataset training the movement speed became much too fast.The fix is surgical: exclude
core::NodeType::DATASETcontainer nodes from the whole-scene bounds used to derive the camera movement scale.Root Cause
computeWholeSceneBounds()already skipped several container node types:GROUPPLY_SEQUENCECAMERA_GROUPIMAGE_GROUPHowever, it did not skip
DATASET.Scene::getNodeBounds(DATASET)recursively aggregates child bounds. During training this produced a huge dataset-level radius, which dominated the combined scene extent and pushedwasdMoveScale()to its clamp maximum.In editing mode,
switchToEditMode()clears the dataset hierarchy and re-adds only the trained splat asTrained Model, so the movement scale was based on the expected splat bounds.Solution
Treat
DATASETlike the other container node types when computing the whole-scene movement bounds:This prevents the dataset root aggregate bounds from poisoning the movement scale while still allowing the actual point cloud or training model nodes to contribute their trimmed bounds.
Expected Result
During training,
sceneExtent()should now be based on the actual visible/training geometry, approximately matching the edit-mode radius around200-213for the investigated dataset, instead of the dataset aggregate radius around751894.WASD movement during training should therefore feel consistent with editing/viewing the resulting splat.
How this was investigated:
Symptom
During training, the viewport reported:
After switching to editing mode, the same scene behaved normally:
Because WASD speed is computed from
scene_extent / 50and clamped to100, the training extent forced movement to the maximum scale.Investigation
Temporary logging was added around
InputController::computeWholeSceneBounds()andexpandNodeWorldBounds()to print each contributing node's bounds and the combined radius.During dataset/training mode, the logs showed:
After switching to editing mode, the logs showed:
This proved that the training speed was not caused by the active splat or point cloud bounds. It was caused by the dataset root node contributing a recursive aggregate AABB that included the full dataset hierarchy.