Skip to content

Gaussian splat update - #1570

Merged
murraystevenson merged 2 commits into
ImageEngine:RB-10.7from
ericmehl:gaussianSplatUpdate
Oct 9, 2026
Merged

murraystevenson merged 2 commits into
ImageEngine:RB-10.7from
ericmehl:gaussianSplatUpdate

Conversation

@ericmehl

@ericmehl ericmehl commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

This changes a couple of details of the ParticleField3DGaussianSplat loading.

  • Using [] in the primitive variable name for radiance:sphericalHarmonicsCoefficients was causing problems in Gaffer because the [ character is used to start a character class in the string matcher rather than matching literally.
  • We were loading HalfVectorData for opacities when the USD file provided them. To be consistent with the other Gaussian splats data types (which we always load as float) and to provide a consistent data type to users and renderer backends, we now convert opacities to FloatVectorData.

I'm not sure if the changelog entries are strictly necessary? I guess we need something to indicate a change, but I'd be happy to simplify the entries if we think this detail isn't helpful.

I'm also not seeing a more compact way of transferring the USD half opacities to FloatVectorData without an intermediate allocation of IECore::HalfVectorData. But if I'm missing something in the template magic that would allow that it would be nice to simplify this.

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Cortex project's prevailing coding style and conventions.

FloatVectorDataPtr opacitiesData = nullptr;

pxr::VtValue opacitiesValue;
if( opacitiesAttr.Get( &opacitiesValue, time ) )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this fails, we make a PrimitiveVariable with null data, which I think will then trigger the warning about an invalid variable. But if the attribute isn't authored (which I assume would make Get() fail), we don't want to output a warning.

One simple approach to this might be to call readPrimitiveVariable() no matter the type, and then post-convert if we find halfs in there.

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.

I did the readPrimitiveVariable() and post-convert in 14dad38

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.

And a little more compact using variableData() in 51680c5

@ericmehl

ericmehl commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

I fixed up the half -> float conversion, and tacked on a quick change to the wording of the changelog in 9365c41. Ready for a new look.

@murraystevenson murraystevenson 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.

Thanks Eric, a pair of minor notes inline. It would be good to get this ready for a release today so we can include the Arnold splats support in today's Gaffer release.

Comment thread contrib/IECoreUSD/src/IECoreUSD/GaussianSplatAlgo.cpp Outdated
Comment thread Changes Outdated
@ericmehl
ericmehl force-pushed the gaussianSplatUpdate branch from 51680c5 to bfbc474 Compare October 9, 2026 18:12
@ericmehl

ericmehl commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks Murray and John, I touched up the code populating the float opacity vector and the changelog comment. I went ahead and squashed down as well to hopefully be ready to merge. I can get the Gaffer side of the splats updated as soon as the release is out.

@murraystevenson
murraystevenson merged commit 59b5ff1 into ImageEngine:RB-10.7 Oct 9, 2026
6 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.

3 participants