Streamed SOG
Streamed SOG enables efficient rendering of large Gaussian splat scenes by dynamically loading appropriate levels of detail (LOD) for each region of the scene, within a global splat budget. This dramatically reduces memory usage and improves rendering performance for large-scale splat scenes.
How It Works
Streamed SOG works by:
- Pre-generating multiple versions of your splat at different detail levels
- Organizing them into a spatial tree structure for efficient streaming
- Dynamically loading and unloading detail levels to fit a global splat budget, spending detail where it improves the image the most
- Rendering only the selected 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 Streamed SOG Data
To use Streamed SOG, you need to generate the format — a lod-meta.json spatial tree structure that organizes multiple levels of detail for efficient streaming (see the Streamed SOG Format Specification). 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 Streamed SOG format. See the Generating Streamed SOG guide for detailed instructions.
Live Examples
Explore these live examples to see Streamed SOG in action:
- Streamed SOG (Basic) - Demonstrates basic streaming with different detail levels
- Streamed SOG with Spherical Harmonics - Shows streaming with spherical harmonic data
Enabling Streamed SOG
Streaming is enabled simply by loading a Streamed SOG asset (lod-meta.json) onto a GSplat component — no additional configuration is required.
Controlling LOD Behavior
How LOD Is Chosen
The engine picks one LOD level per region of the scene so that the total splat count fits the global splat budget, spending detail where it improves the image the most. It combines each region's projected size on screen with a measure of how much visual error each of its LOD levels would leave. These error metrics are read from lod-meta.json when present (SplatTransform 3.3 and newer writes them) and are derived automatically from the splat counts otherwise — no configuration is required either way. LOD selection also compensates for the camera's field of view automatically.
LOD Mode
lodMode on app.scene.gsplat selects between two strategies:
app.scene.gsplat.lodMode = pc.GSPLAT_LODMODE_DISTANCE;
GSPLAT_LODMODE_ERROR(default): the budget goes where it removes the most visual error per splat.GSPLAT_LODMODE_DISTANCE: error metadata is ignored and detail is ordered by camera distance alone, stepping down in concentric bands around the camera with the band edges adapting to the budget. Useful when a capture's error data does not match its visual importance.
LOD Falloff
lodFalloff on the gsplat component controls how quickly that splat's detail drops with distance from the camera, in either mode:
entity.gsplat.lodFalloff = 2; // more detail near the camera, less in the distance
The value ranges from 0 to 8 and defaults to 1, which gives a balanced falloff. Higher values concentrate detail near the camera at the cost of the far field, while values towards 0 spread it evenly across the scene regardless of the view. This primarily redistributes the detail the splat receives from the budget between its near and far field, though it can also shift how the budget divides between splats.
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 Streamed SOG 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 Streamed SOG in the Editor
Native support for Streamed SOG in the PlayCanvas Editor will be added in the near future. In the meantime, you can use the Engine API in scripts to enable Streamed SOG functionality in your Editor projects.
Sample Project
We've created a sample project that demonstrates how to use Streamed SOG with Gaussian splats in the PlayCanvas Editor:
Church of Saints Peter and Paul
This project showcases a large-scale Gaussian splat scene with Streamed SOG, 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 Streamed SOG:
Setup Steps
- Add the script to an Entity in your scene
- Configure the
splatUrlproperty to point to an externally hosted Streamed SOG file
Currently, the Streamed SOG data needs to be hosted externally (not as an Editor asset). This limitation will be removed in the future when native Editor support for Streamed SOG 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 Streamed SOG is added, the following improvements are planned:
- Direct Asset Import: Upload Streamed SOG 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 behavior directly in the Editor viewport
Benefits
- Better Performance: Streamed SOG 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