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.1.tar.gz (3.2 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.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sogpy-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 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.1.tar.gz
Algorithm Hash digest
SHA256 ededf0bc98e294fd2a4fc10111dae71ecdddac910f93fa02ac73905c16c46ce3
MD5 f9b3b1d2f621223b8aea844fb3060f9e
BLAKE2b-256 0b416a48f81c94ef3fd72d976ac441e9e65015bce39d7673e977f76146755549

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sogpy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8099e8d217df64355137821434e6a3abd5bb58b4ef7c2784aef43c12fe88bc2
MD5 c9334566a858a1f1d6f649cc0776ab4c
BLAKE2b-256 0c2948473d3140b64738a21a2a5a89b926410bc039258e04b5ff5a5e8d319236

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