| User Guide | Blog | Forum | Discord |
SplatTransform is an open source CLI tool for converting and editing Gaussian splats. It can:
π₯ Read PLY, Compressed PLY, SPLAT, KSPLAT, SPZ formats
π€ Write PLY, Compressed PLY, CSV, SOG and HTML viewer formats
π Merge multiple splats
π Apply transformations to input splats
ποΈ Filter out Gaussians or spherical harmonic bands
Install or update to the latest version:
npm install -g @playcanvas/splat-transform
splat-transform [GLOBAL] <input.{ply|compressed.ply|splat|ksplat}> [ACTIONS] ... <output.{ply|compressed.ply|sog|meta.json|csv|html}> [ACTIONS]
Key points:
- Every time an
*.ply*
appears, it becomes the current working set; the following ACTIONS are applied in the order listed - The last file on the command line is treated as the output; anything after it is interpreted as actions that modify the final result
Format | Input | Output | Description |
---|---|---|---|
.ply |
β | β | Standard PLY format |
.compressed.ply |
β | β | Compressed PLY format (auto-detected and decompressed on read) |
.ksplat |
β | β | Compressed splat format (mkkellogg format) |
.splat |
β | β | Compressed splat format (antimatter15 format) |
.spz |
β | β | Compressed splat format (Niantic format) |
.mjs |
β | β | Generate a scene using an mjs script (Beta) |
.sog |
β | β | Bundled super-compressed format (recommended) |
meta.json |
β | β | Unbundled super-compressed format (also outputs .webp images) |
.csv |
β | β | Comma-separated values spreadsheet |
.html |
β | β | Standalone HTML viewer app |
Actions can be repeated and applied in any order:
-t, --translate x,y,z Translate splats by (x, y, z)
-r, --rotate x,y,z Rotate splats by Euler angles (deg)
-s, --scale x Uniformly scale splats by factor x
-n, --filterNaN Remove any Gaussian containing NaN/Inf
-c, --filterByValue name,cmp,value Keep splats where <name> <cmp> <value>
cmp β {lt,lte,gt,gte,eq,neq}
-b, --filterBands {0|1|2|3} Strip spherical-harmonic bands > N
-P, --params name=value[,name=value...] Pass parameters to .mjs generator script
-w, --overwrite Overwrite output file if it already exists
-h, --help Show help and exit
-v, --version Show version and exit
-g, --no-gpu Disable gpu when compressing spherical harmonics.
-i, --iterations <number> Specify the number of iterations when compressing spherical harmonics. More iterations generally lead to better results. Default is 10.
-p, --cameraPos Specify the viewer starting position. Default is 2,2,-2.
-e, --cameraTarget Specify the viewer starting target. Default is 0,0,0.
# Simple format conversion
splat-transform input.ply output.csv
# Convert from .splat format
splat-transform input.splat output.ply
# Convert from .ksplat format
splat-transform input.ksplat output.ply
# Convert to compressed PLY
splat-transform input.ply output.compressed.ply
# Uncompress a compressed PLY back to standard PLY
# (compressed .ply is detected automatically on read)
splat-transform input.compressed.ply output.ply
# Convert to SOG bundled format
splat-transform input.ply output.sog
# Convert to SOG unbundled format
splat-transform input.ply output/meta.json
# Convert to HTML viewer with target and camera location
splat-transform -a 0,0,0 -e 0,0,10 input.ply output.html
# Scale and translate
splat-transform bunny.ply -s 0.5 -t 0,0,10 bunny_scaled.ply
# Rotate by 90 degrees around Y axis
splat-transform input.ply -r 0,90,0 output.ply
# Chain multiple transformations
splat-transform input.ply -s 2 -t 1,0,0 -r 0,0,45 output.ply
# Remove entries containing NaN and Inf
splat-transform input.ply --filterNaN output.ply
# Filter by opacity values (keep only splats with opacity > 0.5)
splat-transform input.ply -c opacity,gt,0.5 output.ply
# Strip spherical harmonic bands higher than 2
splat-transform input.ply --filterBands 2 output.ply
# Combine multiple files with different transforms
splat-transform -w cloudA.ply -r 0,90,0 cloudB.ply -s 2 merged.compressed.ply
# Apply final transformations to combined result
splat-transform input1.ply input2.ply output.ply -p 0,0,10 -e 0.5
Generator scripts can be used to synthesize gaussian splat data. See gen-grid.mjs for an example.
splat-transform gen-grid.mjs -P width=10,height=10,scale=10,color=0.1 scenes/grid.ply -w
# Show version
splat-transform --version
# Show help
splat-transform --help