Skip to content
s-espositoPublic

About

a vscode extension for local 3D scene visualization and analysis

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

3DView

A viewer for COLMAP reconstructions, 3D meshes, point clouds, 3D Gaussian splats and 3D point tracks — a colored point cloud, camera frustums with the source images, glTF/OBJ/PLY meshes, 3DGS splats (.ply/.splat/.spz/.ksplat) and tracked trajectories, all in one interactive Three.js scene. It runs as a VS Code extension, a PyCharm / JetBrains plugin and a browser demo, over one shared core.

🌐 Try the web demo — load your own COLMAP models, meshes, and 3DGS splats in the browser (no install required). It works on phones too, and can be installed to the home screen as an app.

3DView

Features

  • COLMAP point clouds + camera poses (.bin / .txt), with each image textured onto its frustum. Click a frustum to fly to that camera's viewpoint.
  • Assets — meshes (.glb / .gltf / .obj / .ply, shaded with their glTF/GLB materials and textures by default, with optional unlit-albedo and wireframe modes), point clouds (.ply), and 3D Gaussian Splatting files (.ply / .splat / .spz / .ksplat, loaded via Spark). A .ply is auto-detected as a mesh, a point cloud or a splat, including the PlayCanvas / SuperSplat compressed flavour. Three render modes in the Gaussians section of the Display panel: Splats (default) — true Gaussian splatting through Spark's renderer, sorted per viewpoint with spherical harmonics; Ellipsoids — each Gaussian as a solid oriented ellipsoid, to see the primitives as data; and Points — bare centers, the cheap fallback for huge scenes. A point cloud that carries no colors of its own is drawn in a color from a shared palette — a different one per scene item, so several clouds stay tellable apart — and the Point size slider sizes every cloud in the scene, COLMAP's included.
  • 3D point tracks (.npz / .npy) — trajectories a tracker followed over time, drawn as one colored polyline per point, with the trail breaking wherever a point is occluded. Sliders control the trail (how many time steps are drawn), opacity, and density (a stable random subset of the tracks) — the last two are what keep a few thousand overlapping trails readable — plus line width (in screen pixels, so a sparse set stops being a hairline) and smoothing (a Gaussian along time, which takes the jitter out of a noisy tracker without moving where a trail breaks — lightly on by default; slide it to 0 for the raw trajectories). Reads NumPy archives holding (steps, tracks, 3) positions plus an optional (steps, tracks) visibility mask.
  • Physics (experimental) — any mesh, point cloud or splat item can take part, from its Inspector: Off (the default), Static (a fixed body others land on) or Dynamic (it falls, collides and can be hit; a reconstruction can be Static), its collision shape built from its own geometry as boxes (Show collision shape draws them). Breakable objects: a .npz holding physics_scene (a 3DGS object cut into voxel chunks: each chunk a rigid body of boxes, welded to the chunks it touches) and physics_splats (each chunk's Gaussians) opens as an object that can be dropped, shattered, blown up, shot or dissolved, its splats moving with their chunks (Box3D in WebAssembly); these take part by default. Every object shares one world, so they collide. The playback bar at the bottom runs the clock (play / pause, restore all, speed down to 0.1×) and sets what a click does (Select / Shoot / Blast); the Physics panel holds gravity, the floor (at the scene's bottom, or none) and the scene unit (metres per unit: COLMAP's are arbitrary); an object's own controls (drop height, glue, shatter on impact, presets) are in its Inspector. The first action calibrates each breakable object's welds against its own weight (~1-2 s an object).
  • Temporal items (4D) — load several reconstructions, meshes, clouds or splats as the timesteps of one capture instead of that many scene items: when a folder holds more than one model, or you pick / drop several asset files at once, 3DView asks which you meant. A temporal item is one Scene row marked ⏱ N, with its own timeline — scrub through the frames or play them back (shared Playback FPS).
  • Multi-source scenes — open many reconstructions and assets together; add, show/hide, and remove them from the Scene panel. Each item has its own position / rotation / scale (click its row — or it, in the view — for the Inspector under the list, and a Blender-style gizmo on it: G / R / S), so sources that don't share a coordinate frame can be lined up by hand, Blender-style.
  • Helpers — world-origin metric grid, bounding boxes, axes, and a raw‑COLMAP ↔ upright (Y‑up) toggle.
  • Adjust — the icon rail on the right opens one panel at a time (Scene, Display, Physics, Capture). From Display: point size, frustum size / line width / color, and camera field of view and roll. Rename, hide and remove scene items from the Scene panel. The theme (light / dark / dim) is in the footer.
  • Export — from the Capture panel: a transparent PNG of the current view at 1× / 2× / 4× (Image), and a video flying through a reconstruction's cameras in image-name order, with optional in-between frames, a loop back to the start and a field-of-view override (Camera fly-through, for a reconstruction with two cameras or more; MP4, or WebM where the host has no H.264 encoder). Renders size points by each cloud's own spacing, so surfaces stay filled at high resolution (Fill point gaps).
  • Themes — a light / dark / dim scheme for both the UI and the 3D viewport.
  • Built for large clouds — on-demand rendering and lazy, downscaled frustum textures keep big reconstructions responsive.

Install

VS Code — from a release: download the latest 3dview-<version>.vsix from the Releases page and install it:

code --install-extension 3dview-2.0.2.vsix --force

From source:

git clone git@github.com:s-esposito/3DView.git && cd 3DView && npm install
  • Develop: open the folder in VS Code and press F5.
  • Build the VS Code extension: run ./vscode_build.sh (builds the monorepo + packages a .vsix), install it with code --install-extension vscode/*.vsix --force, then Developer: Reload Window.
  • Build the PyCharm / JetBrains plugin: run ./jetbrains_build.sh (see jetbrains/README.md).

Usage

Use the 3DView icon in the Activity Bar (or the Command Palette) to Open Reconstruction / Open Asset / Open Asset Folder / Open Empty Viewer, then the Scene panel's + — or drag & drop a file or a COLMAP folder onto the viewer — to add more. A COLMAP model is a folder of cameras/images/points3D (e.g. sparse/0/); an asset is a single mesh, point cloud, splat, or point-track file. When a project holds several models under sparse/ (0, 1, …) you're prompted to load one specific model or all of them — and anything you open several of at once can be loaded as one temporal item you scrub through instead of as separate items. Open Asset Folder loads every mesh / cloud / splat / track file directly inside a folder (not recursive) in one go — the way to load a per-frame capture, and the way to load several files at once over a remote connection, where VS Code's file dialog can only select one.

Dragging out of VS Code's own Explorer works too, with two things worth knowing: hold Shift as you drop, or VS Code routes the drop to the editor area instead of the viewer — or skip the drag entirely and right-click the file(s) or folder in the Explorer → Open in 3DView. Either way the extension opens them by path, so a reconstruction's images stream on demand and a single pick is recorded in Recents (a multi-file selection opens as one group and is deliberately not recorded, so it can't flush the ten-entry list).

Action Input
Orbit / zoom / pan drag / scroll / right‑drag
Fly to a camera's view click its frustum (Esc to exit)
Cancel a video render Esc
Fit view Home
Move / rotate / scale the selected item (its gizmo) G / R / S, then drag the gizmo
Select an item / shoot / blast click it (the playback bar's Select / Shoot / Blast; Esc back to Select)
Type a slider's value / restore its default double-click its value / its label
All of these ? (or the footer's ?)
Toggle points / frustums / images P / F / I
Toggle shaded / wireframe / box Shift+S / W / B
Toggle grid / axes / upright Shift+G / A / U
Cycle Gaussians: splats → ellipsoids → points E

Embedding in a web page

Put a model on any page with an iframe, no JavaScript:

<iframe src="https://s-esposito.github.io/3DView/v2/embed.html?asset=https://example.org/mug.glb&preset=presentation"
        style="width: 640px; height: 480px; border: 0"></iframe>

or drive it from the page with the SDK (/v2/dist/embed.js: ThreeDView.mount(el, {config, items}) → add, setTransform, getState, capture, events, …). The configuration sets how it looks, which panels and controls show, and what a person may do; messages add, place, select and animate items; events report what loaded, failed or was selected. The full reference, for people and AI agents alike, is docs/embedding.md, also served at https://s-esposito.github.io/3DView/v2/embedding.md.

Development

npm run lint && npm run build && npm test

Also: npm run watch (rebuild the extension on change), npm run check (the host-agnostic-core boundary guard) and npm run clean (drop every workspace's build output).

See CLAUDE.md for the architecture. License: MIT.


About

a vscode extension for local 3D scene visualization and analysis

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages