Skip to content

Refactor MDL graph for OpenPBR to avoid layered mixes#2215

Merged
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:mainfrom
krohmerNV:krohmer/open_pbr_rewrite_thin_film_layering
Sep 2, 2025
Merged

Refactor MDL graph for OpenPBR to avoid layered mixes#2215
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:mainfrom
krohmerNV:krohmer/open_pbr_rewrite_thin_film_layering

Conversation

@krohmerNV
Copy link
Copy Markdown
Contributor

In the MDL code generator we currently can't handle layering constructs like this:
layer(mix(bsdf1, bsdf2, weight), bsdf3)
so I propose a workaround that should not change the result but uses an alternative implementation:
mix(layer(bsdf1, bsdf3), layer(bsdf2, bsdf3), weight)

Comment thread libraries/bxdf/open_pbr_surface.mtlx Outdated
krohmerNV added a commit to krohmerNV/MaterialX that referenced this pull request Feb 12, 2025
krohmerNV added a commit to krohmerNV/MaterialX that referenced this pull request Feb 12, 2025
krohmerNV added a commit to krohmerNV/MaterialX that referenced this pull request Feb 28, 2025
krohmerNV added a commit to krohmerNV/MaterialX that referenced this pull request Mar 4, 2025
krohmerNV added a commit to krohmerNV/MaterialX that referenced this pull request Mar 11, 2025
krohmerNV added a commit to krohmerNV/MaterialX that referenced this pull request Apr 22, 2025
krohmerNV added a commit to krohmerNV/MaterialX that referenced this pull request Jun 19, 2025
krohmerNV added a commit to krohmerNV/MaterialX that referenced this pull request Jun 26, 2025
@krohmerNV krohmerNV force-pushed the krohmer/open_pbr_rewrite_thin_film_layering branch from ec1e35b to dc3fbee Compare September 2, 2025 13:53
@krohmerNV krohmerNV changed the title WIP: Open OPR - rewrite thin_film layering for compatibility with MDL Open OPR - rewrite thin_film layering for compatibility with MDL Sep 2, 2025
@krohmerNV krohmerNV changed the title Open OPR - rewrite thin_film layering for compatibility with MDL MDL: Rewrite OpenPBR thin_film layering to avoid layered mixes Sep 2, 2025
Copy link
Copy Markdown
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

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

This looks good to me, thanks @krohmerNV!

@jstone-lucasfilm jstone-lucasfilm changed the title MDL: Rewrite OpenPBR thin_film layering to avoid layered mixes Refactor MDL graph for OpenPBR to avoid layered mixes Sep 2, 2025
@jstone-lucasfilm jstone-lucasfilm merged commit c86d69c into AcademySoftwareFoundation:main Sep 2, 2025
32 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