Skip to content
Open
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
53 changes: 53 additions & 0 deletions docs/user-manual/gaussian-splatting/building/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,56 @@ Given the fragment-heavy nature of Gaussian splatting, these settings have a sig
- **Disable `Device Pixel Ratio`**: This reduces the overall pixel resolution, directly reducing the number of fragments that need to be processed

Both settings help reduce the fragment processing load, which is the primary bottleneck in 3DGS rendering.

## LOD Streaming Configuration

When using [LOD Streaming](/user-manual/gaussian-splatting/building/unified-rendering/lod-streaming), you have several options to control quality and performance. The recommended approach is to use the **global splat budget** which automatically manages LOD selection across all GSplat assets in your scene.

### Global Splat Budget

The global splat budget is the primary way to control rendering performance for LOD streaming. Set it via:

```javascript
app.scene.gsplat.splatBudget = 4000000; // 4 million splats max
```

When a budget is set, the engine automatically adjusts LOD levels across all GSplat assets to stay within the budget. It prioritizes nearby geometry (using finer LOD) while degrading distant geometry first. This provides a consistent frame rate regardless of how many splats are potentially visible.

- **Budget = 0**: Disables budget enforcement, using only distance-based LOD selection
- **Budget > 0**: Enforces the specified maximum splat count across all GSplat assets

The budget system accounts for all GSplat assets in the scene, including both LOD-streaming assets (with multiple detail levels) and fixed assets (single detail level).

### LOD Distances

LOD distances control at which camera distances each level of detail is selected. These are configured per GSplat component:

```javascript
entity.gsplat.lodDistances = [5, 10, 20, 40, 80, 160];
```

Each value represents the distance threshold for transitioning to the next LOD level. Smaller values result in higher quality at close range but faster degradation with distance.

### LOD Range Limits

The `lodRangeMin` and `lodRangeMax` settings restrict which LOD levels can be used:

```javascript
app.scene.gsplat.lodRangeMin = 0; // Allow highest quality LOD
app.scene.gsplat.lodRangeMax = 3; // Never go lower than LOD 3
```

These settings are useful for:

- **Reducing downloads**: On devices with slow internet connections, setting a higher `lodRangeMin` prevents downloading the highest quality (and largest) LOD files
- **Memory constraints**: Limiting LOD range reduces memory usage by avoiding loading of certain detail levels

However, for typical rendering performance management, the global splat budget is more effective than LOD range limits. The budget automatically finds the right balance across all assets, while LOD range limits apply uniformly regardless of camera position or scene composition.

### Recommended Configuration

For most applications:

1. **Set a global splat budget** appropriate for your target hardware (e.g., 1 million for mobile, 3+ million for desktop)
2. **Leave LOD range at defaults** (min=0, max=highest available) unless you have specific download or memory constraints
3. **Tune LOD distances** if you want finer control over quality transitions at specific distances
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,56 @@ Gaussian splattingのフラグメント重視の性質を考えると、これ
- **`Device Pixel Ratio`を無効にする**:これにより全体的なピクセル解像度が下がり、処理が必要なフラグメント数が直接削減される

両方の設定は、3DGSレンダリングの主なボトルネックであるフラグメント処理負荷の削減に役立ちます。

## LODストリーミング設定

[LODストリーミング](/user-manual/gaussian-splatting/building/unified-rendering/lod-streaming)を使用する場合、品質とパフォーマンスを制御するためのいくつかのオプションがあります。推奨されるアプローチは、シーン内のすべてのGSplatアセットのLOD選択を自動的に管理する**グローバルスプラットバジェット**を使用することです。

### グローバルスプラットバジェット

グローバルスプラットバジェットは、LODストリーミングのレンダリングパフォーマンスを制御する主要な方法です。以下のように設定します:

```javascript
app.scene.gsplat.splatBudget = 4000000; // 最大400万スプラット
```

バジェットが設定されると、エンジンはバジェット内に収まるようにすべてのGSplatアセットのLODレベルを自動的に調整します。近くのジオメトリを優先し(より細かいLODを使用)、遠くのジオメトリから先に品質を下げます。これにより、潜在的に表示可能なスプラット数に関係なく、一貫したフレームレートが提供されます。

- **バジェット = 0**:バジェット適用を無効にし、距離ベースのLOD選択のみを使用
- **バジェット > 0**:すべてのGSplatアセットに対して指定された最大スプラット数を適用

バジェットシステムは、LODストリーミングアセット(複数の詳細レベルを持つ)と固定アセット(単一の詳細レベル)の両方を含む、シーン内のすべてのGSplatアセットを考慮します。

### LOD距離

LOD距離は、各詳細レベルが選択されるカメラ距離を制御します。これらはGSplatコンポーネントごとに設定されます:

```javascript
entity.gsplat.lodDistances = [5, 10, 20, 40, 80, 160];
```

各値は、次のLODレベルへの遷移の距離しきい値を表します。値が小さいほど、近距離で高品質になりますが、距離に応じてより速く品質が低下します。

### LOD範囲制限

`lodRangeMin`と`lodRangeMax`設定は、使用可能なLODレベルを制限します:

```javascript
app.scene.gsplat.lodRangeMin = 0; // 最高品質のLODを許可
app.scene.gsplat.lodRangeMax = 3; // LOD 3より低くはしない
```

これらの設定は以下の場合に役立ちます:

- **ダウンロードの削減**:インターネット接続が遅いデバイスでは、`lodRangeMin`を高く設定することで、最高品質(かつ最大サイズ)のLODファイルのダウンロードを防ぐことができます
- **メモリ制約**:LOD範囲を制限することで、特定の詳細レベルの読み込みを避け、メモリ使用量を削減できます

ただし、一般的なレンダリングパフォーマンス管理には、LOD範囲制限よりもグローバルスプラットバジェットの方が効果的です。バジェットはすべてのアセット間で適切なバランスを自動的に見つけますが、LOD範囲制限はカメラ位置やシーン構成に関係なく一律に適用されます。

### 推奨設定

ほとんどのアプリケーションでは:

1. ターゲットハードウェアに適した**グローバルスプラットバジェットを設定**します(例:モバイルでは100万、デスクトップでは300万以上)
2. 特定のダウンロードやメモリの制約がない限り、**LOD範囲はデフォルトのままにします**(min=0、max=利用可能な最高値)
3. 特定の距離での品質遷移をより細かく制御したい場合は、**LOD距離を調整**します