Skip to content

USD MeshLight I/O#1539

Merged
johnhaddon merged 3 commits into
ImageEngine:mainfrom
ericmehl:usdMeshLightIO
Jun 15, 2026
Merged

USD MeshLight I/O#1539
johnhaddon merged 3 commits into
ImageEngine:mainfrom
ericmehl:usdMeshLightIO

Conversation

@ericmehl

Copy link
Copy Markdown
Collaborator

This adds reading and writing of USD mesh lights. A mesh becomes a mesh light in USD by attaching the MeshLightAPI to it. USD itself makes reading mesh lights easy by taking on the addition of the relevant attributes when a mesh has a MeshLightAPI attached to it.
Writing mesh lights is also pretty straightforward - we need to intercept a light with a MeshLight shader, attach the MeshLightAPI to the prim and continue on with writing the parameters.

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.

@johnhaddon johnhaddon left a comment

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.

Thanks Eric! LGTM. If you could update Changes.md at the same time as adding the parameter value test I requested inline, that would be grand. Then we can get a release out with this and my PointInstancer stuff in it...


lightNetwork = IECoreScene.ShaderNetwork(
shaders = {
"output" : IECoreScene.Shader( "MeshLight", "light", {} ),

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.

Would be good to include a few parameter values here, and check they've been written.

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 added a few parameters with different types and went ahead and squashed it into the original commit : ca1f6e5

@ericmehl

Copy link
Copy Markdown
Collaborator Author

Thanks John! I added some parameters to the write test and updated the changelog. Both are squashed down to the original commit.

Testing went fine locally - hopefully CI agrees.

@johnhaddon johnhaddon merged commit 7ddaf45 into ImageEngine:main Jun 15, 2026
6 checks passed
@johnhaddon

Copy link
Copy Markdown
Member

Nice one, thanks Eric! CI was happy so I've merged...

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.

2 participants