Skip to content

examples: Add splat-portal gaussian-splatting example#8738

Merged
mvaligursky merged 1 commit into
mainfrom
mv-splat-portal
May 18, 2026
Merged

examples: Add splat-portal gaussian-splatting example#8738
mvaligursky merged 1 commit into
mainfrom
mv-splat-portal

Conversation

@mvaligursky

@mvaligursky mvaligursky commented May 18, 2026

Copy link
Copy Markdown
Contributor

Adds a new Gaussian-splat example that joins two LOD-streamed splat scenes with a stencil-masked, walk-through portal. The Roman Parish scene and Skatepark scene are aligned by per-scene "portal anchors", so crossing the portal plane swaps which scene is "current" without any visible teleport. A translucent glass overlay sits inside the portal opening, and procedural snow gsplats are bound to the Skatepark layer (so they appear naturally in that world and through the portal).

Examples:

  • New examples/src/examples/gaussian-splatting/splat-portal.example.mjs with companion splat-portal.controls.mjs (shows current world + gsplat count).
  • Thumbnails added for the new example (gaussian-splatting_splat-portal_{large,small}.webp).

Technical notes:

  • Stencil-masked portal: invisible mask plane writes stencil + depth at the portal plane; the visible arch clears stencil over its silhouette so the through-scene only renders inside the actual opening.
  • Per-frame material flip on the two splat layers: the "through-scene" layer gets portalOnly stencil + FUNC_GREATER depth (oblique near-clip at the portal plane); the "from-scene" layer gets no stencil + FUNC_LESSEQUAL, letting foreground splats correctly occlude both the portal and the glass overlay.
  • Layer composition uses insertOpaque / insertTransparent directly to get an explicit sub-layer render order: mask opaque → arch opaque → through-scene transparent → glass transparent → from-scene transparent.
  • Walk-through detection uses a segment-vs-quad intersection in mask-plane local space, so walking around the plane doesn't trigger a swap.
  • Snow uses the existing GsplatWeather script bound to the Skatepark layer; a single SNOW_EXTENT controls the volume.
Screenshot 2026-05-18 at 08 46 12

Adds a new Gaussian-splat example that joins two LOD-streamed splat scenes
(Roman Parish + Skatepark) with a stencil-masked, walk-through portal.
Crossing the portal plane swaps which scene is "current" without any
visible teleport. Includes a translucent glass overlay inside the portal
opening and procedural snow gsplats bound to the Skatepark layer.
@mvaligursky mvaligursky self-assigned this May 18, 2026
@mvaligursky mvaligursky merged commit cbba252 into main May 18, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-splat-portal branch May 18, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant