PLY TO USD

A small converter for standard 3D Gaussian splat PLY files.
No Houdini, RenderMan, or GPU is needed to convert.

1. INSTALL PYTHON

Use 64-bit Python 3.9-3.14 from https://www.python.org/downloads/
Python 3.12 or 3.13 is a straightforward choice.
Put Convert_PLY_to_USD.py in a folder you can write to.
Open a terminal in that folder.

2. SET UP ONCE

Windows (PowerShell):
  py Convert_PLY_to_USD.py --setup

Mac / Linux:
  python3 Convert_PLY_to_USD.py --setup

This needs an internet connection. It installs NumPy and OpenUSD into
.gaussian-splats-python beside the script. It does not install into your
system Python or a DCC application's Python. If setup fails, fix the issue
reported by pip and run --setup again. Some Linux installations need the
python3-venv package before Python can create an environment.

3. CONVERT

Windows:
  py Convert_PLY_to_USD.py "scan.ply" "scan.usdc"

Mac / Linux:
  python3 Convert_PLY_to_USD.py "scan.ply" "scan.usdc"

Use full paths if your files are elsewhere. Put paths with spaces in quotes.
The output folder must already exist. Choose a new output filename; the
script never replaces an existing file and leaves the PLY unchanged.
Later conversions use the private environment automatically and work offline.
To check setup, run the script with --check instead of the filenames.

SHARING

Share the script and this readme, or the supplied ZIP. Each recipient runs
--setup on their own machine. Do not distribute .gaussian-splats-python:
Python environments are specific to the machine that created them.
If moving the script to another folder, run --setup there again.

SUPPORTED SYSTEMS AND FILES

OpenUSD 26.8 provides binary packages for 64-bit Windows on Intel/AMD,
macOS on Apple Silicon or Intel, and Linux on x86-64 (glibc 2.27+).
Other architectures need their own compatible NumPy/OpenUSD installation.
Package availability: https://pypi.org/project/usd-core/26.8/
The standalone setup and conversion were tested on Windows with Python 3.12.
Mac/Linux instructions follow the published packages; not locally tested.

Accepts uncompressed ASCII, binary little-endian, or binary big-endian PLY.
Vertex data must be the first element and use scalar properties.
Expects standard trained 3DGS fields: x/y/z, f_dc_0..2, optional f_rest_*,
scale_0..2 as log scales, rot_0..3 as w/x/y/z, and opacity as a logit.
SH degrees 0-3 are preserved. Extra properties are ignored.
Compressed PLY variants and ordinary RGB point clouds are not supported.

Writes .usdc, .usda, or .usd with a native ParticleField3DGaussianSplat at
/scan. Coordinates stay unchanged; USD is tagged Y-up, one meter per unit.
Check orientation and scale in your scene. Large scans need enough RAM.
Use a local output disk supporting hard links (NTFS, APFS, typical Linux
filesystems). Conversion does not install a renderer for the resulting USD.
