PromptHub
Back to Blog
Developer Tools 3D Graphics

Stop Wrestling with 3D Formats! SplatTransform Handles It All

B

Bright Coding

Author

12 min read 73 views
Stop Wrestling with 3D Formats! SplatTransform Handles It All

Stop Wrestling with 3D Formats! SplatTransform Handles It All

What if I told you that the most tedious part of working with 3D Gaussian splats—format conversion, cleanup, and optimization—could be reduced to a single command? No more writing custom parsers. No more losing sleep over whether your .ply will play nice with someone else's .spz. No more bloated files choking your web viewer.

If you've ever tried to merge two splat captures from different devices, strip out floating artifacts, or compress millions of Gaussians for web delivery, you know the pain. The 3D Gaussian splatting ecosystem is exploding with formats, each with their own quirks, compression schemes, and incompatible metadata. It's a fragmented mess that kills productivity.

Enter SplatTransform, the open-source CLI tool and library from PlayCanvas that's secretly becoming the Swiss Army knife for Gaussian splat processing. Whether you're building photorealistic web experiences, preprocessing training data, or deploying real-time 3D viewers, this tool eliminates the format wars and puts you back in control. In this deep dive, I'll show you exactly why top developers are adopting it—and how you can leverage its most powerful features today.

What is SplatTransform?

SplatTransform is an open-source library and command-line interface (CLI) tool developed by PlayCanvas for converting and editing 3D Gaussian splats. It serves as a universal translator and surgical toolkit for the increasingly diverse world of Gaussian splat formats.

The project emerged from PlayCanvas's own needs building SuperSplat, one of the most popular web-based Gaussian splat editors. Rather than maintaining separate conversion utilities, they built a unified pipeline—and then open-sourced it for the community. Smart move.

What makes SplatTransform genuinely special is its platform-agnostic architecture. It runs equally well in Node.js backends and browser environments, thanks to its abstracted file system interfaces and optional GPU acceleration via WebGPU. This isn't some Node-only utility that forces you into a specific deployment model.

The tool is distributed as @playcanvas/splat-transform on npm, with both global CLI installation and library embedding options. It's actively maintained with regular updates, comprehensive documentation, and a growing ecosystem of guides for specific workflows like Docker↗ Bright Coding Blog GPU backends and collision mesh generation.

Here's why it's trending now: Gaussian splatting has crossed from research curiosity to production pipeline. Architects, game developers, VFX artists, and web creators are all adopting it—but they're hitting the same wall. Every capture tool outputs something different. Every viewer expects something specific. SplatTransform sits at this intersection, normalizing chaos into order.

Key Features That Separate It from the Pack

SplatTransform isn't merely a format converter. It's a full processing pipeline with capabilities that reveal deep understanding of real-world Gaussian splat workflows:

Universal Format Bridge The tool reads seven distinct input formats—standard PLY, Compressed PLY, SOG, SPZ, SPLAT, KSPLAT, and LCC—and writes to ten output formats including PLY variants, SOG, GLB with the official KHR_gaussian_splatting extension, CSV for data analysis, standalone HTML viewers, LOD streaming bundles, and even sparse voxel octrees for collision detection. This breadth means you can ingest from virtually any capture pipeline and export to virtually any consumption target.

Surgical Data Manipulation Beyond conversion, SplatTransform offers precise editing operations: translate, rotate, and scale transforms; box and sphere filtering for region extraction; value-based filtering with six comparison operators; NaN/Inf cleanup; spherical harmonic band stripping; and progressive pairwise merging for intelligent decimation. The --decimate flag with percentage support is particularly elegant—reduce to 25% of original count without manual trial-and-error.

GPU-Accelerated Processing For heavy operations like SOG compression, cluster filtering, and floater removal, SplatTransform leverages WebGPU with automatic device selection. You can explicitly choose GPU adapters by index or fall back to CPU mode when drivers are problematic. The --filter-cluster operation GPU-voxelizes scenes at configurable resolution, enabling clean separation of foreground subjects from background noise—critical for scanned interior spaces.

Procedural Generation (Beta) Perhaps most intriguingly, SplatTransform supports .mjs generator scripts for procedural splat synthesis. This opens doors for parametric content creation, test data generation, and algorithmic art workflows that traditional capture-based tools simply cannot address.

Production-Ready Outputs The SOG format (Super-compressed Occupancy Grid) represents PlayCanvas's optimized format for web delivery, with bundled and unbundled variants. The LOD streaming system generates multi-level-of-detail bundles for massive scenes. And the standalone HTML viewer output produces single-file deployables—perfect for client presentations or rapid prototyping.

Real-World Use Cases Where SplatTransform Dominates

Cross-Platform Asset Pipeline

You're working with captures from Polycam (SPZ), Luma AI (PLY), and a custom photogrammetry stack (KSPLAT). Your web viewer expects SOG. Your Unreal integration wants GLB with KHR_gaussian_splatting. Your data team needs CSV for analysis. Without SplatTransform, you're maintaining three separate conversion scripts and praying they handle spherical harmonics consistently. With it? One tool chain, guaranteed consistency.

Web-Optimized Delivery

You've got a 500MB PLY from a Matterport scan. Your client expects instant loading on mobile. SplatTransform's SOG compression with configurable SH iterations, combined with Morton-order reordering for cache-friendly access, produces files a fraction the size with visual fidelity tuned to your quality threshold. The standalone HTML output bundles everything—viewer, compressed data, UI—into a single email-attachable file.

Scanned Environment Cleanup

Interior scans are notorious for floating artifacts: dust particles, reflections, glass refractions, and reconstruction noise. The --filter-floaters and --filter-cluster operations, combined with seed-position-aware voxel filling, automatically isolate solid geometry from ephemeral noise. For architectural visualization, this transforms unusable captures into clean, navigable spaces.

Collision-Aware Scene Preparation

Here's where SplatTransform gets genuinely clever. The .voxel.json output generates sparse voxel octrees for collision detection, with companion .collision.glb meshes. For game developers embedding splats in interactive environments, this bridges the gap between visual representation and physical simulation—something no other conversion tool addresses natively.

Automated Batch Processing

With its CLI design and null output support for analysis-only runs, SplatTransform slots cleanly into CI/CD pipelines. Generate per-column statistics for regression testing, validate format compliance, or batch-convert entire asset libraries with shell scripts or GitHub Actions.

Step-by-Step Installation & Setup Guide

Getting SplatTransform running takes under two minutes. Here's the complete setup:

Global CLI Installation

For command-line usage across your system:

# Install or update to latest version
npm install -g @playcanvas/splat-transform

# Verify installation
splat-transform --version
splat-transform --help

Library Installation

For programmatic use in Node.js projects:

# Install as project dependency
npm install @playcanvas/splat-transform

Docker Backend Setup (GPU/Vulkan)

For server deployments requiring GPU acceleration:

# See the dedicated Docker guide for complete setup
cat node_modules/@playcanvas/splat-transform/guides/DOCKER.md

The Docker configuration handles Vulkan driver setup for headless GPU operations—essential for cloud-based SOG compression or automated cluster filtering pipelines.

Environment Verification

# List available GPU adapters for compute operations
splat-transform --list-gpus

# Test with a simple conversion
splat-transform --version

System Requirements:

  • Node.js 18+ recommended
  • For GPU features: WebGPU-compatible system (Windows/Linux with Vulkan, or macOS with Metal)
  • For CPU fallback: any Node.js-supported platform (significantly slower for compression)

REAL Code Examples from the Repository

Let's examine actual usage patterns from the SplatTransform documentation, with detailed explanations of what's happening under the hood.

Example 1: Basic Format Conversion Pipeline

# Simple format conversion — PLY to CSV for data analysis
splat-transform input.ply output.csv

# Convert from antimatter15's .splat format to standard PLY
splat-transform input.splat output.ply

# Convert to PlayCanvas's optimized SOG format
splat-transform input.ply output.sog

# Generate standalone HTML viewer (single deployable file)
splat-transform input.ply output.html

# Unbundled viewer with separate assets (better for CDN caching)
splat-transform -U input.ply output.html

What's happening here: Each command demonstrates the core value proposition—universal format bridging. The .sog conversion triggers SOG compression with default settings (10 SH iterations, auto-selected GPU). The HTML output embeds the SuperSplat viewer with your compressed data. The -U flag generates separate CSS/JS/SOG files, enabling browser caching of viewer assets across multiple scenes.

Example 2: Chained Transformations with Filtering

# Scale to half size, translate 10 units on Z, filter NaN values
splat-transform bunny.ply -s 0.5 -t 0,0,10 --filter-nan output.ply

# Rotate 90 degrees around Y axis, then decimate to 25%
splat-transform input.ply -r 0,90,0 --decimate 25% output.ply

# Complex chain: scale, translate, rotate, filter by opacity, strip SH bands
splat-transform input.ply \
    -s 2 \
    -t 1,0,0 \
    -r 0,0,45 \
    -V opacity,gt,0.5 \
    --filter-harmonics 2 \
    output.ply

Critical insight: Actions execute in strict left-to-right order. The input file becomes the working set; each action modifies it in place. This means -s 2 before -t 1,0,0 produces different results than the reverse order—scaling affects the translation magnitude. The --filter-harmonics 2 strips spherical harmonic bands above degree 2, reducing file size for applications where view-dependent lighting detail isn't critical.

Example 3: Multi-File Merging with Per-File Transforms

# Combine two scenes with different transforms, compress result
splat-transform -w \
    cloudA.ply -r 0,90,0 \
    cloudB.ply -s 2 \
    merged.compressed.ply

# Apply final transforms to combined result
splat-transform \
    input1.ply input2.ply \
    output.ply \
    -t 0,0,10 -s 0.5

The -w flag enables overwrite of existing output files—essential for automated pipelines. Notice how transforms attach to specific inputs: -r 0,90,0 applies only to cloudA.ply, while -s 2 applies only to cloudB.ply. The merged result contains both, properly oriented, then gets compressed to .compressed.ply.

Example 4: Programmatic Library Usage (TypeScript)

import { Vec3 } from 'playcanvas';
import {
    readFile,
    writeFile,
    getInputFormat,
    getOutputFormat,
    processDataTable,
    UrlReadFileSystem,
    MemoryFileSystem
} from '@playcanvas/splat-transform';

// Configure abstract file system for URL-based reading
const fileSystem = new UrlReadFileSystem();
const inputFormat = getInputFormat('scene.ply');

// Async read from remote URL with format auto-detection
const dataTables = await readFile({
    filename: 'https://example.com/scene.ply',
    inputFormat,           // 'ply' — detected from extension
    options: { iterations: 10 },  // SH compression quality
    params: [],             // No generator parameters
    fileSystem             // Abstracted I/O layer
});

// Apply surgical transformations programmatically
const processed = processDataTable(dataTables[0], [
    { kind: 'scale', value: 0.5 },           // Uniform scale down
    { kind: 'translate', value: new Vec3(0, 1, 0) },  // Lift 1 unit
    { kind: 'filterNaN' }                    // Remove corrupt data
]);

// Write to in-memory buffer (no filesystem needed)
const memFs = new MemoryFileSystem();
const outputFormat = getOutputFormat('output.ply', {});

await writeFile({
    filename: 'output.ply',
    outputFormat,
    dataTable: processed,
    options: {}
}, memFs);

// Extract buffer for further processing (upload, cache, etc.)
const outputBuffer = memFs.files.get('output.ply');

Why this matters: The MemoryFileSystem abstraction enables serverless deployments, browser-based processing, and test environments without touching disk. The processDataTable function accepts a typed action array—type-safe, serializable, and perfectly suited for building visual node editors or automated pipelines.

Example 5: Voxel-Based Collision Pipeline

# Complete interior scene processing: isolate room, seal exterior, carve navigable space
splat-transform room.ply \
    --filter-cluster --seed-pos 0,1,0 \
    --voxel-external-fill \
    --voxel-carve \
    -K smooth \
    room.voxel.json

This pipeline deserves attention: --filter-cluster GPU-voxelizes at 1 unit/voxel, keeping only the connected component containing the seed position—eliminating disjoint floating artifacts. --voxel-external-fill performs boundary flood-fill from outside, sealing wall gaps up to 1.6 units. --voxel-carve then flood-fills navigable space with a 1.6m × 0.2m radius capsule, producing walkable regions. Finally, -K smooth generates a watertight collision mesh. The result: a .voxel.json metadata file, .voxel.bin octree data, and .collision.glb mesh—ready for physics engines.

Advanced Usage & Best Practices

Optimize SOG Compression Iterations The default 10 SH iterations balances quality and speed. For preview builds, drop to 3-5. For final delivery, consider 15-20 if GPU time is acceptable. Monitor with --mem and --verbose flags.

Leverage Morton Ordering for Cache Performance The --morton-order flag reorders Gaussians by Z-order curve, dramatically improving spatial locality. Essential for large scenes in web viewers where cache-friendly access patterns directly impact frame rates.

Seed Position Strategy for Interior Scans Always set --seed-pos to a known walkable point inside your scene. The default 0,0,0 often falls outside captured volumes, causing --filter-cluster to discard everything. Use your capture device's starting position or manually inspect in a viewer first.

GPU Adapter Selection for Multi-GPU Systems Explicit -g selection prevents WebGPU from choosing an integrated GPU when your discrete card is available. Run --list-gpus once, then hardcode the optimal index in production scripts.

Analysis-Only Validation Use splat-transform input.ply -m null to generate statistical summaries without writing output. Perfect for CI pipelines validating capture quality before expensive processing.

Comparison with Alternatives

Feature SplatTransform Manual Scripts Format-Specific Tools
Input formats 7 formats Usually 1-2 1 each
Output formats 10 formats Custom code 1-2 each
GPU acceleration WebGPU (cross-platform) None CUDA-only (NVIDIA)
Browser support Yes (library) No No
Collision generation Built-in voxel pipeline Manual None
Procedural generation Beta (.mjs scripts) Custom None
SOG compression Native None None
LOD streaming Built-in Manual None
Standalone HTML viewer Single-file output None None
Active maintenance PlayCanvas team You Varies

The verdict: SplatTransform eliminates tool proliferation. One dependency replaces a toolchain of fragile converters.

FAQ

Is SplatTransform free for commercial use? Yes—it's open source under a permissive license. Check the GitHub repository for exact terms.

Can I use SplatTransform in a web browser? Absolutely. The library build runs in browsers via bundlers like Vite or Webpack. File system abstractions (UrlReadFileSystem, MemoryFileSystem) handle the environment differences transparently.

Why is CPU compression so much slower? SOG compression involves iterative spherical harmonic optimization that's massively parallel. GPUs handle this 5-10× faster. CPU mode exists for compatibility, not performance.

What's the difference between SOG bundled and unbundled? Bundled (.sog) is a single file with embedded textures. Unbundled (meta.json + .webp textures) enables separate texture caching and CDN optimization.

How do I handle massive scenes that won't fit in memory? Use the LOD output (lod-meta.json) to generate streaming chunks. Each chunk contains approximately 512K Gaussians with 16-meter spatial extent—tunable via --lod-chunk-count and --lod-chunk-extent.

Can I convert back from SOG to PLY? Yes, and it's lossless for position, scale, rotation, and spherical harmonics. The conversion is fully reversible: splat-transform scene.sog restored.ply.

What if my GPU drivers don't support WebGPU? Use -g cpu for CPU fallback. All features except --filter-cluster and --filter-floaters work. Consider Docker with Vulkan passthrough for server deployments.

Conclusion

SplatTransform solves a genuine pain point in the Gaussian splatting workflow: the fragmentation between capture tools, processing pipelines, and delivery targets. Its universal format support, surgical editing capabilities, and production-ready outputs like SOG compression and collision-aware voxelization make it indispensable for serious 3D work.

The PlayCanvas team has built something rare—a tool that's immediately useful for simple conversions yet grows with you into complex automated pipelines. The TypeScript API is clean and well-typed. The CLI is predictable and composable. The GPU acceleration actually works cross-platform.

If you're working with Gaussian splats in any capacity, from occasional format conversion to full asset pipeline automation, grab SplatTransform from GitHub or install it now:

npm install -g @playcanvas/splat-transform

Your future self—staring at yet another incompatible splat format—will thank you.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

All tools