Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions docs/user-manual/gaussian-splatting/formats/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Splat File Formats
description: "Compare PLY, SOG, Streamed SOG, GLB and SPZ splat formats for editing versus web delivery, size and quality trade-offs, and typical conversion workflows."
description: "Compare PLY, SOG, Streamed SOG, GLB, SPZ and LCC2 splat formats for editing versus web delivery, size and quality trade-offs, and typical conversion workflows."
---

PlayCanvas supports five formats for 3D Gaussian Splat data:
PlayCanvas supports six formats for 3D Gaussian Splat data:

## [PLY Format](./ply.md) - Source & Interchange

Expand Down Expand Up @@ -45,14 +45,22 @@ Binary glTF with the Khronos [KHR_gaussian_splatting](https://github.com/Khronos
- **File size**: Small (compressed)
- **Quality**: Visually optimized

## [LCC2 Format](./lcc2.md) - XGRIDS Large-Scene Streaming

[XGRIDS'](https://github.com/xgrids/LCC2Whitepaper) level of detail tree of splat files, stored as SOG or SPZ. The engine streams `.lcc2` scenes directly, so scenes exported by XGRIDS software need no conversion.

- **Use for**: Large scans from XGRIDS scanners and LCC Studio
- **File size**: Small per chunk, loaded on demand
- **Quality**: Lossy, view-dependent detail

## Quick Comparison

| | PLY | SOG | Streamed SOG | GLB | SPZ |
|---|---|---|---|---|---|
| **Size** | Large | Small (15-20× compression) | Small (SOG chunks, loaded on demand) | Large | Small (~10× compression) |
| **Quality** | Lossless | Lossy | Lossy, view-dependent detail | Lossless | Lossy |
| **Use** | Source/editing | Runtime/delivery | Very large scenes | glTF interchange | Niantic ecosystem |
| **Speed** | Slow loading | Fast loading | Progressive streaming | Fast loading | Fast loading |
| | PLY | SOG | Streamed SOG | GLB | SPZ | LCC2 |
|---|---|---|---|---|---|---|
| **Size** | Large | Small (15-20× compression) | Small (SOG chunks, loaded on demand) | Large | Small (~10× compression) | Small (SOG or SPZ chunks, loaded on demand) |
| **Quality** | Lossless | Lossy | Lossy, view-dependent detail | Lossless | Lossy | Lossy, view-dependent detail |
| **Use** | Source/editing | Runtime/delivery | Very large scenes | glTF interchange | Niantic ecosystem | XGRIDS scans |
| **Speed** | Slow loading | Fast loading | Progressive streaming | Fast loading | Fast loading | Progressive streaming |

## Workflow

Expand All @@ -61,4 +69,5 @@ Binary glTF with the Khronos [KHR_gaussian_splatting](https://github.com/Khronos
3. For very large scenes, convert to **Streamed SOG** instead
4. Use **GLB** when splats need to flow through standard glTF pipelines
5. Load **SPZ** directly when assets come from tools like Scaniverse
6. Deploy for optimal performance
6. Load **LCC2** directly when scenes come from XGRIDS scanners
7. Deploy for optimal performance
70 changes: 70 additions & 0 deletions docs/user-manual/gaussian-splatting/formats/lcc2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: The LCC2 Format
description: "LCC2 format for large 3D Gaussian splat scenes: XGRIDS level of detail tree with SOG or SPZ splat files, loading and streaming in the engine."
sidebar_label: LCC2
---

**LCC2** is a format for large Gaussian splat scenes from [XGRIDS](https://github.com/xgrids/LCC2Whitepaper), the maker of the Lixel scanners and LCC Studio. A scene is a tree of regions, each holding its splats at one level of detail (LOD), with the splats stored in chunk files that are streamed on demand. The engine loads `.lcc2` files directly, so scenes exported by XGRIDS software can be streamed without conversion.

:::note[Attribution]

The LCC2 data organization format originated from XGRIDS. The XGRIDS licence requires applications that ship LCC2 data to display the attribution "Data Organization Format originated from XGRIDS".

:::

## File Set

An LCC2 scene is a folder with a JSON index file and its splat files:

```none
scene/
├── scene.lcc2 # index: scene info and the LOD tree
├── data/
│ ├── 3dgs/ # splat files, .sog or .spz (required)
│ └── mesh/ # optional collision meshes (not loaded by the engine)
└── info/ # optional scene attributes, such as the spawn point
```

The splat files of a scene are all of one kind, either [SOG](./sog.md) or [SPZ](./spz.md), which the `splatType` field of the index states. Several regions can share one file, each referencing a range of splats within it.

## How the Tree Works

The index describes a tree of bounding boxes. Every node below the root holds one LOD of its region, and its children together hold the next finer level of the same region. The coarsest level sits just below the root and the leaves hold the finest. A viewer shows a node while it is far away, and swaps it for its children when it gets closer. The root holds no splats, only an optional environment chunk for far-field background such as sky.

## Loading in PlayCanvas

Load the `.lcc2` file as a `gsplat` asset, in the same way as a [Streamed SOG](./streamed-sog.md) scene. The splat files are then requested as the camera moves.

```javascript
const asset = new Asset('scene', 'gsplat', { url: 'scene/scene.lcc2' });
app.assets.add(asset);
app.assets.load(asset);

const entity = new Entity('scene');
entity.addComponent('gsplat', { asset });

// LCC2 scenes store +Z up
entity.setLocalEulerAngles(270, 0, 0);
app.root.addChild(entity);
```

How much detail is loaded, and how it falls off with distance, is controlled in the same way as for Streamed SOG. See [Controlling LOD Behavior](/user-manual/gaussian-splatting/building/lod-streaming#controlling-lod-behavior) and the [global splat budget](/user-manual/gaussian-splatting/building/performance#global-splat-budget).

### SOG and SPZ Splat Files

LCC2 scenes with SOG splat files need nothing beyond the engine, as SOG is built in. Scenes with SPZ splat files need the SPZ parser registered with the `gsplat` resource handler, because the splat files are requested by their `.spz` extension. See [Loading in PlayCanvas](./spz.md#loading-in-playcanvas) for the setup. SPZ version 3 files, which LCC2 uses, do not need the ZSTD module.

## Engine Support Notes

- Only the splats are loaded. The collision meshes, BVH files, spawn point and other scene information are ignored.
- The `offset`, `shift` and `scale` fields of the index are not applied.
- Spherical harmonics are loaded when the splat files contain them.
- The environment chunk, when present, is loaded and rendered with the scene. It represents the surroundings as seen from the scanned positions, so it can look like large blobs when the camera moves far from them.

## Examples

See the [Streamed LCC2 example](https://playcanvas.github.io/#/gaussian-splatting/streamed-lcc2) for a complete setup, and the [Viewer example](https://playcanvas.github.io/#/gaussian-splatting/viewer), which opens an LCC2 scene from its URL.

## Converting LCC2

[SplatTransform](/user-manual/splat-transform/) reads LCC2 scenes and can convert them to [Streamed SOG](./streamed-sog.md) or any other supported format. See [Generating Streamed SOG](/user-manual/splat-transform/streamed-sog).
9 changes: 5 additions & 4 deletions docs/user-manual/gaussian-splatting/formats/spz.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ Convert any supported splat format using [SplatTransform](/user-manual/splat-tra
splat-transform scene.ply scene.spz
```

This writes SPZ version 4 by default, which is the version the engine parser supports.
This writes SPZ version 4 by default. The engine parser supports versions 3 and 4.

## Loading in PlayCanvas

The SPZ parser is not part of the engine — it ships as a script with the engine ([`scripts/esm/parsers/spz-parser.mjs`](https://github.com/playcanvas/engine/blob/main/scripts/esm/parsers/spz-parser.mjs)) and is registered with the `gsplat` resource handler by the application.

The SPZ attribute streams are ZSTD compressed, so the parser also needs a ZSTD decompression WebAssembly module to be registered. A prebuilt module is available in the [engine repository](https://github.com/playcanvas/engine/tree/main/examples/assets/wasm/zstd).
The attribute streams of SPZ version 4 files are ZSTD compressed, so the parser also needs a ZSTD decompression WebAssembly module to be registered. A prebuilt module is available in the [engine repository](https://github.com/playcanvas/engine/tree/main/examples/assets/wasm/zstd). Version 3 files are gzip compressed as a whole and need no module.

```javascript
import { SpzParser } from 'playcanvas/scripts/esm/parsers/spz-parser.mjs';

// the spz attribute streams are ZSTD compressed - register a decoder module
// version 4 attribute streams are ZSTD compressed - register a decoder module
pc.WasmModule.setConfig('ZstdDecoderModule', {
glueUrl: 'zstd.wasm.js',
wasmUrl: 'zstd.wasm.wasm'
Expand All @@ -46,7 +46,8 @@ See the [simple-spz example](https://playcanvas.github.io/#/gaussian-splatting/s

## Engine Support Notes

- Only SPZ **version 4** is supported. Older gzip-based files (versions 1–3) are rejected — reconvert them with [SplatTransform](/user-manual/splat-transform/).
- SPZ **versions 3 and 4** are supported. Older files (versions 1 and 2) are rejected — reconvert them with [SplatTransform](/user-manual/splat-transform/).
- XGRIDS **LCC2** scenes can store their splat files as SPZ (typically version 3). With the parser registered, such a scene loads and streams like any other LCC2 scene, as the splat files are requested by their `.spz` extension.
- The splat data is kept in its quantized form in GPU memory (roughly 20 bytes per splat plus spherical harmonics) and dequantized in the shader, so GPU memory use is comparable to compressed PLY and SOG rather than uncompressed formats.
- Spherical harmonics are supported up to 3 bands. Files with degree 4 harmonics load with the extra band ignored.
- **Coordinate system**: splat data uses a +Y up coordinate system (like glTF), so unlike PLY files, no flip rotation is needed when placing the loaded splat in a scene.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Splat ファイル形式
description: 編集とWeb配信向けにPLY、SOG、Streamed SOG、GLB、SPZのスプラット形式を比較し、サイズと品質のトレードオフ、代表的な変換ワークフローを説明します。
description: 編集とWeb配信向けにPLY、SOG、Streamed SOG、GLB、SPZ、LCC2のスプラット形式を比較し、サイズと品質のトレードオフ、代表的な変換ワークフローを説明します。
---

PlayCanvasは、3D Gaussian Splatデータ用に5つの形式をサポートしています。
PlayCanvasは、3D Gaussian Splatデータ用に6つの形式をサポートしています。

## [PLY 形式](./ply.md) - ソース & 交換用

Expand Down Expand Up @@ -45,14 +45,22 @@ Khronosの[KHR_gaussian_splatting](https://github.com/KhronosGroup/glTF/tree/mai
- **ファイルサイズ**: 小 (圧縮済み)
- **品質**: 視覚的に最適化

## [LCC2 形式](./lcc2.md) - XGRIDSの大規模シーンのストリーミング用

[XGRIDS](https://github.com/xgrids/LCC2Whitepaper)による、SOGまたはSPZで保存されたスプラットファイルの詳細度ツリーです。エンジンは`.lcc2`シーンを直接ストリーミングするため、XGRIDSのソフトウェアで書き出したシーンを変換する必要はありません。

- **用途**: XGRIDSのスキャナーとLCC Studioによる大規模なスキャン
- **ファイルサイズ**: チャンクごとに小、オンデマンドで読み込み
- **品質**: ロッシー、視点依存の詳細度

## 簡易比較

| | PLY | SOG | Streamed SOG | GLB | SPZ |
|---|---|---|---|---|---|
| **サイズ** | 大 | 小 (15~20倍に圧縮) | 小 (SOGチャンク、オンデマンド読み込み) | 大 | 小 (約10倍に圧縮) |
| **品質** | ロスレス | ロッシー | ロッシー、視点依存の詳細度 | ロスレス | ロッシー |
| **用途** | ソース/編集 | ランタイム/配信 | 非常に大きなシーン | glTF交換用 | Nianticエコシステム |
| **速度** | 読み込みが遅い | 読み込みが速い | プログレッシブストリーミング | 読み込みが速い | 読み込みが速い |
| | PLY | SOG | Streamed SOG | GLB | SPZ | LCC2 |
|---|---|---|---|---|---|---|
| **サイズ** | 大 | 小 (15~20倍に圧縮) | 小 (SOGチャンク、オンデマンド読み込み) | 大 | 小 (約10倍に圧縮) | 小 (SOGまたはSPZチャンク、オンデマンド読み込み) |
| **品質** | ロスレス | ロッシー | ロッシー、視点依存の詳細度 | ロスレス | ロッシー | ロッシー、視点依存の詳細度 |
| **用途** | ソース/編集 | ランタイム/配信 | 非常に大きなシーン | glTF交換用 | Nianticエコシステム | XGRIDSのスキャン |
| **速度** | 読み込みが遅い | 読み込みが速い | プログレッシブストリーミング | 読み込みが速い | 読み込みが速い | プログレッシブストリーミング |

## ワークフロー

Expand All @@ -61,4 +69,5 @@ Khronosの[KHR_gaussian_splatting](https://github.com/KhronosGroup/glTF/tree/mai
3. 非常に大きなシーンの場合は、代わりに**Streamed SOG**に変換する
4. スプラットを標準的なglTFパイプラインで扱う必要がある場合は**GLB**を使用する
5. Scaniverseなどのツールで作成されたアセットは**SPZ**を直接読み込む
6. 最適なパフォーマンスを得るためにデプロイする
6. XGRIDSのスキャナーで作成されたシーンは**LCC2**を直接読み込む
7. 最適なパフォーマンスを得るためにデプロイする
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: LCC2形式
description: "大規模な3D Gaussian splatシーン向けのLCC2形式: SOGまたはSPZのスプラットファイルを持つXGRIDSの詳細度ツリーと、エンジンでの読み込みおよびストリーミング。"
sidebar_label: LCC2
---

**LCC2**は、LixelスキャナーとLCC Studioを提供する[XGRIDS](https://github.com/xgrids/LCC2Whitepaper)による、大規模なGaussian splatシーン向けの形式です。シーンは領域のツリーで、各領域が1つの詳細度(LOD)のスプラットを保持します。スプラットはチャンクファイルに保存され、必要に応じてストリーミングされます。エンジンは`.lcc2`ファイルを直接読み込むため、XGRIDSのソフトウェアで書き出したシーンを変換せずにストリーミングできます。

:::note[クレジット表記]

LCC2のデータ構成形式はXGRIDSが考案したものです。XGRIDSのライセンスでは、LCC2データを含むアプリケーションに「Data Organization Format originated from XGRIDS」というクレジットの表示が求められます。

:::

## ファイル構成

LCC2シーンは、JSONのインデックスファイルとスプラットファイルを含むフォルダーです。

```none
scene/
├── scene.lcc2 # インデックス: シーン情報とLODツリー
├── data/
│ ├── 3dgs/ # スプラットファイル、.sogまたは.spz (必須)
│ └── mesh/ # 任意のコリジョンメッシュ (エンジンでは読み込まれません)
└── info/ # 任意のシーン属性 (スポーン位置など)
```

シーンのスプラットファイルはすべて同じ種類で、[SOG](./sog.md)または[SPZ](./spz.md)のいずれかです。どちらであるかはインデックスの`splatType`フィールドに記載されています。複数の領域が1つのファイルを共有でき、それぞれがファイル内のスプラットの範囲を参照します。

## ツリーの仕組み

インデックスはバウンディングボックスのツリーを記述します。ルート以下の各ノードは、その領域の1つのLODを保持し、その子ノードを合わせると同じ領域の次に細かいレベルになります。最も粗いレベルはルートの直下にあり、リーフが最も細かいレベルを保持します。ビューアは、ノードが遠いうちはそのノードを表示し、近づくとその子ノードに置き換えます。ルートにはスプラットはなく、空などの遠景のための任意の環境チャンクのみがあります。

## PlayCanvasでの読み込み

[Streamed SOG](./streamed-sog.md)シーンと同様に、`.lcc2`ファイルを`gsplat`アセットとして読み込みます。スプラットファイルは、カメラの移動に合わせて要求されます。

```javascript
const asset = new Asset('scene', 'gsplat', { url: 'scene/scene.lcc2' });
app.assets.add(asset);
app.assets.load(asset);

const entity = new Entity('scene');
entity.addComponent('gsplat', { asset });

// LCC2シーンは+Zが上方向です
entity.setLocalEulerAngles(270, 0, 0);
app.root.addChild(entity);
```

読み込まれる詳細度の量と、距離による減衰は、Streamed SOGと同じ方法で制御します。[LOD動作の制御](/user-manual/gaussian-splatting/building/lod-streaming#controlling-lod-behavior)と[グローバルスプラット予算](/user-manual/gaussian-splatting/building/performance#global-splat-budget)を参照してください。

### SOGとSPZのスプラットファイル

スプラットファイルがSOGのLCC2シーンは、SOGがエンジンに組み込まれているため、エンジン以外には何も必要ありません。スプラットファイルがSPZのシーンでは、スプラットファイルが`.spz`拡張子で要求されるため、SPZパーサーを`gsplat`リソースハンドラーに登録する必要があります。セットアップについては[PlayCanvasでの読み込み](./spz.md#loading-in-playcanvas)を参照してください。LCC2が使用するSPZバージョン3のファイルには、ZSTDモジュールは不要です。

## エンジンサポートに関する注意

- 読み込まれるのはスプラットのみです。コリジョンメッシュ、BVHファイル、スポーン位置、その他のシーン情報は無視されます。
- インデックスの`offset`、`shift`、`scale`フィールドは適用されません。
- スプラットファイルに球面調和関数が含まれている場合は、読み込まれます。
- 環境チャンクがある場合は、シーンとともに読み込まれて描画されます。これはスキャンした位置から見た周囲の景色を表すため、カメラがそれらの位置から大きく離れると、大きな塊のように見えることがあります。

## サンプル

完全なセットアップについては[Streamed LCC2のサンプル](https://playcanvas.github.io/#/gaussian-splatting/streamed-lcc2)を、URLからLCC2シーンを開く[Viewerのサンプル](https://playcanvas.github.io/#/gaussian-splatting/viewer)を参照してください。

## LCC2の変換

[SplatTransform](/user-manual/splat-transform/)はLCC2シーンを読み込み、[Streamed SOG](./streamed-sog.md)やその他のサポートされている形式に変換できます。[Streamed SOGの生成](/user-manual/splat-transform/streamed-sog)を参照してください。
Loading
Loading