@playcanvas/splat-transform 0.15.2 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -3
- package/dist/index.mjs +1439 -797
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ splat-transform [GLOBAL] input [ACTIONS] ... output [ACTIONS]
|
|
|
50
50
|
| `.spz` | ✅ | ❌ | Compressed splat format (Niantic format) |
|
|
51
51
|
| `.mjs` | ✅ | ❌ | Generate a scene using an mjs script (Beta) |
|
|
52
52
|
| `.csv` | ❌ | ✅ | Comma-separated values spreadsheet |
|
|
53
|
-
| `.html` | ❌ | ✅ |
|
|
53
|
+
| `.html` | ❌ | ✅ | HTML viewer app (single-page or unbundled) based on SOG |
|
|
54
54
|
|
|
55
55
|
## Actions
|
|
56
56
|
|
|
@@ -77,9 +77,11 @@ Actions can be repeated and applied in any order:
|
|
|
77
77
|
-v, --version Show version and exit
|
|
78
78
|
-q, --quiet Suppress non-error output
|
|
79
79
|
-w, --overwrite Overwrite output file if it exists
|
|
80
|
-
-c, --cpu Use CPU for SOG spherical harmonic compression
|
|
81
80
|
-i, --iterations <n> Iterations for SOG SH compression (more=better). Default: 10
|
|
81
|
+
-L, --list-gpus List all available GPU adapters and exit
|
|
82
|
+
-g, --gpu <n|cpu> Select device for SOG compression: GPU adapter index | 'cpu'
|
|
82
83
|
-E, --viewer-settings <settings.json> HTML viewer settings JSON file
|
|
84
|
+
-U, --unbundled Generate unbundled HTML viewer with separate files
|
|
83
85
|
-O, --lod-select <n,n,...> Comma-separated LOD levels to read from LCC input
|
|
84
86
|
-C, --lod-chunk-count <n> Approx number of Gaussians per LOD chunk in K. Default: 512
|
|
85
87
|
-X, --lod-chunk-extent <n> Approx size of an LOD chunk in world units (m). Default: 16
|
|
@@ -121,9 +123,12 @@ splat-transform scene.sog restored.ply
|
|
|
121
123
|
# Convert from SOG (unbundled folder) back to PLY
|
|
122
124
|
splat-transform output/meta.json restored.ply
|
|
123
125
|
|
|
124
|
-
# Convert to standalone HTML viewer
|
|
126
|
+
# Convert to standalone HTML viewer (bundled, single file)
|
|
125
127
|
splat-transform input.ply output.html
|
|
126
128
|
|
|
129
|
+
# Convert to unbundled HTML viewer (separate CSS, JS, and SOG files)
|
|
130
|
+
splat-transform -U input.ply output.html
|
|
131
|
+
|
|
127
132
|
# Convert to HTML viewer with custom settings
|
|
128
133
|
splat-transform -E settings.json input.ply output.html
|
|
129
134
|
```
|
|
@@ -172,6 +177,31 @@ Generator scripts can be used to synthesize gaussian splat data. See [gen-grid.m
|
|
|
172
177
|
splat-transform gen-grid.mjs -p width=10,height=10,scale=10,color=0.1 scenes/grid.ply -w
|
|
173
178
|
```
|
|
174
179
|
|
|
180
|
+
### Device Selection for SOG Compression
|
|
181
|
+
|
|
182
|
+
When compressing to SOG format, you can control which device (GPU or CPU) performs the compression:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# List available GPU adapters
|
|
186
|
+
splat-transform --list-gpus
|
|
187
|
+
|
|
188
|
+
# Let WebGPU automatically choose the best GPU (default behavior)
|
|
189
|
+
splat-transform input.ply output.sog
|
|
190
|
+
|
|
191
|
+
# Explicitly select a GPU adapter by index
|
|
192
|
+
splat-transform -g 0 input.ply output.sog # Use first listed adapter
|
|
193
|
+
splat-transform -g 1 input.ply output.sog # Use second listed adapter
|
|
194
|
+
|
|
195
|
+
# Use CPU for compression instead (much slower but always available)
|
|
196
|
+
splat-transform -g cpu input.ply output.sog
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
> [!NOTE]
|
|
200
|
+
> When `-g` is not specified, WebGPU automatically selects the best available GPU. Use `-L` to list available adapters with their indices and names. The order and availability of adapters depends on your system and GPU drivers. Use `-g <index>` to select a specific adapter, or `-g cpu` to force CPU computation.
|
|
201
|
+
|
|
202
|
+
> [!WARNING]
|
|
203
|
+
> CPU compression can be significantly slower than GPU compression (often 5-10x slower). Use CPU mode only if GPU drivers are unavailable or problematic.
|
|
204
|
+
|
|
175
205
|
## Getting Help
|
|
176
206
|
|
|
177
207
|
```bash
|