Skip to content

Cycles : Add opacityMode support for convertUSDShaders#6858

Open
boberfly wants to merge 1 commit intoGafferHQ:1.6_maintenancefrom
boberfly:improvements/cyclesUSDOpacityMode
Open

Cycles : Add opacityMode support for convertUSDShaders#6858
boberfly wants to merge 1 commit intoGafferHQ:1.6_maintenancefrom
boberfly:improvements/cyclesUSDOpacityMode

Conversation

@boberfly
Copy link
Copy Markdown
Collaborator

@boberfly boberfly commented Mar 24, 2026

Generally describe what this PR will do, and why it is needed

  • USDPreviewSurface has an opacityMode https://openusd.org/release/spec_usdpreviewsurface.html which states that transparent acts more like a refractive surface eg. specular isn't affected and is described as "glass". The presence mode acts like it does normally with changing alpha on the principled_bsdf.
  • If opacityThreshold is being used, the cut-out behaviour also works for transparent mode. This is a little vague, I'm going by their description of the spec here but might need another pair of eyes...
  • Fixes ALab's lab beaker/flask equipment to be refractive instead of invisible.
Screenshot 2026-03-23 230202

Related issues

  • NA

Dependencies

  • NA

Breaking changes

  • Because transparent is considered default, assets which rely on the old behaviour will explicitly need to set opacityMode to presence.

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 Gaffer project's prevailing coding style and conventions.

@boberfly boberfly force-pushed the improvements/cyclesUSDOpacityMode branch 4 times, most recently from 067ae4b to 0ec1e31 Compare March 25, 2026 00:57
@boberfly boberfly changed the title Cycles : Adds opacityMode support for convertUSDShaders, allowing transmission. Cycles : Add opacityMode support for convertUSDShaders and normal inputs Mar 25, 2026
@boberfly boberfly force-pushed the improvements/cyclesUSDOpacityMode branch 3 times, most recently from 7dac03f to 6772d4a Compare March 25, 2026 06:22
@boberfly boberfly marked this pull request as ready for review March 25, 2026 07:37
@johnhaddon
Copy link
Copy Markdown
Member

Murray pointed out that the normals stuff requires Cycles 4.5, which we don't use for Gaffer 1.6. Do you want to retarget this all to main (where we're using Cycles 5.0), or shall we merge the opacity to 1.6_maintenance in isolation and then let you retarget the normals only to main?

@boberfly
Copy link
Copy Markdown
Collaborator Author

Murray pointed out that the normals stuff requires Cycles 4.5, which we don't use for Gaffer 1.6. Do you want to retarget this all to main (where we're using Cycles 5.0), or shall we merge the opacity to 1.6_maintenance in isolation and then let you retarget the normals only to main?

Oh right for some reason I was thinking it was Cycles 4.5 in Gaffer 1.6 - yep that sounds like a good plan, the opacity stuff was in a separate commit I can do the normals one just for main.

@boberfly boberfly force-pushed the improvements/cyclesUSDOpacityMode branch from 6772d4a to bec2f1e Compare March 31, 2026 21:41
@boberfly boberfly changed the title Cycles : Add opacityMode support for convertUSDShaders and normal inputs Cycles : Add opacityMode support for convertUSDShaders Mar 31, 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.

2 participants