Skip to content

Update subsurface color types#220

Merged
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:dev_1.1from
jstone-lucasfilm:dev_1.1
Jun 27, 2024
Merged

Update subsurface color types#220
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:dev_1.1from
jstone-lucasfilm:dev_1.1

Conversation

@jstone-lucasfilm
Copy link
Copy Markdown
Member

This changelist updates the types associated with physical color values for subsurface scattering in OpenPBR, aligning with the conclusions of recent threads on ASWF Slack channels.

  • Change subsurface_radius_scale from a vector3 to a color3 in the specification, aligning with the MaterialX implementation of OpenPBR.
  • Change the radius input of subsurface_bsdf from a vector3 to a color3 in the MaterialX implementation, aligning with the current definition of the subsurface_bsdf node in MaterialX 1.39.

This changelist updates the types associated with physical color values for subsurface scattering in OpenPBR, aligning with the conclusions of recent threads on ASWF Slack channels.

- Change `subsurface_radius_scale` from a `vector3` to a `color3` in the specification, aligning with the MaterialX implementation of OpenPBR.
- Change the `radius` input of `subsurface_bsdf` from a `vector3` to a `color3` in the MaterialX implementation, aligning with the current definition of the `subsurface_bsdf` node in MaterialX 1.39.
@portsmouth
Copy link
Copy Markdown
Contributor

This accords with what I proposed in #144.

As we discussed on Slack, there is still some work to do to understand how/whether color management of the subsurface_radius_scale can be made to work better, as due to the non-linearity of the relationship between the radius (which is the RGB mean-free-path) and the observed color, the render appearance can change significantly on changing color space.

But it still makes more sense for this to be a color than a vector3, as it needs some kind of color management (and is picked as a color, driven by RGB texture, etc.).

Copy link
Copy Markdown
Contributor

@virtualzavie virtualzavie left a comment

Choose a reason for hiding this comment

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

I haven't followed the discussion on this topic, but the proposed change looks good to me.

@portsmouth
Copy link
Copy Markdown
Contributor

portsmouth commented Jun 27, 2024

Just to note, we also don't currently make it very clear in the OpenPBR spec what it means that a quantity is a color3 versus a vector3. We should for example probably say explicitly that we assume that the color3 quantities are color managed in the standard way (which will lead to some issues for the subsurface as noted, but on balance it's even worse if not color managing the subsurface radius).

I'm not sure we even have logic for this color management in e.g. Maya, e.g. if an OpenPBR (or Standard Surface) shader is brought in with some asset, do we check the associated color space of the parameters (using what metadata?) and do some transformation in the DCC/renderer to account for it? What if the parameters are linked to textures, is the color space of the texels accounted for? Possibly, but i'm not aware of the details (@AdrienHerubel will be).

@jstone-lucasfilm
Copy link
Copy Markdown
Member Author

@portsmouth In this situation, we can just fall back on the specified behavior of color spaces in MaterialX, which is inherited by OpenUSD and NanoColor as well:

https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/documents/Specification/MaterialX.Specification.md#color-spaces-and-color-management-systems

@jstone-lucasfilm jstone-lucasfilm merged commit 5bcea36 into AcademySoftwareFoundation:dev_1.1 Jun 27, 2024
@portsmouth
Copy link
Copy Markdown
Contributor

@jstone-lucasfilm sure, though it deserves at least a mention in the OpenPBR spec, that we expect some such logic to be applied by the host application.

AdrienHerubel added a commit that referenced this pull request Mar 3, 2026
* Update OpenPBR default example (#216)

This changelist updates the OpenPBR default example, matching its values to the latest default values of the shading model.

* Change thin film IOR default (#211)

From 1.5 to 1.4.  

As this won't make much difference to the look in implementations that ignore the adjacent IORs of the film.

But for those that take it into account, this will make the film visible rather than invisible by default (since `specular_ior` is 1.5 by default, and `coat_ior` 1.6).

* Add note about dark fuzz (#207)

Addressing #176

* Enable Zeltner sheen (#217)

This changelist enables Zeltner sheen in the reference implementation of OpenPBR, leveraging the new functionality in MaterialX 1.39.

Additionally, the open_pbr_velvet.mtlx example has been updated to account for the visual differences between Conty-Kulla and Zeltner sheen.

* Add a "resources" section to the front page (#215)

With links to
  - MaterialX web viewer running OpenPBR default material
  - OpenPBR-viewer project and web app

* Clarify formula for emission color (#209)

Following the discussion of #85.

* Update subsurface color types (#220)

This changelist updates the types associated with physical color values for subsurface scattering in OpenPBR, aligning with the conclusions of recent threads on ASWF Slack channels.

- Change `subsurface_radius_scale` from a `vector3` to a `color3` in the specification, aligning with the MaterialX implementation of OpenPBR.
- Change the `radius` input of `subsurface_bsdf` from a `vector3` to a `color3` in the MaterialX implementation, aligning with the current definition of the `subsurface_bsdf` node in MaterialX 1.39.

* Update specification and reference to v1.1 (#221)

* Add "Flexibility of implementation" section (#248)

* Add page to propose real-time approximations

* Mention layering and mixing approximation

* Mantion specular reflection approximation

* Mention anisotropic reflection approximations

* Fix typos

* Wording

* Reword the section, move it to the main document, remove the annex

* Subsurface in thin-walled mode, small clarification (#258)

* Merge v1.1 development to main (#222)

This changelist merges v1.1 development from dev_1.1 to main, in preparation for marking the release of OpenPBR v1.1.

* Subsurface in thin-walled mode, small clarification

* Subsurface in thin-walled mode, small clarification

---------

Co-authored-by: Jonathan Stone <jstone@lucasfilm.com>

* Allow emission_color components to exceed 1 (#260)

* Add more material examples (#257)

* Merge v1.1 development to main (#222)

This changelist merges v1.1 development from dev_1.1 to main, in preparation for marking the release of OpenPBR v1.1.

* Adding more material examples
- Bumped MaterialX version from 1.38 to 1.39 on existing examples
- Added new examples

* - Added MIT Black

* Color updates:
- Updated all colors to ACEScg
- All metals now have F82 as specular_color
- Added a few more metals from Portsmouth's chart

* Material updates:
- Added SSS to Sclera and made it less red
- Added LCD Display material
- Added two variations of Light Bulb with different CCT

* Material updates:
- Added base_diffuse_roughness to Brick, Charcoal, and Sand
- Made Velvet purple so it's more convincing

* Updated roughness values

* Removed a few materials that were less useful as examples

* Renamed Polyurethane

* Updated Blood material

* Added Abbe value to Blood material

* Updated IOR of Blood

* - Updated coffee material

* Split Honey into two materials, liquid and crystallized

* - Updated Honey (Crystallized) roughness value

---------

Signed-off-by: Adrien Herubel <AdrienHerubel@users.noreply.github.com>
Co-authored-by: Jonathan Stone <jstone@lucasfilm.com>
Co-authored-by: Adrien Herubel <AdrienHerubel@users.noreply.github.com>

* Integrate OpenPBR update from MaterialX project (#265)

* Integrate OpenPBR updates from MaterialX project

This changelist integrates two post-1.1 updates to OpenPBR Surface from the MaterialX project:

- Optimizations to OpenPBR graph (AcademySoftwareFoundation/MaterialX#2459)
- Add code generation hints support (AcademySoftwareFoundation/MaterialX#1954)

The more substantial update is the graph optimization, and I've copied the performance measurements from the original change for reference:

Performance tests were conducted on an NVIDIA RTX A6000 at 4K resolution, and the following timing improvements were seen:

OpenPBR Carpaint: 16ms -> 7ms
OpenPBR Glass: 27ms -> 11ms
OpenPBR Pearl: 16ms -> 12ms
OpenPBR Aluminum: 14ms -> 5ms

* Omit hardware shading optimizations

* Move anisotropy figure before Multiple Scattering section

* Revert CHANGELOG.md to upstream/dev_1.2 (belongs in separate PR #295)

---------

Signed-off-by: Adrien Herubel <AdrienHerubel@users.noreply.github.com>
Co-authored-by: Jonathan Stone <jstone@lucasfilm.com>
Co-authored-by: Julien Guertault <9511025+virtualzavie@users.noreply.github.com>
Co-authored-by: Anton Palmqvist <13031779+AntonPalmqvist@users.noreply.github.com>
Co-authored-by: Adrien Herubel <AdrienHerubel@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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