Metadata-Version: 2.4
Name: omniverse-gsplat-converter
Version: 0.1.1
Summary: NVIDIA 3D Gaussian Splat to USD Converter
Project-URL: Homepage, https://docs.omniverse.nvidia.com/kit/docs/gsplat-converter
Project-URL: Documentation, https://docs.omniverse.nvidia.com/kit/docs/gsplat-converter
Author: NVIDIA
License: Apache-2.0
Requires-Python: <3.13,>=3.10
Requires-Dist: numpy==2.3.1
Provides-Extra: usd
Requires-Dist: usd-core>=22.11; extra == 'usd'
Description-Content-Type: text/markdown

# Omniverse Gaussian Splat Converter

A pip-installable Python package for converting 3D Gaussian Splat data (PLY and SPZ formats) to USD
using the `ParticleField3DGaussianSplat` schema.

## Installation

```bash
pip install omniverse-gsplat-converter
```

For USD support (if not already installed):

```bash
pip install omniverse-gsplat-converter[usd]
```

## Usage

### Command Line

```bash
# Convert a PLY file to USDZ
omni_gsplat_convert -i input.ply -o output.usdz

# Convert an SPZ file to USDA with Z-up axis
omni_gsplat_convert -i input.spz -o output.usda --up-axis Z

# Generate spherical harmonics and scales from raw PLY
omni_gsplat_convert -i input.ply -o output.usdz --generateSh --generateScales
```

You can also run via `python -m`:

```bash
python -m omniverse_gsplat_converter -i input.ply -o output.usdz
```

### Python API

```python
from omniverse_gsplat_converter import read_ply, read_spz, write_gaussian_splat_usd

# Read a PLY file
splat_data = read_ply("scene.ply")

# Write to USD
write_gaussian_splat_usd(splat_data, "scene.usdz", source_file="scene.ply")

# Read an SPZ file
splat_data = read_spz("scene.spz")

# Write to USD with options
write_gaussian_splat_usd(
    splat_data,
    "scene.usda",
    source_file="scene.spz",
    up_axis="Z",
    rotation_degrees=(90.0, 0.0, 0.0),
)
```
