Add interactive hierarchy visualization for clustered 3D reconstruction#1089
Open
nilakarthikesan wants to merge 2 commits into
Open
Add interactive hierarchy visualization for clustered 3D reconstruction#1089nilakarthikesan wants to merge 2 commits into
nilakarthikesan wants to merge 2 commits into
Conversation
Web-based Three.js visualization that shows how the GTSfM hierarchical clustering pipeline progressively merges VGGT cluster reconstructions into a complete building model. Key features: - Camera-based orientation: automatically computes scene orientation from COLMAP camera poses (images.txt) instead of hardcoded rotations - Squareness-optimized layout: exhaustive partition search at each tree level to maximize tile squareness and fill the screen efficiently - Per-point alpha blending: smooth merge transitions where matched points interpolate positions and unmatched points fly to nearest counterparts - Built-in recording: capture the visualization as a .webm video See visualization/hierarchy-web/README.md for setup and usage instructions. Made-with: Cursor
Add detailed explanations of: - Camera-based orientation (parsing COLMAP poses, averaging up-vectors, building orthonormal rotation matrix) - Squareness-optimized layout (exhaustive partition search, proportional weighting, recursive subdivision) - Per-point alpha blending (nearest-neighbor matching, three-category point interpolation, cubic easing) - Full timeline sequence description - Recording instructions Made-with: Cursor
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
Adds a web-based Three.js visualization (
visualization/hierarchy-web/) that interactively shows how the GTSfM hierarchical clustering pipeline progressively merges VGGT cluster reconstructions into a complete building model.Camera-based orientation: Automatically computes scene orientation from COLMAP camera poses (
images.txt) by averaging camera up-vectors and computing camera-to-building direction. Produces a mathematically derived rotation matrix -- no hardcoded angles. Works for any dataset.Squareness-optimized layout: At each tree level, exhaustively searches all possible row/column groupings (2^(n-1) partitions) to maximize worst-case tile squareness. Clusters fill the screen efficiently in a grid-like arrangement.
Per-point alpha blending: During merge transitions, matched points smoothly interpolate from child to merged positions using cubic easing. Unmatched child points fly to nearest merged counterparts; unmatched merged points fly from nearest child points.
Built-in recording: One-click Record button captures the visualization as a
.webmvideo using the MediaRecorder API.How to Run
See
visualization/hierarchy-web/README.mdfor full setup details.Files Added
visualization/hierarchy-web/hierarchy-vggt.html-- Main page with UI and stylingvisualization/hierarchy-web/js/data-loader-vggt.js-- Point cloud and camera extrinsic loadingvisualization/hierarchy-web/js/layout-engine-squareness.js-- Recursive layout algorithmvisualization/hierarchy-web/js/animation-engine-squareness.js-- Timeline and merge animationsvisualization/hierarchy-web/js/main-hierarchy-vggt.js-- App entry point, scene setup, recordingvisualization/hierarchy-web/js/camera-engine.js-- Camera flythrough supportvisualization/hierarchy-web/js/interaction-engine.js-- Mouse interactionvisualization/hierarchy-web/README.md-- Setup and usage instructionsTest Plan
data/gerrard-hall-vggt/results/, start server, open visualization