Skip to main content

LOD Streaming

LOD (Level of Detail) Streaming enables efficient rendering of large Gaussian splat scenes by dynamically loading appropriate levels of detail based on the camera's distance. This feature dramatically reduces memory usage and improves rendering performance for large-scale splat scenes.

How It Works

LOD streaming works by:

  1. Pre-generating multiple versions of your splat at different detail levels
  2. Organizing them into an octree structure for efficient streaming
  3. Dynamically loading and unloading detail levels based on camera distance
  4. Rendering only the appropriate level of detail for each region of the scene

This approach allows you to render massive splat scenes that would otherwise be impossible due to memory constraints.

Creating LOD Streaming Data

To use LOD streaming, you need to generate the streaming format — an octree-based lod-meta.json structure that organizes multiple levels of detail for efficient streaming. There are two ways to obtain the LOD levels:

  • Provide your own LOD levels — supply multiple splat files at progressively lower detail (LOD 0 = highest detail, higher numbers = lower detail), for example produced during training or exported separately.
  • Generate them with SplatTransform — use SplatTransform to decimate a single high-quality splat into lower-detail levels, so you don't have to author them yourself.

Once you have the LOD levels, SplatTransform bundles them into the streaming-optimized format. See the Generating LOD Format section in the SplatTransform documentation for detailed instructions.

Live Examples

Explore these live examples to see LOD streaming in action:

  • LOD Streaming (Basic) - Demonstrates basic LOD streaming with different detail levels
LOD Streaming (Basic)
  • LOD Streaming with Spherical Harmonics - Shows LOD streaming with spherical harmonic data
LOD Streaming with Spherical Harmonics

Enabling LOD Streaming

LOD streaming is enabled simply by loading a streaming LOD format asset (lod-meta.json) onto a GSplat component — no additional configuration is required.

Controlling LOD Behavior

You can control and fine-tune LOD streaming using the following APIs:

Component-Level Control

Use lodBaseDistance and lodMultiplier to control LOD distance thresholds. Thresholds follow a geometric progression: lodBaseDistance * lodMultiplier^i:

entity.gsplat.lodBaseDistance = 10; // distance for the first LOD transition
entity.gsplat.lodMultiplier = 2; // each successive threshold is 2x farther

The default multiplier of 2 gives perceptually uniform transitions under perspective projection. The system also compensates for camera FOV automatically.

Scene-Level Control

The Scene.gsplat property provides access to scene-wide settings for gsplat rendering. This includes options for:

  • Performance tuning parameters
  • Debug visualization settings
  • Memory management controls
  • Stream loading behavior
// Access scene-level gsplat settings
const gsplatSettings = app.scene.gsplat;

// Configure settings as needed
// (See API documentation for available properties)

The most important scene-level setting for LOD streaming is the global splat budget, which automatically balances detail across all GSplat assets to hit a target splat count. See Global Splat Budget in the Performance section for details.

Using LOD Streaming in the Editor

Native support for LOD streaming in the PlayCanvas Editor will be added in the near future. In the meantime, you can use the Engine API in scripts to enable streaming LOD functionality in your Editor projects.

Sample Project

We've created a sample project that demonstrates how to use streaming LOD with Gaussian splats in the PlayCanvas Editor:

Church of Saints Peter and Paul

This project showcases a large-scale Gaussian splat scene with LOD streaming, including custom reveal shader effects.

Using the Streamed GSplat Script

The sample project includes a streamed-gsplat.mjs script that can be added to any Entity to enable LOD streaming:

Setup Steps

  1. Add the script to an Entity in your scene
  2. Configure the splatUrl property to point to an externally hosted LOD splat format file
External Hosting

Currently, the LOD splat data needs to be hosted externally (not as an Editor asset). This limitation will be removed in the future when native Editor support for streaming LOD format is added.

Quality Settings

The streamed-gsplat.mjs script provides four different quality/performance presets, allowing you to specify:

  • Which LOD levels to load
  • At what distances each LOD level should be displayed

These settings enable fine-tuned control over the balance between visual quality and rendering performance, making it easy to optimize for different target platforms and devices.

Custom Shader Effects

The sample project also demonstrates how to create custom shader effects for Gaussian splats. It includes scripts from the PlayCanvas Engine GSplat Scripts repository.

Specifically, the project uses the Reveal Radial shader effect (along with its base class) to create an animated reveal of the splat scene. This effect:

  • Creates radial waves emanating from a center point
  • First shows small colored dots progressively
  • Then lifts particles up with a highlight effect before settling to their original state

This demonstrates the flexibility of the PlayCanvas Engine's shader system for creating compelling visual effects with Gaussian splats.

Future Editor Improvements

As native Editor support for streaming LOD is added, the following improvements are planned:

  • Direct Asset Import: Upload LOD splat files directly as Editor assets (no external hosting needed)
  • Visual Configuration: Configure LOD settings through the Editor UI instead of script properties
  • Preview in Editor: View and test streaming LOD behavior directly in the Editor viewport

Benefits

  • Better Performance: LOD streaming reduces memory usage and improves rendering performance for large scenes
  • Scalability: Enables rendering of much larger Gaussian splat scenes by dynamically loading appropriate detail levels
  • Flexibility: Provides fine-grained control over LOD distances and streaming behavior
  • Optimized Loading: Only loads the data needed for the current view

See Also