Skip to content

EMSUSD-4025 - part1/2 reader writer for ply file - #4768

Open
adsk-gagnonf wants to merge 5 commits into
devfrom
gagnonf/gaussian-splat-ply-io
Open

adsk-gagnonf wants to merge 5 commits into
devfrom
gagnonf/gaussian-splat-ply-io

Conversation

@adsk-gagnonf

Copy link
Copy Markdown
Collaborator

Add Gaussian splat PLY reader/writer, including cmake/include wiring and a roundtrip test reading from a stream.

@adsk-gagnonf adsk-gagnonf self-assigned this Oct 5, 2026
@adsk-gagnonf

adsk-gagnonf commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

tinyply.h is a third party, you can focus review on gaussiansplatply.h/cpp and cmake files

@adsk-gagnonf
adsk-gagnonf force-pushed the gagnonf/gaussian-splat-ply-io branch from a525775 to 469b67b Compare October 5, 2026 21:38
@adsk-gagnonf
adsk-gagnonf force-pushed the gagnonf/gaussian-splat-ply-io branch from 469b67b to 6aa7c12 Compare October 6, 2026 14:24
Add Gaussian splat PLY reader/writer, including cmake/include wiring
and a roundtrip test reading from a stream.
@adsk-gagnonf
adsk-gagnonf force-pushed the gagnonf/gaussian-splat-ply-io branch from 6aa7c12 to 9ea82de Compare October 6, 2026 15:19
@adsk-gagnonf
adsk-gagnonf force-pushed the gagnonf/gaussian-splat-ply-io branch from 81bef3e to f94ccc4 Compare October 6, 2026 18:30
Comment thread include/CMakeLists.txt
Comment thread test/lib/mayaUsd/fileio/utils/CMakeLists.txt Outdated
Comment thread lib/mayaUsd/fileio/utils/gaussianSplatPly.h
Comment thread lib/mayaUsd/fileio/utils/gaussianSplatPly.h Outdated
Comment thread lib/mayaUsd/fileio/utils/gaussianSplatPly.h Outdated
Comment thread lib/mayaUsd/fileio/utils/gaussianSplatPly.cpp Outdated

@seando-adsk seando-adsk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things to look at and fix.

@seando-adsk

Copy link
Copy Markdown
Collaborator

@AramAzhari-adsk Can you have a look at gaussianSplatPly.cpp - I'm not familiar at all with this.

case tinyply::Type::UINT16: convertToFloat<uint16_t>(src, dst, n); break;
case tinyply::Type::INT32: convertToFloat<int32_t>(src, dst, n); break;
case tinyply::Type::UINT32: convertToFloat<uint32_t>(src, dst, n); break;
default: *errorMsg = std::string(label) + " has an unsupported type"; return false;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have // \p out is left untouched on failure. yet here we have a situation where you potentially manipulate the out param and can fail.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

return false;
}

out->resize(n);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can throw, and with large data that we might be dealing with i'd probably do checks at the callsites

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe expand the try/catch to cover the block of code after you file reading part

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved the catch{} after the type casting block

std::vector<float> positions;
// half-axis lenght (s0, s1, s2) activated using exp of PLY log-scale
std::vector<float> scales;
// real-first convention (w, x, y, z)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor) I think it's imaginary first in USD, FYI.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://openusd.org/dev/api/class_gf_quaternion.html
Openusd Quaternions have (real, vec3) layout

Comment thread lib/mayaUsd/fileio/utils/gaussianSplatPly.h Outdated
@adsk-gagnonf
adsk-gagnonf force-pushed the gagnonf/gaussian-splat-ply-io branch 2 times, most recently from e86f4da to 225d6a3 Compare October 8, 2026 18:54
@adsk-gagnonf
adsk-gagnonf force-pushed the gagnonf/gaussian-splat-ply-io branch from 225d6a3 to 4d25aa0 Compare October 8, 2026 19:01
Comment thread test/lib/mayaUsd/CMakeLists.txt Outdated
seando-adsk
seando-adsk previously approved these changes Oct 13, 2026

@seando-adsk seando-adsk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor question about a cmake change (moving utils to top).

antonkhelou
antonkhelou previously approved these changes Oct 15, 2026
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.

3 participants