| 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, SOG (bundled .sog or unbundled meta.json) formats
π€ Write PLY, Compressed PLY, CSV, SOG (bundled or unbundled) 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 [ACTIONS] ... output [ACTIONS]
Key points:
- Input files become the working set; ACTIONS are applied in order
- The last file is the output; actions after it modify the final result
Format | Input | Output | Description |
---|---|---|---|
.ply |
β | β | Standard PLY format |
.sog |
β | β | Bundled super-compressed format (recommended) |
meta.json |
β | β | Unbundled super-compressed format (accompanied by .webp textures) |
.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) |
.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 (x, y, z), in degrees.
-s, --scale <factor> Uniformly scale splats by factor.
-N, --filter-nan Remove Gaussians with NaN or Inf values.
-V, --filter-value <name,cmp,value> Keep splats where <name> <cmp> <value>
cmp β {lt,lte,gt,gte,eq,neq}
-H, --filter-harmonics <0|1|2|3> Remove spherical harmonic bands > n.
-B, --filter-box <mx,my,mz,Mx,My,Mz> Remove Gaussians outside box (min, max corners).
-S, --filter-sphere <x,y,z,radius> Remove Gaussians outside sphere (center, radius).
-p, --params <key=val,...> Pass parameters to .mjs generator script.
-h, --help Show this help and exit.
-v, --version Show version and exit.
-w, --overwrite Overwrite output file if it exists.
-c, --cpu Use CPU for spherical harmonic compression.
-i, --iterations <n> Iterations for SOG SH compression (more = better). Default: 10.
-C, --camera-pos <x,y,z> HTML viewer camera position. Default: (2, 2, -2).
-T, --camera-target <x,y,z> HTML viewer target position. Default: (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 from SOG (bundled) back to PLY
splat-transform scene.sog restored.ply
# Convert from SOG (unbundled folder) back to PLY
splat-transform output/meta.json restored.ply
# Convert to HTML viewer with target and camera location
splat-transform -C 0,0,0 -T 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 --filter-nan output.ply
# Filter by opacity values (keep only splats with opacity > 0.5)
splat-transform input.ply -V opacity,gt,0.5 output.ply
# Strip spherical harmonic bands higher than 2
splat-transform input.ply --filter-harmonics 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 -t 0,0,10 -s 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