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, SOGS 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โ
Format Conversionโ
Convert between commonly used splat formats with simple commands:
# Convert KSPLAT to PLY
splat-transform input.ksplat converted.ply
# Convert PLY to SOGS format
splat-transform input.ply meta.json
# Convert to SPLAT format
splat-transform input.ply output.splat
SplatTransform detects file format based on extension. Supported formats are shown below:
Format | Extension | Input | Output | Description |
---|---|---|---|---|
PLY | .ply | โ | โ | Uncompressed binary format |
SPLAT | .splat | โ | โ | Binary format (antimatter15) |
KSPLAT | .ksplat | โ | โ | Compressed binary format (mkkellogg) |
Compressed PLY | .compressed.ply | โ | โ | Compressed binary format |
SOGS | meta.json | โ | โ | Super-compressed format (JSON + WebP) |
CSV | .csv | โ | โ | Comma-separated values for analysis |
Transformationsโ
Apply Spatial Transformationsโ
Transform your splats during conversion with intuitive command-line options:
# Translate splats
splat-transform input.ply -t 0,0,10 translated.ply
# Rotate around Y-axis by 90 degrees
splat-transform input.ply -r 0,90,0 rotated.ply
# Scale splats by 50%
splat-transform input.ply -s 0.5 scaled.ply
# Combine multiple transformations
splat-transform input.ply -s 0.5 -t 0,0,10 -r 0,90,0 transformed.ply
Transformation Optionsโ
Option | Description | Format |
---|---|---|
-t, --translate | Translation vector | x,y,z |
-r, --rotate | Rotation in degrees | x,y,z |
-s, --scale | Uniform scale factor | number |
Filtering and Optimizationโ
Smart Filteringโ
Remove unwanted data and optimize your splats for production:
# Remove NaN values
splat-transform input.ply --filterNaN cleaned.ply
# Filter by opacity (keep splats with opacity > 0.3)
splat-transform input.ply -c opacity,gt,0.3 filtered.ply
# Remove unnecessary data bands
splat-transform input.ply --filterBands 2 optimized.ply
# Combine multiple filters
splat-transform input.ply --filterNaN -c opacity,gt,0.1 --filterBands 2 production.ply
Filter Optionsโ
Option | Description | Usage |
---|---|---|
-n, --filterNaN | Remove splats with NaN values | --filterNaN |
-c, --condition | Filter by property condition | -c property,operator,value |
-b, --filterBands | Retain specified number of spherical-harmonic bands | --filterBands 0/1/2/3 |
Condition Operatorsโ
gt
- Greater thanlt
- Less thaneq
- Equal togte
- Greater than or equallte
- Less than or equal
Scene Mergingโ
Combine multiple splat files into a single scene with individual transformations:
# Simple merge
splat-transform fileA.ply fileB.ply merged.ply
# Merge with different transformations per file
splat-transform inputA.ply -r 0,90,0 inputB.ply -s 2 merged.ply
# Complex multi-file merge
splat-transform \
scene1.ply -t 0,0,0 \
scene2.ply -t 10,0,0 -r 0,45,0 \
scene3.ply -t 0,0,10 -s 0.8 \
combined_scene.ply
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 --filterNaN -c 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.
Common Workflowsโ
Production Optimization Pipelineโ
# Clean, filter, and optimize for production
splat-transform raw_capture.ply \
--filterNaN \
-c opacity,gt,0.2 \
--filterBands 2 \
-s 0.8 \
production/meta.json
Format Migrationโ
# Convert existing KSPLAT assets to PlayCanvas SOGS
for file in *.ksplat; do
splat-transform "$file" "${file%.ksplat}_meta.json"
done
Quality Analysisโ
# Export for quality analysis in spreadsheet
splat-transform scene.ply \
--filterNaN \
-c 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.