SplatTransform CLI Tool
SplatTransform is a powerful command-line tool designed to make working with 3D Gaussian Splats effortless. Whether you need to convert between formats, apply transformations, or analyze splat data, SplatTransform provides the tools developers need for precise control over their Gaussian splat workflows.
SplatTransform is open-sourced under an MIT license on GitHub
Why Use SplatTransform?โ
SplatTransform solves important problems developers face when working with Gaussian splats:
๐ Broad Format Support โ seamlessly convert between PLY, SPLAT, KSPLAT, SOG and even CSV
๐ ๏ธ Powerful Transformations โ translate, rotate, and scale your splats with precision
๐งน Smart Filtering โ remove NaN values, filter by properties, and strip unnecessary data
๐ฆ Scene Merging โ combine multiple splat files into a merged scene
โก Production Ready โ optimized for maximum performance
๐ Open Source โ completely free and available on GitHub
Installationโ
Install SplatTransform globally via npm:
npm install -g @playcanvas/splat-transform
Verify your installation:
splat-transform --version
Basic Usageโ
The general syntax for SplatTransform is:
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 Conversionโ
Convert between commonly used splat formats with simple commands:
# 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 standalone HTML viewer
splat-transform input.ply output.html
# Convert to HTML viewer with custom settings
splat-transform -E settings.json input.ply output.html
SplatTransform detects file format based on extension. Supported formats are shown below:
| 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 (embeds SOG format) |
Actionsโ
Actions can be repeated and applied in any order to transform and filter your splats:
-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
-H, --filter-harmonics <0|1|2|3> Remove spherical harmonic bands > n
-N, --filter-nan Remove Gaussians with NaN or Inf values
-B, --filter-box <x,y,z,X,Y,Z> Remove Gaussians outside box (min, max corners)
-S, --filter-sphere <x,y,z,radius> Remove Gaussians outside sphere (center, radius)
-V, --filter-value <name,cmp,value> Keep splats where <name> <cmp> <value>
cmp โ {lt,lte,gt,gte,eq,neq}
-p, --params <key=val,...> Pass parameters to .mjs generator script
Global Optionsโ
-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 SOG spherical harmonic compression
-i, --iterations <n> Iterations for SOG SH compression (more=better). Default: 10
-E, --viewer-settings <settings.json> HTML viewer settings JSON file
See the SuperSplat Viewer Settings Schema for details on how to pass data to the -E option.
Transformationsโ
Apply Spatial Transformationsโ
Transform your splats during conversion with intuitive command-line options:
# 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
Filtering and Optimizationโ
Smart Filteringโ
Remove unwanted data and optimize your splats for production:
# 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
Scene Mergingโ
Combine multiple splat files into a single scene with individual transformations:
# 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
CSV Export for Data Analysisโ
One of SplatTransform's most powerful features is CSV export, enabling data science workflows:
# Export splat data to CSV
splat-transform scene.ply data.csv
# Pre-filter before exporting for analysis
splat-transform input.ply --filter-nan -V opacity,gt,0.1 analysis.csv
Why CSV Export Mattersโ
- Spreadsheet Analysis โ Import directly into Excel, Google Sheets, or any data analysis tool
- Statistical Insights โ Calculate distributions, correlations, and quality metrics
- Custom Filtering โ Use spreadsheet formulas to identify outliers or segment data
- Visualization โ Create charts and graphs to understand splat data patterns
- Integration โ Feed splat data into machine learning pipelines or custom workflows
CSV export transforms your splats from opaque binary files into readable, analyzable datasets perfect for research and optimization.
Generators (Beta)โ
Generator scripts can be used to synthesize gaussian splat data. This allows you to procedurally create splat scenes using JavaScript:
splat-transform gen-grid.mjs -p width=10,height=10,scale=10,color=0.1 scenes/grid.ply -w
See the example generator scripts in the GitHub repository for more details.
Common Workflowsโ
Production Optimization Pipelineโ
# Clean, limit spherical harmonic bands, and apply a scale for production
splat-transform raw_capture.ply \
--filter-nan \
--filter-harmonics 2 \
-s 0.8 \
production/capture.sog
Format Migrationโ
# Convert existing KSPLAT assets to PlayCanvas SOG
for file in *.ksplat; do
splat-transform "$file" "${file%.ksplat}.sog"
done
Quality Analysisโ
# Export for quality analysis in spreadsheet
splat-transform scene.ply \
--filter-nan \
-V opacity,gt,0.05 \
quality_analysis.csv
Multi-Scene Compositionโ
# Combine multiple scenes with precise positioning
splat-transform \
environment.ply -t 0,0,0 \
character.ply -t 2,0,1 -r 0,180,0 \
props.ply -t -3,0,2 -s 1.2 \
complete_scene.ply
Getting Helpโ
Get help for any command:
# General help
splat-transform --help
# Get version information
splat-transform --version
For issues, feature requests, or contributions, visit the GitHub repository. The project welcomes bug reports and pull requests from the community.