Skip to content

Support plain x/y/z/r/g/b point clouds in ply files#340

Merged
dmarcos merged 1 commit into
sparkjsdev:mainfrom
mrxz:ply-point-cloud
May 15, 2026
Merged

Support plain x/y/z/r/g/b point clouds in ply files#340
dmarcos merged 1 commit into
sparkjsdev:mainfrom
mrxz:ply-point-cloud

Conversation

@mrxz
Copy link
Copy Markdown
Collaborator

@mrxz mrxz commented May 11, 2026

Fixes #329

This PR implements point cloud decoding support in the spark-lib project. It only considers a .ply file a point cloud if it contains all of the following properties: x, y, z, red, green, blue. It also supports an optional alpha property, similar to how Spark 0.1 handled it.

Since point clouds don't have scale or rotation, a fixed scale of 0.001 is chosen for all three axis. This is the same default/fallback value as in Spark 0.1, but unlike the old approach, this value can't be configured as the constant is on the Rust side of the project.

It's likely that there are still differences in behaviour between this implementation and the old one, especially given that the old one mixed splat and point cloud handling (e.g. it was theoretically possible to have point clouds with spherical harmonics). Testing was done by loading a coloured point cloud file exported from CloudCompare

@asundqui
Copy link
Copy Markdown
Contributor

Love it, thank you for bringing this feature back @mrxz . @dmarcos we should merge this right?

@dmarcos
Copy link
Copy Markdown
Contributor

dmarcos commented May 15, 2026

Thanks @mrxz

@dmarcos dmarcos merged commit 3fbe797 into sparkjsdev:main May 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spark v2 fails to load plain CloudCompare binary PLY point cloud (Missing scale_0 property)

3 participants