Skip to main content

Convert Gaussian Splat PLY files to PlayCanvas SOG format

Project description

SogPy

Convert Gaussian Splat .ply files to PlayCanvas .sog format.

⚠️ Note: This is a direct Python conversion of splat-transform's PLY to SOG Node.js code. One-shotted with Claude Opus 4.5 — use with caution! Contributions are very welcome.

Installation

pip install sogpy

Usage

Command Line

# Basic conversion
sogpy input.ply output.sog

# With more clustering iterations (better quality, slower)
sogpy input.ply output.sog --iterations 20

Python API

from SogPython import convert_ply_to_sog

convert_ply_to_sog("input.ply", "output.sog")

What is SOG?

SOG (Splat Optimized Graphics) is PlayCanvas's format for Gaussian splat data. It uses:

  • WebP lossless compression for textures
  • K-means clustering to reduce color and scale data to 256 values
  • Morton ordering for spatial coherence
  • Smallest-three quaternion encoding for rotations

This typically achieves 5-6x compression compared to raw PLY files while preserving all data including spherical harmonics.

Features

  • ✅ Full PLY format support (binary little-endian)
  • ✅ Spherical harmonics (bands 1-3)
  • ✅ WebP lossless compression
  • ✅ 16-bit position precision with log transform
  • ✅ Smallest-three quaternion compression

Requirements

  • Python 3.8+
  • numpy
  • scipy
  • Pillow

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sogpy-1.0.2.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sogpy-1.0.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file sogpy-1.0.2.tar.gz.

File metadata

  • Download URL: sogpy-1.0.2.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for sogpy-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1b6a7d746cfab4ecc3f3ff059e2cf2347458875cd544e16e57eef4ca45cf3bc1
MD5 6d1081ef012e8279cf140a0d89322bd0
BLAKE2b-256 7b3c67afe79a0ffcbc7cb3e683222810b223eeb6a1f73f3ac0bd58955c441c87

See more details on using hashes here.

File details

Details for the file sogpy-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: sogpy-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for sogpy-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b36ff0a3e99a972484973424b673be4d60b80ca49de8dbfe4124699783828ace
MD5 132c101fc5746c67d4252e263db2c4fe
BLAKE2b-256 cd6d23dd4aeae23ddbb55636fdb3d36756314b37926a1c918c3e8cbe99795b0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page