-
Notifications
You must be signed in to change notification settings - Fork 22
Support reading SOG #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds read support for SOG (Super-compressed Splat) format to enable round-trip conversion between PLY and SOG files. Previously, SOG could only be written but not read.
- Implements SOG reading functionality with inverse transforms for position, quaternion, and opacity
- Adds a minimal ZIP reader for parsing bundled .sog archives without external dependencies
- Includes a WASM-backed WebP decoder for texture decompression
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/readers/read-sog.ts |
Main SOG reader implementing inverse transforms and data reconstruction |
src/serialize/zip-reader.ts |
Minimal ZIP parser supporting STORE method and data descriptors |
src/utils/webp-decode.ts |
WebP decoder wrapper using WASM module |
src/index.ts |
Updated file reader to support .sog and meta.json input |
lib/webp_decode.mjs |
Compiled WASM module for WebP decoding |
lib/webp_decode.c |
C source for WebP decoder WASM module |
lib/BUILD.md |
Updated build instructions for both encoder and decoder |
README.md |
Updated documentation to reflect SOG read support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
|
Hey @querielo, May I ask what your use-case is for combining multiple SOG into another SOG? SOG is really a lossy compressed format and so decompressing->recompressing will result in overall quality loss. |
|
Hey @querielo I pushed some updates directly to your branch, hope that's ok :) Thanks so much for this PR!! |
|
You are right. Thank you! |
PR adds read support for SOG. Previously, SOG could only be written via writeSog. This enables round‑trip conversion
or combining multiple .sog into one
What’s Included
Inverse Transforms
sign(v) * ln(|v| + 1)inv = sign(v) * (exp(|v|) - 1)sigmoid(opacity)→ uint8logit(y) = ln(y / (1 - y))Fixes #62