Skip to main content

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.

Open Source

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:

FormatInputOutputDescription
.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
note

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.