Principled v2 BSDF #99447

Open
opened 2022-07-04 23:56:21 +02:00 by Lukas Stockner · 94 comments
Member

This task is to track the work on the overhaul of the Principled BSDF node.

Feedback should be posted on the Principled v2 devtalk thread.

Planning

Breaking Changes (4.0 Bcon1)

  • Per microfacet glass Fresnel (5f9b518)
  • Albedo scaling (#104445)
  • New layering (#110864)
  • Microfiber sheen (#109949)
  • Remove transmission roughness (#109950)
  • Subsurface scattering parameter changes (#110989)
  • Clearcoat parameter changes (#110993)
  • Change emission defaults to white color and zero intensity (#111155)
  • Layer emission below Sheen and Clearcoat (#111155)
  • Make multiscatter GGX default (8367167626)

Polishing (4.0 Bcon2)

  • Rename Emission to Emission Color
  • Improve EEVEE compatibility (#111754)
  • Specular parameter change (make Specular Tint a color input (#112192)
  • Subsurface refraction on entry
  • Metallic Fresnel (F82-Tint model) (#112551)
  • Add/Improve socket descriptions
  • Change Specular input to control IOR (#112552)
  • Tint controls
  • Let coat normal influence sheen? (#112948)
  • Improve UX with panels (#112314)
    • Shorten socket names (#112591)
    • Panels in material properties editor (#112591)
    • Enums in panels (#112591)
  • Rename SSS methods?
  • Verify I/O still works correctly for
    • USD
    • OBJ
    • glTF
    • FBX
  • Verify correct max closures reported by BSDFs (#113390)
  • Forward compatibility for renamed sockets in 3.6
  • Fix Subsurface Scale being 0 in existing .blend files? (5e67e44)
  • Improve test coverage (e.g. white furnace tests for energy conservation)
  • Clamping (#112895)
  • Coat tint issues with zero channels (#113468)

Further

  • Add explicit support for IOR=0 to directly specify F0 color (useful for legacy spec/glossy PBR textures)
  • Check interaction between subsurface random walk PDF and guiding (details here)
  • Clean up and optimize SVM implementation (parameter encoding/passing, special cases for transparency and emission)
  • Oren-Nayar diffuse
  • Thin sheet mode
  • Thin Film/Iridescence layer
  • Basic volume controls
  • Nested dielectric support
  • Interaction between Coat IOR and main IOR (?)
  • Subsurface anisotropy switches back to isotropic after 9 bounces, can we disable that? (discussion)
  • OpenPBR compatibility
    • Base weight and specular weight?
    • IOR texturing parameter
    • Possibly separate subsurface color input
    • Specular anisotropy parametrization
    • .. ?

Background

Important note

This is an ongoing project, and nothing is 100% certain yet. Additional components/options might be added, existing components/options might be removed and the behavior of existing options might change.

Also, Principled v2 is just a placeholder name until someone comes up with something better.

Goal of this project

The point of the Principled BSDF is to present a unified BSDF node that implements all commonly used shader elements, so that a wide range of materials can be created by simply adjusting its inputs. Further, it should be physically based, but allow for artistic control when needed, and should have intuitive and artist-friendly parameters.

While the current Principled BSDF fulfills this goal, there are some issues with it:

  • By default, energy is lost at high roughness, leading to unexpected darkening. This can be avoided by using multi-scattering GGX, but at the cost of render times and noise.
  • The mixing of components is neither energy-preserving nor energy-conserving.
  • The sheen component is a purely ad-hoc attempt to fix the energy loss mentioned above, but neither matches it very well nor makes for a very good model for actual sheen.
  • Metallic Fresnel is implemented using the Schlick approximation, and does not allow for the reflectivity decrease at intermediate angles that real metals show.
  • Tint options are quite limited and only allow for blending between white and the base color
  • The subsurface controls were originally designed for an approximate replacement for SSS, and later adapted for a real SSS implementation.
  • The current Fresnel implementation is strange - essentially, the code computes the real accurate dielectric Fresnel, and then remaps linearly from [real_F0 ... 1] to [schlick_F0 ... 1] to get metallic effects, instead of doing either full accurate Fresnel or full Schlick Fresnel.
  • There are three different IOR inputs for the same material.
  • Transmission roughness is essentially a hack for modeling thin sheet models, but still refracts rays (unlike a proper thin sheet model).

Many of these issues have been addressed by research in the last few years, so it makes sense to revisit this topic and rework the Principled BSDF to include these improvements.
Additionally, there have been new developments in the shading research world that simply aren't part of the Principled BSDF yet.

An additional goal is to have good compatibility to what other renderers are doing - in general, it looks like the entire industry is currently converging on a "default shader" with certain components, and it would be great if Cycles' new all-in-one node is compatible with what e.g. MaterialX, glTF, USD, OSL, other renderers and/or game engines are using so that assets can be easily transferred.

For compatibility reasons, the "old" Principled BSDF will also be preserved in its current form, at least for now.

Solutions to the issues listed above

  • Energy preservation: Is solved by rescaling the microfacet BSDFs according to precomputed albedo tables. Effects such as increased saturation at high roughness are accounted for.
  • Energy conservation: The albedo tables are also used in order to scale lower layers of the stack according to the albedo of the upper layer
  • Sheen is replaced by this model: http://www.aconty.com/pdf/s2017_pbs_imageworks_sheen.pdf
  • Metallic Fresnel is replaced with an approach that is more fitting for conductors, such as the generalized Schlick model [proposed here ]] (basically mix(F_0, F_90, (1-cosI)^(1/f)) rather than mix(F_0, 1.0, (1-cosI)^5)) or the artist-friendly remapping [ https:*jcgt.org/published/0003/04/03/paper.pdf | proposed here .
  • The tint options will be replaced by a color input for every component of the model that is used as a multiplier on top of each component. Leaving them at (1,1,1) will result in a physically accurate model, while other values can be used for tweaking intensity and/or color.
  • The subsurface [0..1] input will be replaced by a subsurface scale parameter that acts as a multiplier on top of the radius input. The subsurface color input is removed.
  • For Fresnel, metallic and dielectric will be handled separately and mixed according to the metallic input.
  • Transmission, SSS and dielectric specular share the same IOR:
  • A proper thin sheet mode is added.

Components of the new Principled BSDF

  • Diffuse
    • Currently only Lambertian BSDF, might want Oren-Nayar as well
  • Subsurface
    • No refraction on entry bounce yet
  • Dielectric specular
  • Transmission
  • Metallic specular
    • Only generalized Schlick implemented so far
  • Sheen
  • Clearcoat
  • Transparency
  • Emission
  • Tint controls
  • Thin sheet mode
  • Needs to replace transmission component with additional reflection lobe that's mirrored to the lower hemisphere, with remapped roughness
  • Iridescence (aka "thin film")
    • First experiments are working, but quite a few unresolved issues (metallic base, illuminant-neutral XYZ conversion etc.)
  • Basic volume controls
    • Since base color no longer controls transmission color in this version (since colored transmission in unphysical, there will still be a dedicated tint input for it if you really want it), the idea here is to implement basic volume controls (homogenous absorption, maybe also scattering) in the main Principled BSDF.
    • Not sure how to handle this on the UI side without requiring the user to connect to the Volume output as well. Maybe auto-connect internally if the Volume output is empty, otherwise let the "real" volume shader override this?

Things that need to be fixed

  • Albedo precomputation code
  • OSL support
  • Eevee
  • Color passes (-> Denoising)
  • Diffuse/glossy/etc. color passes and Denoising Albedo are broken, leading to bad denoising results
  • Importance sampling weights
  • Important sampling weights aren't adjusted to albedo yet, leading to high noise
  • Caustic controls
  • SVM parameter packing
  • Performance (probably)
  • Ensuring that Principled V1 remains compatible (except for small differences, e.g. with multiscattering)
  • Shader node UI/UX (the Principled BSDF node is already massive, and this adds many additional inputs, so something like collapsible panels inside nodes would be great)

Things that could be added

Note: These are just some ideas, it's entirely possible that none of them make it!

  • Dispersion
    • Doesn't actually need spectral rendering support - the closure just samples a random wavelength, adjusts its throughput accordingly and remembers the wavelength for the path so that when a second dispersive material is encountered, it uses the same wavelength.
  • Nested dielectrics
    • The idea here is to resolve the common problem of how to model two refractive materials intersecting (e.g. water in a glass). Each material is assigned a priority. When a path hits a refractive surface while already being inside a material with higher priority, it simply ignores the intersection. By maintaining a list of materials that the path is currently in and the matching IORs, this resolves the intersection problem and automatically computes relative IORs.
  • Note that this is not directly connected to the Principled BSDF.
  • Volume handling needs some special logic here - if the lower-priority material has volumetric properties, those should start to apply once the path leaves the higher-priority material.
  • "Architectural Glass"
    • This is a common trick to avoid caustics in situations where they're not needed for accuracy (e.g. windows) - on secondary bounces and shadow rays, the refraction is replaced with transparency. The Principled BSDF could have a checkbox to automatically handle this.
  • Exposing new closures (e.g. sheen) as regular nodes as well

Additional notes

https://wiki.blender.org/wiki/User:Lukasstockner97/Principled_v2

This task is to track the work on the overhaul of the Principled BSDF node. Feedback should be posted on the [Principled v2 devtalk thread](https://devtalk.blender.org/t/principled-v2-feedback-discussion-thread/24997/). ## Planning ### Breaking Changes (4.0 Bcon1) * [x] Per microfacet glass Fresnel (5f9b518) * [x] Albedo scaling (#104445) * [x] New layering (#110864) * [x] Microfiber sheen (#109949) * [x] Remove transmission roughness (#109950) * [x] Subsurface scattering parameter changes (#110989) * [x] Clearcoat parameter changes (#110993) * [x] Change emission defaults to white color and zero intensity (#111155) * [x] Layer emission below Sheen and Clearcoat (#111155) * [x] Make multiscatter GGX default (8367167626294e0ea72b9489e4f2583ff0a57ec4) ### Polishing (4.0 Bcon2) * [x] Rename Emission to Emission Color * [x] Improve EEVEE compatibility (#111754) * [x] Specular parameter change (make Specular Tint a color input (#112192) * [x] Subsurface refraction on entry * [x] Metallic Fresnel (F82-Tint model) (#112551) * [x] Add/Improve socket descriptions * [x] Change Specular input to control IOR (#112552) * [x] Tint controls * [x] Let coat normal influence sheen? (#112948) * [x] Improve UX with panels (#112314) * [x] Shorten socket names (#112591) * [x] Panels in material properties editor (#112591) * [x] Enums in panels (#112591) * [x] Rename SSS methods? * [x] Verify I/O still works correctly for * [x] USD * [x] OBJ * [x] glTF * [x] FBX * [x] Verify correct max closures reported by BSDFs (#113390) * [x] Forward compatibility for renamed sockets in 3.6 * [x] Fix Subsurface Scale being 0 in existing .blend files? (5e67e44) * [x] Improve test coverage (e.g. white furnace tests for energy conservation) * [x] Clamping (#112895) * [x] Coat tint issues with zero channels (#113468) ### Further * [ ] Add explicit support for IOR=0 to directly specify F0 color (useful for legacy spec/glossy PBR textures) * [ ] Check interaction between subsurface random walk PDF and guiding ([details here](https://projects.blender.org/blender/blender/pulls/110989#issuecomment-1000378)) * [ ] Clean up and optimize SVM implementation (parameter encoding/passing, special cases for transparency and emission) * [ ] Oren-Nayar diffuse * [ ] Thin sheet mode * [ ] Thin Film/Iridescence layer * [ ] Basic volume controls * [ ] Nested dielectric support * [ ] Interaction between Coat IOR and main IOR (?) * [ ] Subsurface anisotropy switches back to isotropic after 9 bounces, can we disable that? ([discussion](https://devtalk.blender.org/t/principled-v2-feedback-discussion-thread/24997/581)) * [ ] OpenPBR compatibility * [ ] Base weight and specular weight? * [x] IOR texturing parameter * [ ] Possibly separate subsurface color input * [ ] Specular anisotropy parametrization * [ ] .. ? ## Background ### Important note **This is an ongoing project, and nothing is 100% certain yet. Additional components/options might be added, existing components/options might be removed and the behavior of existing options might change.** **Also, Principled v2 is just a placeholder name until someone comes up with something better.** ### Goal of this project The point of the Principled BSDF is to present a unified BSDF node that implements all commonly used shader elements, so that a wide range of materials can be created by simply adjusting its inputs. Further, it should be physically based, but allow for artistic control when needed, and should have intuitive and artist-friendly parameters. While the current Principled BSDF fulfills this goal, there are some issues with it: - By default, energy is lost at high roughness, leading to unexpected darkening. This can be avoided by using multi-scattering GGX, but at the cost of render times and noise. - The mixing of components is neither energy-preserving nor energy-conserving. - The sheen component is a purely ad-hoc attempt to fix the energy loss mentioned above, but neither matches it very well nor makes for a very good model for actual sheen. - Metallic Fresnel is implemented using the Schlick approximation, and does not allow for the reflectivity decrease at intermediate angles that real metals show. - Tint options are quite limited and only allow for blending between white and the base color - The subsurface controls were originally designed for an approximate replacement for SSS, and later adapted for a real SSS implementation. - The current Fresnel implementation is strange - essentially, the code computes the real accurate dielectric Fresnel, and then remaps linearly from [real_F0 ... 1] to [schlick_F0 ... 1] to get metallic effects, instead of doing either full accurate Fresnel or full Schlick Fresnel. - There are three different IOR inputs for the same material. - Transmission roughness is essentially a hack for modeling thin sheet models, but still refracts rays (unlike a proper thin sheet model). Many of these issues have been addressed by research in the last few years, so it makes sense to revisit this topic and rework the Principled BSDF to include these improvements. Additionally, there have been new developments in the shading research world that simply aren't part of the Principled BSDF yet. An additional goal is to have good compatibility to what other renderers are doing - in general, it looks like the entire industry is currently converging on a "default shader" with certain components, and it would be great if Cycles' new all-in-one node is compatible with what e.g. MaterialX, glTF, USD, OSL, other renderers and/or game engines are using so that assets can be easily transferred. For compatibility reasons, the "old" Principled BSDF will also be preserved in its current form, at least for now. ### Solutions to the issues listed above - Energy preservation: Is solved by rescaling the microfacet BSDFs according to precomputed albedo tables. Effects such as increased saturation at high roughness are accounted for. - Energy conservation: The albedo tables are also used in order to scale lower layers of the stack according to the albedo of the upper layer - Sheen is replaced by this model: http://www.aconty.com/pdf/s2017_pbs_imageworks_sheen.pdf - Metallic Fresnel is replaced with an approach that is more fitting for conductors, such as the generalized Schlick model [proposed here ]] (basically `mix(F_0, F_90, (1-cosI)^(1/f))` rather than `mix(F_0, 1.0, (1-cosI)^5)`) or the artist-friendly remapping [[ https:*jcgt.org/published/0003/04/03/paper.pdf | proposed here ](https:*blog.selfshadow.com/publications/s2017-shading-course/imageworks/s2017_pbs_imageworks_slides_v2.pdf). - The tint options will be replaced by a color input for every component of the model that is used as a multiplier on top of each component. Leaving them at (1,1,1) will result in a physically accurate model, while other values can be used for tweaking intensity and/or color. - The subsurface [0..1] input will be replaced by a subsurface scale parameter that acts as a multiplier on top of the radius input. The subsurface color input is removed. - For Fresnel, metallic and dielectric will be handled separately and mixed according to the metallic input. - Transmission, SSS and dielectric specular share the same IOR: - A proper thin sheet mode is added. ### Components of the new Principled BSDF - Diffuse - Currently only Lambertian BSDF, might want Oren-Nayar as well - Subsurface - No refraction on entry bounce yet - Dielectric specular - Transmission - Metallic specular - Only generalized Schlick implemented so far - Sheen - Clearcoat - Transparency - Emission - Tint controls - Thin sheet mode - Needs to replace transmission component with additional reflection lobe that's mirrored to the lower hemisphere, with remapped roughness - Iridescence (aka "thin film") - First experiments are working, but quite a few unresolved issues (metallic base, illuminant-neutral XYZ conversion etc.) - Basic volume controls - Since base color no longer controls transmission color in this version (since colored transmission in unphysical, there will still be a dedicated tint input for it if you really want it), the idea here is to implement basic volume controls (homogenous absorption, maybe also scattering) in the main Principled BSDF. - Not sure how to handle this on the UI side without requiring the user to connect to the Volume output as well. Maybe auto-connect internally if the Volume output is empty, otherwise let the "real" volume shader override this? ### Things that need to be fixed - [x] Albedo precomputation code - [x] OSL support - [ ] Eevee - [x] Color passes (-> Denoising) - [x] Diffuse/glossy/etc. color passes and Denoising Albedo are broken, leading to bad denoising results - [x] Importance sampling weights - [x] Important sampling weights aren't adjusted to albedo yet, leading to high noise - [x] Caustic controls - [x] SVM parameter packing - [x] Performance (probably) - [x] Ensuring that Principled V1 remains compatible (except for small differences, e.g. with multiscattering) - [x] Shader node UI/UX (the Principled BSDF node is already massive, and this adds many additional inputs, so something like collapsible panels inside nodes would be great) ### Things that could be added **Note: These are just some ideas, it's entirely possible that none of them make it!** - Dispersion - Doesn't actually need spectral rendering support - the closure just samples a random wavelength, adjusts its throughput accordingly and remembers the wavelength for the path so that when a second dispersive material is encountered, it uses the same wavelength. - Nested dielectrics - The idea here is to resolve the common problem of how to model two refractive materials intersecting (e.g. water in a glass). Each material is assigned a priority. When a path hits a refractive surface while already being inside a material with higher priority, it simply ignores the intersection. By maintaining a list of materials that the path is currently in and the matching IORs, this resolves the intersection problem and automatically computes relative IORs. - Note that this is not directly connected to the Principled BSDF. - Volume handling needs some special logic here - if the lower-priority material has volumetric properties, those should start to apply once the path leaves the higher-priority material. - "Architectural Glass" - This is a common trick to avoid caustics in situations where they're not needed for accuracy (e.g. windows) - on secondary bounces and shadow rays, the refraction is replaced with transparency. The Principled BSDF could have a checkbox to automatically handle this. - Exposing new closures (e.g. sheen) as regular nodes as well ### Additional notes https://wiki.blender.org/wiki/User:Lukasstockner97/Principled_v2
Lukas Stockner self-assigned this 2022-07-04 23:56:21 +02:00
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscriber: @LukasStockner

Added subscriber: @LukasStockner

Added subscriber: @Dangry

Added subscriber: @Dangry

Added subscriber: @TheRedWaxPolice

Added subscriber: @TheRedWaxPolice

Added subscriber: @rjg

Added subscriber: @rjg

Added subscriber: @scopelma

Added subscriber: @scopelma

Added subscriber: @Patrick-Huang

Added subscriber: @Patrick-Huang

Added subscriber: @fclem

Added subscriber: @fclem

I think we should discuss how we could implement the specular workflow (i.e: EEVEE's Specular BSDF node) into this v2? This would remove the need for a dedicated node that isn't even be supported by Cycles.

To my knowledge, it is just a matter of exposing the F0 specular color directly. Some renderers do energy conservation and subtract the F0 from the albedo but other don't. I don't know if there is an industry standard way of doing this.
Moreover, specular color below a certain threshold might be consider shadowing and just fade the whole reflective layer.

Note that both of the aforementioned effects (energy conservation and specular shadowing) are not modeled by the current EEVEE's Specular BSDF node implementation.

I think we should discuss how we could implement the specular workflow (i.e: EEVEE's Specular BSDF node) into this v2? This would remove the need for a dedicated node that isn't even be supported by Cycles. To my knowledge, it is just a matter of exposing the F0 specular color directly. Some renderers do energy conservation and subtract the F0 from the albedo but other don't. I don't know if there is an industry standard way of doing this. Moreover, specular color below a certain threshold might be consider shadowing and just fade the whole reflective layer. Note that both of the aforementioned effects (energy conservation and specular shadowing) are not modeled by the current EEVEE's Specular BSDF node implementation.
Member

Added subscriber: @Alaska

Added subscriber: @Alaska

Added subscriber: @blendersamsonov

Added subscriber: @blendersamsonov
Member

Added subscriber: @JulienDuroure

Added subscriber: @JulienDuroure
Member

Hello,
I am currently working on adding some glTF extension to importer/exporter.
With current Principled BSDF, sheen and specular models are not 100% compatible between Blender and glTF.
I didn't (yet) read in details what are your plan for Principled v2, but I hope it will be easier to convert from and to glTF.
Here are link to glTF implementation:
https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md
https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md

Hello, I am currently working on adding some glTF extension to importer/exporter. With current Principled BSDF, sheen and specular models are not 100% compatible between Blender and glTF. I didn't (yet) read in details what are your plan for Principled v2, but I hope it will be easier to convert from and to glTF. Here are link to glTF implementation: https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md
Member

Added subscriber: @PascalSchon

Added subscriber: @PascalSchon

Added subscriber: @JanErik

Added subscriber: @JanErik

Added subscriber: @thomasmcs

Added subscriber: @thomasmcs

Added subscriber: @Roggii-4

Added subscriber: @Roggii-4

Added subscriber: @makizar

Added subscriber: @makizar

Added subscriber: @Yacine-Teach

Added subscriber: @Yacine-Teach

Added subscriber: @lsscpp

Added subscriber: @lsscpp

Added subscriber: @s12a

Added subscriber: @s12a
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

Added subscriber: @zanqdo

Added subscriber: @zanqdo

Added subscriber: @dabuxian

Added subscriber: @dabuxian

Added subscriber: @donmccurdy

Added subscriber: @donmccurdy
Contributor

Added subscriber: @KenzieMac130

Added subscriber: @KenzieMac130

Added subscriber: @AndyCuccaro

Added subscriber: @AndyCuccaro

Added subscriber: @VDC

Added subscriber: @VDC
Contributor

Added subscriber: @Eary

Added subscriber: @Eary

Added subscriber: @proog128

Added subscriber: @proog128

This is a great initiative! Since glTF and the importer/exporter are explicitly mentioned here, I'd like to share a couple of insights into trade-offs we made when defining the glTF "PBR Next" material extensions and mention a few details that might be easy to miss in the long discussion threads in glTF pull requests. It would be great if glTF and Blender are aligned well, a huge win for the open ecosystem. I hope this post useful, my appologies if I am just repeating stuff you already know. If this is not the right place for this post, let me know where to put it instead and I will move it there.

glTF PBR Extensions

Dielectric Fresnel and Specular/Specular Color

The dielectric specular defined in KHR_materials_specular adds a specular color parameter that is compatible to traditional spec-gloss workflows (in particular the now deprecated KHR_materials_pbrSpecularGlossiness). In case Schlick Fresnel is used, it boils down to computing f0 and f90 as follows:

f0  = min(f0_from_ior(ior) * specularColor, float3(1.0)) * specular
f90 = specular

And the base layer (diffuse) weight:

diffuse = (1 - max_value(GeneralizedSchlick(f0, f90, 5.0)) / pi

specularColor is a color, specular a scalar weight.

The three important bits are:

  • Taking max_value(c), i.e., the maximum of the RGB colors, because that prevents color shifts due to the 1 - x term. Also, it is required to be compatible to the old KHR_materials_pbrSpecularGlossiness.
  • Clamping the f0_from_ior(ior) * specularColor term (not including specular). This is required to be (easily) compatible to the Disney BRDF specular parameter. Disney specular greater than 0.5 maps to glTF specularColor greater than 1.0. To ensure energy conservation, the clamp is needed.
  • Allow an IOR of 0. When converting from spec-gloss, you could either set the IOR to a high value or to 0. In both cases, the same happens mathematically, but 0 might be a little bit nicer. This is, of course, only relevant if the spec-gloss source material doesn't itself offer an IOR parameter. If it does, artists typically set it to a high number manually.

Although all examples in the glTF specification use Schlick Fresnel, it is designed in such a way that it also allows to use the accurate Fresnel equations. This requires the remapping that is already present in the Blender Principled V1 shader. Main reason for using the correct Fresnel equations in case of dielectric is the high error when the IOR approaches 1, which often happens with nested dielectrics when traveling through a volume boundary with similar IORs on each side.

The design consideration that underlies the Fresnel behavior in glTF is the following: by default, the material is "physically plausible", but optionally artistic tweaks are possible. In the default configuration, IOR = 1.5, specular = 1 and specularColor = (1,1,1). The preferred option to modify reflection/refraction behavior should always be the IOR parameter. The IOR parameter of KHR_materials_ior affects both refraction and reflection simultaneously, hence it's physically-plausible. This should be enough for most use-cases. Only in those rare cases where more control is needed, specular and specularColor from KHR_materials_specular should be considered. Typical cases are:

  • If the index of refraction is spatially-varying. Due to symmetry constraints, the IOR parameter is not texturable. specularColor, on the other hand, is texturable, but only affects reflection.
  • Conversion from spec-gloss workflows, with either an IOR = 0 or a reasonably high value for IOR. This includes measured materials, for example AxF. Moreover, there are cases in which the material model is just not expressive enough, and KHR_materials_specular is kind of a "backdoor" to make up for missing effects (e.g., complex car paints or fabrics).
  • Conversion from Standard Surface, which requires both specular (specular reflection weight) and specularColor (specular refractive index).
  • Conversion from Principled V1, which requires specularColor in range (0,0,0) to (2,2,2).

A final note regarding comaptiblity of KHR_materials_specular to Principled V1: Principled Specular and Specular Tint can be converted to KHR_materials_specular without loss, as long as the original configuration is energy conserving. This is not always the case due to the normalization with luminance in Principled V1, which may result in Fresnel values above 1. @JulienDuroure implemented this conversion in the glTF Blender Importer/Exporter. The conversion is described [here]]. The conversion is based on a survey of Fresnel models in common materials I did some time ago, see [https:*docs.google.com/document/d/1SvXWa6XGnFgsRXa1z4xw6QR1_jMmNSUTdRAmalCgoeI/edit?usp=sharing | here.

Metallic Fresnel

There were some discussions about whether to include a metallic "edge" color (f82/f90 color) in glTF or not. So far it's not available and also not on the roadmap. It was discussed whether the generalized Schlick model with f0 and f90 color is accurate enough (probably yes), if Gulbrandsen's artistic-friendly metallic Fresnel is a better alternative (no, for the reasons Naty Hoffman described [here]]), and if we can do better (most likely, see Adobe's [https:*substance3d.adobe.com/documentation/s3d/files/225969599/225969601/1/1647019577092/Adobe+Standard+Material+-+Technical+Documentation.pdf | Novel aspects of the Adobe Standard Material).

Iridescence

The iridenscence extensions [KHR_materials_iridescence]] is almost ready. It is based on Belcour and Barla's [https:*belcour.github.io/blog/research/publication/2017/05/01/brdf-thin-film.html | Practical Extension to Microfacet Theory for the Modeling of Varying Iridescence. Since this model requires a complex IOR for the base, @PascalSchon came up with a few clever tricks to integrate it into glTF. This is described in the extension and as part of the code in the glTF sample viewer. It might be a good solution for Principled V2.

Volumes and Nested dielectrics

KHR_materials_volume allows to toggle between thin-walled materials (the default) and volume boundaries. The latter enables refraction and nested dielectrics. However, there is no priority in glTF yet. Some renderers are able to determine the priority automatically for common use-cases, but to my knowledge there is no fully automatic solution that works in all cases. Therefore, the missing priority could be seen as a shortcoming of glTF that may have to be addressed sooner or later.

One note regarding the thickness texture in glTF: It's only purpose is to provide the (precomputed) thickness of an object for renderes that are not able to compute it at run-time. Which typically means all rasterizers. The idea is that by providing a correct thickness map for the rasterizer, it will render an image with refraction and attenuation that looks consistent to the rendering of a ray tracer. The ray tracer does not need the thickness map, it will simply ignore it and take the distances from ray travelling.

Thin-Walled

Thin-walled materials are the default in glTF. Thin-walled disables volumetric refraction, attenuation and subsurface scattering. Nevertheless, the roughness has still an effect on the transmission lobe, mimicing refraction through uncorrelated microfacets on either side of the surface. This is detailed in KHR_materials_transmission.

Diffuse Transmission

Diffuse transmission is currently under active discussion. PR#1825 shows the current state. In essence, the implementation is straight-forward, but there is lots of debate whether or not it is useful, under which circumstances (thin or volumetric), and whether or not to include a separate diffuse transmission color parameter. (Without separate diffuse transmission color, the diffuse transmission BSDF would be multiplied by the base color).

In case of thin-walled, diffuse transmission is intended to be used for leaves, paper, etc. A separate color parameter allows to independently change the color for reflection and transmission. In the glTF PBR TSG we believe that although probably a niche feature, it is easy to have and adds some expressibility that could be nice for plants. If you know good use-cases for such a color parameter or have example scenes, please share it.

In case of volumetric, diffuse transmission is the gateway to subsurface-scattering. In fact, it is compatible to the Blender Principled v1 SSS implementation, which uses a white diffuse transmission when entering the surface. This is another reason for having a separate diffuse transmission color parameter. In order to be compatible to Blender Principled v1, diffuse transmission color has to be set to white.

In both cases, an alternative to an explicit diffuse transmission lobe would be to use a rough glossy transmission lobe. This has two main disadvantages:

  • It limits the flexiblity because the roughness parameter is shared by reflection and transmission BSDFs. So if the roughness is high for transmission, it will be high for reflection, too. The only chance to add highly-specular highlights is to add a clearcoat layer, but this is limited compared to the specular parameters of the base layer. In particular, in glTF clearcoat lacks IOR and color. Moreover, it's not really efficient to compute a glossy reflection lobe which is not really desired.
  • It requires a microfacet implementation with support for multiple scattering. Without multiple scattering, rough transmission microfacet has huge energy loss. Multiple scattering microfacet is more resource-intense than diffuse transmission, thus it's not mandatory to have in a glTF implementation.

SSS

Random-walk SSS is easy to implement in a path tracer, but not for rasterizers. The challenge is to use a heuristic to find out which approximation to use for a certain parameterization. There are mainly two cases: clear volumes and dense volumes. The problem is that it depends on volume parameters and object geometry.

For this reason glTF provides two ways of enabling volumetric effects:

  • Microfacet BTDF (KHR_materials_transmission): this should be used for clear volumes (i.e., only refraction and absorption; clear glass, smoke, ...).
  • Diffuse BTDF (KHR_materials_diffuse_transmission): this should be used for dense volumes (i.e., SSS dominates; skin, wax, ...)

Both BTDFs are mixed according to a weight, which means it's not a binary decision. The idea is that the mixed BTDF defines the scattering behavior when entering or leaving the volume beneath the surface, and the scattering inside the volume is then defined separately by attenuation/scattering coefficients and phase function.

Unfortunately, the choice for microfacet or diffuse transmission (clear or dense volume) is a user choice, so it might be suboptimal for a renderers heuristic. The parameterization of dense SSS in combination with a microfacet BTDF is still possible, and probably also required in some cases. Ideally, a rasterizer can detect such cases and switch to dense SSS, but it's hard to design a heuristic that works in all cases.

A path tracer doesn't care about this difference, it just uses the one or the other BTDF to enter the medium.

Regarding "white edges":

  • Microfacet BTDF + SSS: Doesn't suffer from the "white edges" problem. On the other hand, edges or thin parts of an object may become transparent, since there is a small chance that rays are never scattered.
  • Diffuse BTDF + SSS: Suffers from "white edges". On the other hand, it guarantees at least one scattering event (actually two). Our artists found this to be easier to use for dense media.

There is an early draft for a subsurface scattering extension to glTF that describes the reasoning in more detail, see PR#1928.

Texturable vs. non-texturable parameters

The volume parameters are not texturable in glTF: IOR, attenuation coefficient, scattering coefficient. This ensures that light transport is symmetric, making it possible to implement the material in a bidirectional path tracer.

A side effect of this is that these parameters are only of limited use if the material is thin-walled. In fact, attenuation and scattering coefficients have no effect at all. IOR is still taken into account, but if users want to texture the index of refraction, they have to fall back to specularColor, which is a multiplier to the f0 color as described before.

MaterialX and MDL

There are implementations of glTF in [MDL]] and [https:*github.com/AcademySoftwareFoundation/MaterialX/blob/main/libraries/bxdf/gltf_pbr.mtlx | MaterialX. Both are neither feature complete nor perfectly spec-conformant, as they have to deal with the limitations of the respective material language. Especially KHR_materials_specular and KHR_materials_iridescence are tricky to get correct in all details in high-level material languages.

This is a great initiative! Since glTF and the importer/exporter are explicitly mentioned here, I'd like to share a couple of insights into trade-offs we made when defining the **glTF "PBR Next" material extensions** and mention a few details that might be easy to miss in the long discussion threads in glTF pull requests. It would be great if glTF and Blender are aligned well, a huge win for the open ecosystem. I hope this post useful, my appologies if I am just repeating stuff you already know. If this is not the right place for this post, let me know where to put it instead and I will move it there. # glTF PBR Extensions **Dielectric Fresnel and Specular/Specular Color** The dielectric specular defined in [KHR_materials_specular](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_specular) adds a specular color parameter that is compatible to traditional spec-gloss workflows (in particular the now deprecated KHR_materials_pbrSpecularGlossiness). In case Schlick Fresnel is used, it boils down to computing f0 and f90 as follows: ``` f0 = min(f0_from_ior(ior) * specularColor, float3(1.0)) * specular f90 = specular ``` And the base layer (diffuse) weight: ``` diffuse = (1 - max_value(GeneralizedSchlick(f0, f90, 5.0)) / pi ``` `specularColor` is a color, `specular` a scalar weight. The three important bits are: * Taking `max_value(c)`, i.e., the maximum of the RGB colors, because that prevents color shifts due to the `1 - x` term. Also, it is required to be compatible to the old KHR_materials_pbrSpecularGlossiness. * Clamping the `f0_from_ior(ior) * specularColor` term (not including `specular`). This is required to be (easily) compatible to the Disney BRDF `specular` parameter. Disney `specular` greater than 0.5 maps to glTF `specularColor` greater than 1.0. To ensure energy conservation, the clamp is needed. * Allow an IOR of 0. When converting from spec-gloss, you could either set the IOR to a high value or to 0. In both cases, the same happens mathematically, but 0 might be a little bit nicer. This is, of course, only relevant if the spec-gloss source material doesn't itself offer an IOR parameter. If it does, artists typically set it to a high number manually. Although all examples in the glTF specification use Schlick Fresnel, it is designed in such a way that it also allows to use the accurate Fresnel equations. This requires the remapping that is already present in the Blender Principled V1 shader. Main reason for using the correct Fresnel equations in case of dielectric is the high error when the IOR approaches 1, which often happens with nested dielectrics when traveling through a volume boundary with similar IORs on each side. The design consideration that underlies the Fresnel behavior in glTF is the following: by default, the material is "physically plausible", but optionally artistic tweaks are possible. In the default configuration, `IOR = 1.5`, `specular = 1` and `specularColor = (1,1,1)`. The preferred option to modify reflection/refraction behavior should always be the `IOR` parameter. The `IOR` parameter of KHR_materials_ior affects both refraction and reflection simultaneously, hence it's physically-plausible. This should be enough for most use-cases. Only in those rare cases where more control is needed, `specular` and `specularColor` from KHR_materials_specular should be considered. Typical cases are: * If the index of refraction is spatially-varying. Due to symmetry constraints, the `IOR` parameter is not texturable. `specularColor`, on the other hand, is texturable, but only affects reflection. * Conversion from spec-gloss workflows, with either an `IOR = 0` or a reasonably high value for `IOR`. This includes measured materials, for example AxF. Moreover, there are cases in which the material model is just not expressive enough, and KHR_materials_specular is kind of a "backdoor" to make up for missing effects (e.g., complex car paints or fabrics). * Conversion from Standard Surface, which requires both `specular` (specular reflection weight) and `specularColor` (specular refractive index). * Conversion from Principled V1, which requires `specularColor` in range (0,0,0) to (2,2,2). A final note regarding comaptiblity of KHR_materials_specular to Principled V1: Principled `Specular` and `Specular Tint` can be converted to KHR_materials_specular without loss, as long as the original configuration is energy conserving. This is not always the case due to the normalization with luminance in Principled V1, which may result in Fresnel values above 1. @JulienDuroure implemented this conversion in the glTF Blender Importer/Exporter. The conversion is described [here]]. The conversion is based on a survey of Fresnel models in common materials I did some time ago, see [[https:*docs.google.com/document/d/1SvXWa6XGnFgsRXa1z4xw6QR1_jMmNSUTdRAmalCgoeI/edit?usp=sharing | here](https:*gist.github.com/proog128/d627c692a6bbe584d66789a5a6437a33). **Metallic Fresnel** There were some discussions about whether to include a metallic "edge" color (f82/f90 color) in glTF or not. So far it's not available and also not on the roadmap. It was discussed whether the generalized Schlick model with f0 and f90 color is accurate enough (probably yes), if Gulbrandsen's artistic-friendly metallic Fresnel is a better alternative (no, for the reasons Naty Hoffman described [here]]), and if we can do better (most likely, see Adobe's [[https:*substance3d.adobe.com/documentation/s3d/files/225969599/225969601/1/1647019577092/Adobe+Standard+Material+-+Technical+Documentation.pdf | Novel aspects of the Adobe Standard Material](http:*renderwonk.com/publications/mam2019/)). **Iridescence** The iridenscence extensions [KHR_materials_iridescence]] is almost ready. It is based on Belcour and Barla's [[https:*belcour.github.io/blog/research/publication/2017/05/01/brdf-thin-film.html | Practical Extension to Microfacet Theory for the Modeling of Varying Iridescence](https:*github.com/KhronosGroup/glTF/pull/2027). Since this model requires a complex IOR for the base, @PascalSchon came up with a few clever tricks to integrate it into glTF. This is described in the extension and as part of the code in the glTF sample viewer. It might be a good solution for Principled V2. **Volumes and Nested dielectrics** [KHR_materials_volume](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_volume) allows to toggle between thin-walled materials (the default) and volume boundaries. The latter enables refraction and nested dielectrics. However, there is no priority in glTF yet. Some renderers are able to determine the priority automatically for common use-cases, but to my knowledge there is no fully automatic solution that works in all cases. Therefore, the missing priority could be seen as a shortcoming of glTF that may have to be addressed sooner or later. One note regarding the `thickness` texture in glTF: It's only purpose is to provide the (precomputed) thickness of an object for renderes that are not able to compute it at run-time. Which typically means all rasterizers. The idea is that by providing a correct thickness map for the rasterizer, it will render an image with refraction and attenuation that looks consistent to the rendering of a ray tracer. The ray tracer does not need the thickness map, it will simply ignore it and take the distances from ray travelling. **Thin-Walled** Thin-walled materials are the default in glTF. Thin-walled disables volumetric refraction, attenuation and subsurface scattering. Nevertheless, the roughness has still an effect on the transmission lobe, mimicing refraction through uncorrelated microfacets on either side of the surface. This is detailed in [KHR_materials_transmission](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_transmission). **Diffuse Transmission** Diffuse transmission is currently under active discussion. [PR#1825](https://github.com/KhronosGroup/glTF/pull/1825) shows the current state. In essence, the implementation is straight-forward, but there is lots of debate whether or not it is useful, under which circumstances (thin or volumetric), and whether or not to include a separate diffuse transmission color parameter. (Without separate diffuse transmission color, the diffuse transmission BSDF would be multiplied by the base color). In case of **thin-walled**, diffuse transmission is intended to be used for leaves, paper, etc. A separate color parameter allows to independently change the color for reflection and transmission. In the glTF PBR TSG we believe that although probably a niche feature, it is easy to have and adds some expressibility that could be nice for plants. If you know good use-cases for such a color parameter or have example scenes, please share it. In case of **volumetric**, diffuse transmission is the gateway to subsurface-scattering. In fact, it is compatible to the Blender Principled v1 SSS implementation, which uses a white diffuse transmission when entering the surface. This is another reason for having a separate diffuse transmission color parameter. In order to be compatible to Blender Principled v1, diffuse transmission color has to be set to white. In both cases, an alternative to an explicit diffuse transmission lobe would be to use a rough glossy transmission lobe. This has two main disadvantages: * It limits the flexiblity because the roughness parameter is shared by reflection and transmission BSDFs. So if the roughness is high for transmission, it will be high for reflection, too. The only chance to add highly-specular highlights is to add a clearcoat layer, but this is limited compared to the specular parameters of the base layer. In particular, in glTF clearcoat lacks IOR and color. Moreover, it's not really efficient to compute a glossy reflection lobe which is not really desired. * It requires a microfacet implementation with support for multiple scattering. Without multiple scattering, rough transmission microfacet has huge energy loss. Multiple scattering microfacet is more resource-intense than diffuse transmission, thus it's not mandatory to have in a glTF implementation. **SSS** Random-walk SSS is easy to implement in a path tracer, but not for rasterizers. The challenge is to use a heuristic to find out which approximation to use for a certain parameterization. There are mainly two cases: clear volumes and dense volumes. The problem is that it depends on volume parameters *and* object geometry. For this reason glTF provides two ways of enabling volumetric effects: * Microfacet BTDF (KHR_materials_transmission): this should be used for clear volumes (i.e., only refraction and absorption; clear glass, smoke, ...). * Diffuse BTDF (KHR_materials_diffuse_transmission): this should be used for dense volumes (i.e., SSS dominates; skin, wax, ...) Both BTDFs are mixed according to a weight, which means it's not a binary decision. The idea is that the mixed BTDF defines the scattering behavior when entering or leaving the volume beneath the surface, and the scattering inside the volume is then defined separately by attenuation/scattering coefficients and phase function. Unfortunately, the choice for microfacet or diffuse transmission (clear or dense volume) is a user choice, so it might be suboptimal for a renderers heuristic. The parameterization of dense SSS in combination with a microfacet BTDF is still possible, and probably also required in some cases. Ideally, a rasterizer can detect such cases and switch to dense SSS, but it's hard to design a heuristic that works in all cases. A path tracer doesn't care about this difference, it just uses the one or the other BTDF to enter the medium. Regarding "white edges": * Microfacet BTDF + SSS: Doesn't suffer from the "white edges" problem. On the other hand, edges or thin parts of an object may become transparent, since there is a small chance that rays are never scattered. * Diffuse BTDF + SSS: Suffers from "white edges". On the other hand, it guarantees at least one scattering event (actually two). Our artists found this to be easier to use for dense media. There is an early draft for a subsurface scattering extension to glTF that describes the reasoning in more detail, see [PR#1928](https://github.com/KhronosGroup/glTF/pull/1928). **Texturable vs. non-texturable parameters** The volume parameters are not texturable in glTF: IOR, attenuation coefficient, scattering coefficient. This ensures that light transport is symmetric, making it possible to implement the material in a bidirectional path tracer. A side effect of this is that these parameters are only of limited use if the material is **thin-walled**. In fact, attenuation and scattering coefficients have no effect at all. IOR is still taken into account, but if users want to texture the index of refraction, they have to fall back to `specularColor`, which is a multiplier to the f0 color as described before. **MaterialX and MDL** There are implementations of glTF in [MDL]] and [[https:*github.com/AcademySoftwareFoundation/MaterialX/blob/main/libraries/bxdf/gltf_pbr.mtlx | MaterialX](https:*github.com/NVIDIA/MDL-SDK/blob/master/examples/mdl/nvidia/sdk_examples/gltf_support.mdl). Both are neither feature complete nor perfectly spec-conformant, as they have to deal with the limitations of the respective material language. Especially KHR_materials_specular and KHR_materials_iridescence are tricky to get correct in all details in high-level material languages.

Added subscriber: @MarvinW

Added subscriber: @MarvinW

Added subscriber: @Steve-Hanff

Added subscriber: @Steve-Hanff
Member

Added subscriber: @emackey

Added subscriber: @emackey

Added subscriber: @mcamen

Added subscriber: @mcamen

Added subscriber: @renderart

Added subscriber: @renderart

I share this here too (I apologize) because I consider it to be something important, even so the next tests I will publish on Devtalk. If I have to remove this from here, please let me know.

Hello, I have loved this development, thank you very much I am happy.

https://docs.unrealengine.com/5.0/Images/designing-visuals-rendering-and-graphics/materials/material-editor-user-guide/interface/material-editor-ui-full.png

I haven't tried much the new system yet, but the first thing I noticed is:
In the link I shared there are 3 initially important nodes (Specular, Base color and Roughness) to add these 3 important textures, How could I use these textures (Specular) in the new system? Do I have to use a Mix of the Roughness and Specular Textures to connect them to the new Roughness?. I have that concern.

I'm going to try more on other engines to make comparisons. Thanks for: Energy conservation, Sheen, Sheen roughness, Metallic Edge, Metallic Falloff... They are amazing

I share this here too (I apologize) because I consider it to be something important, even so the next tests I will publish on Devtalk. If I have to remove this from here, please let me know. Hello, I have loved this development, thank you very much I am happy. https://docs.unrealengine.com/5.0/Images/designing-visuals-rendering-and-graphics/materials/material-editor-user-guide/interface/material-editor-ui-full.png I haven't tried much the new system yet, but the first thing I noticed is: In the link I shared there are 3 initially important nodes (Specular, Base color and Roughness) to add these 3 important textures, How could I use these textures (Specular) in the new system? Do I have to use a Mix of the Roughness and Specular Textures to connect them to the new Roughness?. I have that concern. I'm going to try more on other engines to make comparisons. Thanks for: Energy conservation, Sheen, Sheen roughness, Metallic Edge, Metallic Falloff... They are amazing

Added subscriber: @geocentric_wage

Added subscriber: @geocentric_wage
Author
Member

Added subscriber: @Christophe-Hery

Added subscriber: @Christophe-Hery
Author
Member

Thanks for all the input so far, especially the fantastic comment from @proog128!

From the discussion here and on Devtalk, it seems that the most interesting and tricky point is the Fresnel model used.
As far as I can tell, the model used by KHR_materials_specular should indeed cover most use cases - it gives people their specular slider from Principled v1 back (though it needs a multiply by 2), it gives tint control over highlights, it gives compatibility with specular/glossy (by setting IOR to zero, so that the base F0 is 1.0 and the tint input effectively becomes an F0 input) and can be integrated with the energy conservation logic. And by simply not touching the non-physical controls, you keep the realistic model.

Answering specific comments:

In #99447#1385398, @fclem wrote:
I think we should discuss how we could implement the specular workflow (i.e: EEVEE's Specular BSDF node) into this v2? This would remove the need for a dedicated node that isn't even be supported by Cycles.

To my knowledge, it is just a matter of exposing the F0 specular color directly. Some renderers do energy conservation and subtract the F0 from the albedo but other don't. I don't know if there is an industry standard way of doing this.

As mentioned above, the "diffuse color + F0 color + roughness" input should be representable when we have the KHR_materials_specular-style controls by connecting diffuse to the Base Color input, F0 to the Specular Tint input and setting IOR=0 and metallic=0. The energy conservation is indeed a good point - if this is an issue, we could disable it for IOR==0 (since that only makes sense for this one particular case anyways).

In #99447#1385486, @JulienDuroure wrote:
Hello,
I am currently working on adding some glTF extension to importer/exporter.
With current Principled BSDF, sheen and specular models are not 100% compatible between Blender and glTF.
I didn't (yet) read in details what are your plan for Principled v2, but I hope it will be easier to convert from and to glTF.
Here are link to glTF implementation:
https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md
https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md

Both will be compatible, as far as I can tell. Sheen is based on the same model, Principled v2 just needs the color input which is planned. For Specular - see the discussion above, I think it makes sense to add those options.

In #99447#1388292, @proog128 wrote:
This is a great initiative! Since glTF and the importer/exporter are explicitly mentioned here, I'd like to share a couple of insights into trade-offs we made when defining the glTF "PBR Next" material extensions and mention a few details that might be easy to miss in the long discussion threads in glTF pull requests. It would be great if glTF and Blender are aligned well, a huge win for the open ecosystem. I hope this post useful, my appologies if I am just repeating stuff you already know. If this is not the right place for this post, let me know where to put it instead and I will move it there.
...

This post is definitely useful here!
Some quick replies to your sections (I'll go into more detail later):

  • Dielectric Fresnel: See above, I think the IOR (physical) + specColor + specular (artistic) approach makes sense. UI will be tricky, but we'll figure it out.
  • Metallic Fresnel: Thanks for the link to the Adobe doc, I'm really liking their F82 model - it also falls back to standard Schlick with default settings, but unlike the current generalized Schlick it can reproduce the "dip" response of conductors and still goes to one at F90 as it should.
  • Iridescence: Hm, the simplified form is interesting. From what I can see, this is mostly just ignoring the conductor case for the actual iridescence calculation and converting F0 to an IOR even if it's coming from a metal. I'll give it a try.
  • Thin-walled: Yeah, my current plan was to disable subsurface scattering and replace the actual transmission with a flipped reflection lobe with adjusted roughness.
  • Diffuse Transmission: This is still quite unclear to me as well currently...
  • SSS: I think @Christophe-Hery is currently looking into this topic as well.

In #99447#1389889, @renderart wrote:
In the link I shared there are 3 initially important nodes (Specular, Base color and Roughness) to add these 3 important textures, How could I use these textures (Specular) in the new system? Do I have to use a Mix of the Roughness and Specular Textures to connect them to the new Roughness?. I have that concern.

I guess that specular input controls the strength of the highlight? If yes, that's covered by the Fresnel topic above, there will be an input for this.

Thanks for all the input so far, especially the fantastic comment from @proog128! From the discussion here and on Devtalk, it seems that the most interesting and tricky point is the Fresnel model used. As far as I can tell, the model used by `KHR_materials_specular` should indeed cover most use cases - it gives people their specular slider from Principled v1 back (though it needs a multiply by 2), it gives tint control over highlights, it gives compatibility with specular/glossy (by setting IOR to zero, so that the base F0 is 1.0 and the tint input effectively becomes an F0 input) and can be integrated with the energy conservation logic. And by simply not touching the non-physical controls, you keep the realistic model. Answering specific comments: > In #99447#1385398, @fclem wrote: > I think we should discuss how we could implement the specular workflow (i.e: EEVEE's Specular BSDF node) into this v2? This would remove the need for a dedicated node that isn't even be supported by Cycles. > > To my knowledge, it is just a matter of exposing the F0 specular color directly. Some renderers do energy conservation and subtract the F0 from the albedo but other don't. I don't know if there is an industry standard way of doing this. As mentioned above, the "diffuse color + F0 color + roughness" input should be representable when we have the `KHR_materials_specular`-style controls by connecting diffuse to the Base Color input, F0 to the Specular Tint input and setting IOR=0 and metallic=0. The energy conservation is indeed a good point - if this is an issue, we could disable it for IOR==0 (since that only makes sense for this one particular case anyways). > In #99447#1385486, @JulienDuroure wrote: > Hello, > I am currently working on adding some glTF extension to importer/exporter. > With current Principled BSDF, sheen and specular models are not 100% compatible between Blender and glTF. > I didn't (yet) read in details what are your plan for Principled v2, but I hope it will be easier to convert from and to glTF. > Here are link to glTF implementation: > https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md > https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md Both will be compatible, as far as I can tell. Sheen is based on the same model, Principled v2 just needs the color input which is planned. For Specular - see the discussion above, I think it makes sense to add those options. > In #99447#1388292, @proog128 wrote: > This is a great initiative! Since glTF and the importer/exporter are explicitly mentioned here, I'd like to share a couple of insights into trade-offs we made when defining the **glTF "PBR Next" material extensions** and mention a few details that might be easy to miss in the long discussion threads in glTF pull requests. It would be great if glTF and Blender are aligned well, a huge win for the open ecosystem. I hope this post useful, my appologies if I am just repeating stuff you already know. If this is not the right place for this post, let me know where to put it instead and I will move it there. > ... This post is definitely useful here! Some quick replies to your sections (I'll go into more detail later): - Dielectric Fresnel: See above, I think the IOR (physical) + specColor + specular (artistic) approach makes sense. UI will be tricky, but we'll figure it out. - Metallic Fresnel: Thanks for the link to the Adobe doc, I'm really liking their F82 model - it also falls back to standard Schlick with default settings, but unlike the current generalized Schlick it can reproduce the "dip" response of conductors and still goes to one at F90 as it should. - Iridescence: Hm, the simplified form is interesting. From what I can see, this is mostly just ignoring the conductor case for the actual iridescence calculation and converting F0 to an IOR even if it's coming from a metal. I'll give it a try. - Thin-walled: Yeah, my current plan was to disable subsurface scattering and replace the actual transmission with a flipped reflection lobe with adjusted roughness. - Diffuse Transmission: This is still quite unclear to me as well currently... - SSS: I think @Christophe-Hery is currently looking into this topic as well. > In #99447#1389889, @renderart wrote: > In the link I shared there are 3 initially important nodes (Specular, Base color and Roughness) to add these 3 important textures, How could I use these textures (Specular) in the new system? Do I have to use a Mix of the Roughness and Specular Textures to connect them to the new Roughness?. I have that concern. I guess that specular input controls the strength of the highlight? If yes, that's covered by the Fresnel topic above, there will be an input for this.
Author
Member

I've just pushed an update that replaces the generalized Schlick Fresnel with the Adobe F82 model.

I'm really happy with the results - I've built a script to fit base and edge color values to real-world data from https://refractiveindex.info/ (in the hope that people will stop picking three random wavelengths from the graphs there and using them as RGB values) and the F82 model manages to reproduce some metals much better than the basic Schlick model. Trying to fit the generalized model for comparison didn't really work since it kept putting the edge color to 1 in order to reproduce the grazing incidence response, and when restricing the fit range to 0-80° it also gave weird solutions.

Here's the script and a comparison between the best fit to Nickel with and without the edge color parameter (plot is reflectivity in sRGB w.r.t. cosI, dots are ground truth from measurement data, line is the fitted model):
metalfit.py

F82 Fresnel Schlick Fresnel
With_F82.png Without_F82.png

And here's the obligatory table with real metals and their fitted parameters (for linear sRGB), based on measurements from Johnson and Christy:

Aluminium Silver Chromium Iron Titanium Nickel Copper Gold
Al.png Ag.png Cr.png Fe.png Ti.png Ni.png Cu.png Au.png
0.899 0.912 0.915 0.989 0.983 0.978 0.547 0.554 0.552 0.528 0.512 0.493 0.617 0.577 0.540 0.695 0.637 0.560 0.953 0.621 0.524 1.000 0.742 0.373
0.825 0.877 0.898 0.991 0.993 0.999 0.659 0.668 0.762 0.693 0.695 0.746 0.695 0.726 0.770 0.759 0.785 0.838 0.982 0.937 0.937 1.000 1.000 0.987
Fun fact: Gold at non-grazing angles is actually too saturated to be represented properly in sRGB!
I've just pushed an update that replaces the generalized Schlick Fresnel with the Adobe F82 model. I'm really happy with the results - I've built a script to fit base and edge color values to real-world data from https://refractiveindex.info/ (in the hope that people will stop picking three random wavelengths from the graphs there and using them as RGB values) and the F82 model manages to reproduce some metals much better than the basic Schlick model. Trying to fit the generalized model for comparison didn't really work since it kept putting the edge color to 1 in order to reproduce the grazing incidence response, and when restricing the fit range to 0-80° it also gave weird solutions. Here's the script and a comparison between the best fit to Nickel with and without the edge color parameter (plot is reflectivity in sRGB w.r.t. cosI, dots are ground truth from measurement data, line is the fitted model): [metalfit.py](https://archive.blender.org/developer/F13311745/metalfit.py) | F82 Fresnel | Schlick Fresnel | | -- | -- | | ![With_F82.png](https://archive.blender.org/developer/F13311746/With_F82.png) | ![Without_F82.png](https://archive.blender.org/developer/F13311748/Without_F82.png) | And here's the obligatory table with real metals and their fitted parameters (for linear sRGB), based on measurements from Johnson and Christy: | Aluminium | Silver | Chromium | Iron | Titanium | Nickel | Copper | Gold | | -- | -- | -- | -- | -- | -- | -- | -- | | ![Al.png](https://archive.blender.org/developer/F13311758/Al.png) | ![Ag.png](https://archive.blender.org/developer/F13311760/Ag.png) | ![Cr.png](https://archive.blender.org/developer/F13311762/Cr.png) | ![Fe.png](https://archive.blender.org/developer/F13311764/Fe.png) | ![Ti.png](https://archive.blender.org/developer/F13311766/Ti.png) | ![Ni.png](https://archive.blender.org/developer/F13311768/Ni.png) | ![Cu.png](https://archive.blender.org/developer/F13311770/Cu.png) | ![Au.png](https://archive.blender.org/developer/F13311772/Au.png) | | 0.899 0.912 0.915 | 0.989 0.983 0.978 | 0.547 0.554 0.552 | 0.528 0.512 0.493 | 0.617 0.577 0.540 | 0.695 0.637 0.560 | 0.953 0.621 0.524 | 1.000 0.742 0.373 | | 0.825 0.877 0.898 | 0.991 0.993 0.999 | 0.659 0.668 0.762 | 0.693 0.695 0.746 | 0.695 0.726 0.770 | 0.759 0.785 0.838 | 0.982 0.937 0.937 | 1.000 1.000 0.987 | Fun fact: Gold at non-grazing angles is actually too saturated to be represented properly in sRGB!

Added subscriber: @moisessalvador

Added subscriber: @moisessalvador

What if I want my own subsurface setup with principled's specular setup? One aspect that is also true of Principled v1 is that the specular/metallic/roughness/fresnel layer is complex enough that it cannot be exactly replicated with separate nodes by an user, which is important in case users want to use their own transmission/diffuse component, as it's the case with custom multilayer subsurface approaches, but with the much better approach to specular that principled offers. It would be nice if that specular layer was its own node that takes the transmission nodetree bsdf as input so the user doesn't have to worry about the mixing math. Something like this:

image.png

The main difference being that this shader doesn't pick up Base Color for tinting the specular or metal, that's up to the user

What if I want my own subsurface setup with principled's specular setup? One aspect that is also true of Principled v1 is that the specular/metallic/roughness/fresnel layer is complex enough that it cannot be exactly replicated with separate nodes by an user, which is important in case users want to use their own transmission/diffuse component, as it's the case with custom multilayer subsurface approaches, but with the much better approach to specular that principled offers. It would be nice if that specular layer was its own node that takes the transmission nodetree bsdf as input so the user doesn't have to worry about the mixing math. Something like this: ![image.png](https://archive.blender.org/developer/F13312311/image.png) The main difference being that this shader doesn't pick up Base Color for tinting the specular or metal, that's up to the user

Added subscriber: @MirceaKitsune

Added subscriber: @MirceaKitsune

Added subscriber: @AlexeyAdamitsky

Added subscriber: @AlexeyAdamitsky

Removed subscriber: @moisessalvador

Removed subscriber: @moisessalvador
Member

@moisessalvador

Feedback should ideally go in the feeback thread. https://devtalk.blender.org/t/principled-v2-feedback-discussion-thread/24997/

However I just wanted to comment that Lukas appears to already be considering something like this.

Future ideas
...

  • Also support coatings and metallic as standalone BSDF nodes?
    • Coatings would have BSDF input for base layer and scale it based on coating albedo for energy conservation.

Source: https://wiki.blender.org/wiki/User:Lukasstockner97/Principled_v2

@moisessalvador Feedback should ideally go in the feeback thread. https://devtalk.blender.org/t/principled-v2-feedback-discussion-thread/24997/ However I just wanted to comment that Lukas appears to already be considering something like this. > **Future ideas** > ... > - Also support coatings and metallic as standalone BSDF nodes? > - Coatings would have BSDF input for base layer and scale it based on coating albedo for energy conservation. Source: https://wiki.blender.org/wiki/User:Lukasstockner97/Principled_v2
Member

Added subscriber: @moisessalvador

Added subscriber: @moisessalvador

Removed subscriber: @moisessalvador

Removed subscriber: @moisessalvador

In #99447#1394331, @LukasStockner wrote:
I guess that specular input controls the strength of the highlight? If yes, that's covered by the Fresnel topic above, there will be an input for this.

Yes sir, it is for easy control of the Highlight (BW Texture). Thanks for everything

> In #99447#1394331, @LukasStockner wrote: > I guess that specular input controls the strength of the highlight? If yes, that's covered by the Fresnel topic above, there will be an input for this. Yes sir, it is for easy control of the Highlight (BW Texture). Thanks for everything

Added subscriber: @ktdfly

Added subscriber: @ktdfly

Added subscriber: @GeorgiaPacific

Added subscriber: @GeorgiaPacific

Added subscriber: @Max-Knol

Added subscriber: @Max-Knol

Added subscriber: @strangerman

Added subscriber: @strangerman

Added subscriber: @baybaypras

Added subscriber: @baybaypras

Added subscriber: @Yuro

Added subscriber: @Yuro

Removed subscriber: @Yacine-Teach

Removed subscriber: @Yacine-Teach

Added subscriber: @htuncay-4

Added subscriber: @htuncay-4

Added subscriber: @LifeLight

Added subscriber: @LifeLight

Added subscriber: @johannes.wilde

Added subscriber: @johannes.wilde

Added subscriber: @Emi_Martinez

Added subscriber: @Emi_Martinez

Added subscriber: @Zeirus

Added subscriber: @Zeirus

Added subscriber: @JoniMercado

Added subscriber: @JoniMercado

Added subscriber: @costa

Added subscriber: @costa

Added subscriber: @baoyu

Added subscriber: @baoyu

I just want to make sure this clearcoat BUG will be fixed in V2?
https://developer.blender.org/T99087

I just want to make sure this clearcoat BUG will be fixed in V2? https://developer.blender.org/T99087

Added subscriber: @Lt-Knb

Added subscriber: @Lt-Knb
Contributor

Added subscriber: @RedMser

Added subscriber: @RedMser
Author
Member

New version of the branch is finally up, including a merge of the latest master changes.

I've also added initial support for thin film iridescence - only on dielectric specular and transmission yet, not on metals.
Implementation is based on https://belcour.github.io/blog/research/publication/2017/05/01/brdf-thin-film.html and should be compatible with glTF as far as the parameters go.

In #99447#1434549, @baoyu wrote:
I just want to make sure this clearcoat BUG will be fixed in V2?
https://developer.blender.org/T99087

That should be fixed regardless of v2 ;) I'll have a look.

New version of the branch is finally up, including a merge of the latest master changes. I've also added initial support for thin film iridescence - only on dielectric specular and transmission yet, not on metals. Implementation is based on https://belcour.github.io/blog/research/publication/2017/05/01/brdf-thin-film.html and should be compatible with glTF as far as the parameters go. > In #99447#1434549, @baoyu wrote: > I just want to make sure this clearcoat BUG will be fixed in V2? > https://developer.blender.org/T99087 That should be fixed regardless of v2 ;) I'll have a look.

In #99447#1438767, @LukasStockner wrote:
New version of the branch is finally up, including a merge of the latest master changes.

I've also added initial support for thin film iridescence - only on dielectric specular and transmission yet, not on metals.
Implementation is based on https://belcour.github.io/blog/research/publication/2017/05/01/brdf-thin-film.html and should be compatible with glTF as far as the parameters go.

In #99447#1434549, @baoyu wrote:
I just want to make sure this clearcoat BUG will be fixed in V2?
https://developer.blender.org/T99087

That should be fixed regardless of v2 ;) I'll have a look.

So excited watching your presentation at BCON22! Glad that the clearcoat BUG will be fixed!

> In #99447#1438767, @LukasStockner wrote: > New version of the branch is finally up, including a merge of the latest master changes. > > I've also added initial support for thin film iridescence - only on dielectric specular and transmission yet, not on metals. > Implementation is based on https://belcour.github.io/blog/research/publication/2017/05/01/brdf-thin-film.html and should be compatible with glTF as far as the parameters go. > >> In #99447#1434549, @baoyu wrote: >> I just want to make sure this clearcoat BUG will be fixed in V2? >> https://developer.blender.org/T99087 > That should be fixed regardless of v2 ;) I'll have a look. So excited watching your presentation at BCON22! Glad that the clearcoat BUG will be fixed!

Added subscriber: @ArmandoTello

Added subscriber: @ArmandoTello

Added subscriber: @liudeyuan

Added subscriber: @liudeyuan

Added subscriber: @Sparazza

Added subscriber: @Sparazza

Added subscriber: @Austin-Berenyi

Added subscriber: @Austin-Berenyi

Added subscriber: @ReinhardK

Added subscriber: @ReinhardK

Added subscriber: @Beinaido

Added subscriber: @Beinaido

Added subscriber: @ROBYER1

Added subscriber: @ROBYER1

Just chiming in here that preview of KHR_materials_specular within Eevee when authoring shaders has been impossible due to the Principled v1 shader setup only really supporting Metallic/Roughness models rather than Specular Glossy workflows where we are required to use the gltf Material Output node. Are there any plans for Principled BSDF v2 to allow for editing and visualisation of these GLTF PBR material properties within Blender? Having the ability to view GLTF materials the way they view in any GLTF viewer/importer would make Blender the one-stop-shop for editing/importing/exporting GLTF PBR files with accurate materials which so far it has not been.

Just chiming in here that preview of KHR_materials_specular within Eevee when authoring shaders has been impossible due to the Principled v1 shader setup only really supporting Metallic/Roughness models rather than Specular Glossy workflows where we are required to use the gltf Material Output node. Are there any plans for Principled BSDF v2 to allow for editing and visualisation of these GLTF PBR material properties within Blender? Having the ability to view GLTF materials the way they view in any GLTF viewer/importer would make Blender the one-stop-shop for editing/importing/exporting GLTF PBR files with accurate materials which so far it has not been.
Member

Hello Robert,

Specular Glossy workflows where we are required to use the gltf Material Output node

It seems you miss-understand the glTF Material Output node.
Specular Glossy (with glTF extension KHR_materials_pbrSpecularGlossiness) is now archived. This extension is not implemented at export, as glTF does recommand to not create new file with this extension.
The recommandation is now to use pbrMetallicRoughness. This model is mostly compatible with Principled v1.
Some extensions of the pbrMetallicRoughness (specular, sheen) are not compatible with Principled v1. Here comes the glTF Material Output node, used to plugged glTF that are not compatible with Principled v1.
At import, we try to convert as soon as possible (but with loss) these data to plug into Principled v1. Original data (without conversion) are also plugged into the glTF Material Output node.
At export, you can should either to export original data, or converted data (that are converted back, again with some loss)

With Principled v2, the node will be compatible with specular & sheen glTF. That means that the glTF Material Output node will no more be needed for these extension. (but still for AO, IIRC)

Hello Robert, > Specular Glossy workflows where we are required to use the gltf Material Output node It seems you miss-understand the glTF Material Output node. Specular Glossy (with glTF extension KHR_materials_pbrSpecularGlossiness) is now archived. This extension is not implemented at export, as glTF does recommand to not create new file with this extension. The recommandation is now to use pbrMetallicRoughness. This model is mostly compatible with Principled v1. Some extensions of the pbrMetallicRoughness (specular, sheen) are not compatible with Principled v1. Here comes the glTF Material Output node, used to plugged glTF that are not compatible with Principled v1. At import, we try to convert as soon as possible (but with loss) these data to plug into Principled v1. Original data (without conversion) are also plugged into the glTF Material Output node. At export, you can should either to export original data, or converted data (that are converted back, again with some loss) With Principled v2, the node will be compatible with specular & sheen glTF. That means that the glTF Material Output node will no more be needed for these extension. (but still for AO, IIRC)

To phrase that another way — Principled BSDF v2 will be compatible with KHR_materials_specular (control of specular reflection, within a metal/rough workflow in glTF), but not compatible with KHR_materials_pbrSpecularGlossiness (outdated spec/gloss workflow in glTF).

Lossless conversions from spec/gloss to metal/rough glTF materials are possible, too, if that's something anyone needs.

To phrase that another way — Principled BSDF v2 will be compatible with `KHR_materials_specular` (control of specular reflection, within a metal/rough workflow in glTF), but not compatible with `KHR_materials_pbrSpecularGlossiness` (outdated spec/gloss workflow in glTF). Lossless conversions from spec/gloss to metal/rough glTF materials are possible, too, if that's something anyone needs.

Thanks for the clarification, the main issue has been using Blender's Eevee Renderer viewport to edit and preview specular reflection of materials such as a shiny plastic as it wouldn't render those khr specular extensions with Principled BSDF v1 in the viewport. We could only see the export gltf material node properties working in external GLTF viewers like WebGl ones. Obviously for a workflow for metal surfaces this was fine but my work's 3D team are moving to using Blender primarily for GLTF model authoring where we are hitting these issues when we just want to edit the specular reflection glossiness of materials that are not requiring metallic properties.

Apologies if I sounded misinformed about the extensions, I'm purely focusing on KHR_materials_specular which is what is needed for more accurate reflective plastic materials in some scenarios (with no metal properties) as my 3D team pointed out to me.

Thanks for the clarification, the main issue has been using Blender's Eevee Renderer viewport to edit and preview specular reflection of materials such as a shiny plastic as it wouldn't render those khr specular extensions with Principled BSDF v1 in the viewport. We could only see the export gltf material node properties working in external GLTF viewers like WebGl ones. Obviously for a workflow for metal surfaces this was fine but my work's 3D team are moving to using Blender primarily for GLTF model authoring where we are hitting these issues when we just want to edit the specular reflection glossiness of materials that are not requiring metallic properties. Apologies if I sounded misinformed about the extensions, I'm purely focusing on KHR_materials_specular which is what is needed for more accurate reflective plastic materials in some scenarios (with no metal properties) as my 3D team pointed out to me.
Brecht Van Lommel added this to the Render & Cycles project 2023-02-07 19:08:06 +01:00
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 14:04:15 +01:00
Member

Hello Lukas @LukasStockner ,

Do you have any plan to have it finished for 4.0 release, later this year?
This will be a breaking release, so the ideal release for having this merged into main.

Hello Lukas @LukasStockner , Do you have any plan to have it finished for 4.0 release, later this year? This will be a breaking release, so the ideal release for having this merged into main.
Member

@LukasStockner Can we use this oportunity to add an Ambient Occlussion input into the shader?

I know it's not "neccesary" if you use GI but:

1 - If the render settings are set to AO disabled (Eevee) or direct rendering (Cycles) then an AO input becomes very useful since it might be bringing prebaked AO or dynamically sampled AO from the Cycles Ambient Occlusion node.

2 - For completeness and compatibility with game export and baking (it is a feature in GLTF).

A practical example of an export setup to GLTF in current versions:

This setup exports correctly but the effect of the AO map is invisible in Blender's rendering.

image

In order to see the effect in Blender we have to multiply it to the Base Color input

image

Now we can see the effect of the AO in Blender but we have effectively BROKEN the GLTF export. We have to switch it back in order to export :/

@LukasStockner Can we use this oportunity to add an Ambient Occlussion input into the shader? I know it's not "neccesary" if you use GI but: 1 - If the render settings are set to AO disabled (Eevee) or direct rendering (Cycles) then an AO input becomes very useful since it might be bringing prebaked AO or dynamically sampled AO from the Cycles Ambient Occlusion node. 2 - For completeness and compatibility with game export and baking (it is a feature in GLTF). A practical example of an export setup to GLTF in current versions: This setup exports correctly but the effect of the AO map is invisible in Blender's rendering. ![image](/attachments/3ed85c61-405c-4026-9a8f-b361b831d028) In order to see the effect in Blender we have to multiply it to the Base Color input ![image](/attachments/0bae52ba-74b8-4537-a729-a9040240fb94) Now we can see the effect of the AO in Blender but we have effectively BROKEN the GLTF export. We have to switch it back in order to export :/

Hi! Are there some updates or news to the principled v2? The branch can also not be downloaded anymore from blender experimental anymore :/

Greetings!

Hi! Are there some updates or news to the principled v2? The branch can also not be downloaded anymore from blender experimental anymore :/ Greetings!
Member

@LukasStockner I checked the Thin-Film Iridescence implemented in Principled v2 and found some differences to what is shown in the supplemental material of the original paper from Laurent Belcour and Pascal Barla: Supplemental Material

I also prepared a comparison rendering for the dielectric base material case, which can be found in the document on pages 6-7. You can find it in the attached documents. Additionally, I also did the same for the glTF Iridescence extension implementation in Three.js, which looks way closer to the reference (with a small adjustment of the IOR in the last column as the approximation fails for those large values, forcing me to use a smaller value).

@LukasStockner I checked the Thin-Film Iridescence implemented in Principled v2 and found some differences to what is shown in the supplemental material of the original paper from Laurent Belcour and Pascal Barla: [Supplemental Material](https://hal.science/hal-01518344v2/file/supp-mat-small%20(1).pdf) I also prepared a comparison rendering for the dielectric base material case, which can be found in the document on pages 6-7. You can find it in the attached documents. Additionally, I also did the same for the glTF Iridescence extension implementation in Three.js, which looks way closer to the reference (with a small adjustment of the IOR in the last column as the approximation fails for those large values, forcing me to use a smaller value).
Member

@LukasStockner Any news on the timeline about it?
This change will impact glTF importer/exporter, and I need to plan it, depending on when this will land in main.

@LukasStockner Any news on the timeline about it? This change will impact glTF importer/exporter, and I need to plan it, depending on when this will land in main.
Member

Hello @LukasStockner

(Also tagging @ThomasDinges as coordinator)

Seems the current status is behind the initial planning for 4.0
I'd like to have a updated status of each item: what will be in 4.0, what is postpone to 4.1 or later ?

Any changes here can have some (simple or heavy) impact on glTF I/O, and any news helping me to build a planning for it

Thanks :)

Hello @LukasStockner (Also tagging @ThomasDinges as coordinator) Seems the current status is behind the initial planning for 4.0 I'd like to have a updated status of each item: what will be in 4.0, what is postpone to 4.1 or later ? Any changes here can have some (simple or heavy) impact on glTF I/O, and any news helping me to build a planning for it Thanks :)
Author
Member

Hello @LukasStockner

(Also tagging @ThomasDinges as coordinator)

Seems the current status is behind the initial planning for 4.0
I'd like to have a updated status of each item: what will be in 4.0, what is postpone to 4.1 or later ?

Any changes here can have some (simple or heavy) impact on glTF I/O, and any news helping me to build a planning for it

Thanks :)

Yeah, the remaining items for BCon1 got delayed a bit, but the three big remaining pieces (subsurface, coat, emission) are merged now. The only missing part out of the breaking changes now is the Specular Tint handling, and that shouldn't take much longer. Sorry for the bad communication here.

@LukasStockner I checked the Thin-Film Iridescence implemented in Principled v2 and found some differences to what is shown in the supplemental material of the original paper from Laurent Belcour and Pascal Barla: Supplemental Material

I also prepared a comparison rendering for the dielectric base material case, which can be found in the document on pages 6-7. You can find it in the attached documents. Additionally, I also did the same for the glTF Iridescence extension implementation in Three.js, which looks way closer to the reference (with a small adjustment of the IOR in the last column as the approximation fails for those large values, forcing me to use a smaller value).

Thanks for the (impressively thorough) info! I'll make sure to compare the results of the new revision.

Hi! Are there some updates or news to the principled v2? The branch can also not be downloaded anymore from blender experimental anymore :/

Greetings!

This is probably way too late, sorry - but just for completeness: The approach shifted away from doing everything in one branch to working in smaller chunks and merging directly to main. So, for the latest version, just grab a regular nightly build :)

> Hello @LukasStockner > > (Also tagging @ThomasDinges as coordinator) > > Seems the current status is behind the initial planning for 4.0 > I'd like to have a updated status of each item: what will be in 4.0, what is postpone to 4.1 or later ? > > Any changes here can have some (simple or heavy) impact on glTF I/O, and any news helping me to build a planning for it > > Thanks :) Yeah, the remaining items for BCon1 got delayed a bit, but the three big remaining pieces (subsurface, coat, emission) are merged now. The only missing part out of the breaking changes now is the Specular Tint handling, and that shouldn't take much longer. Sorry for the bad communication here. > @LukasStockner I checked the Thin-Film Iridescence implemented in Principled v2 and found some differences to what is shown in the supplemental material of the original paper from Laurent Belcour and Pascal Barla: [Supplemental Material](https://hal.science/hal-01518344v2/file/supp-mat-small%20(1).pdf) > > I also prepared a comparison rendering for the dielectric base material case, which can be found in the document on pages 6-7. You can find it in the attached documents. Additionally, I also did the same for the glTF Iridescence extension implementation in Three.js, which looks way closer to the reference (with a small adjustment of the IOR in the last column as the approximation fails for those large values, forcing me to use a smaller value). Thanks for the (impressively thorough) info! I'll make sure to compare the results of the new revision. > Hi! Are there some updates or news to the principled v2? The branch can also not be downloaded anymore from blender experimental anymore :/ > > Greetings! This is probably way too late, sorry - but just for completeness: The approach shifted away from doing everything in one branch to working in smaller chunks and merging directly to main. So, for the latest version, just grab a regular nightly build :)

I have deleted the principled-v2 branch now that this functionality is in main. If there is anything still useful in that branch, it still exists in the archive/blender-archive repository.

I have deleted the principled-v2 branch now that this functionality is in main. If there is anything still useful in that branch, it still exists in the `archive/blender-archive` repository.
Member

Further

  • Oren-Nayar diffuse

On the code side, this seems like a really simple change since Cycles already has a Oren-Nayar diffuse closure. Is there some other reason this has been delayed?

> ### Further > * [ ] Oren-Nayar diffuse On the code side, this seems like a [really simple change](https://projects.blender.org/Alaska/blender/commit/0c81cbedac6692af574026b24f96892b3c322b97) since Cycles already has a Oren-Nayar diffuse closure. Is there some other reason this has been delayed?

Further

  • Oren-Nayar diffuse

On the code side, this seems like a really simple change since Cycles already has a Oren-Nayar diffuse closure. Is there some other reason this has been delayed?

Glad to see Oren-Nayar appear here. An addition to the Principled BSDF would add a lot.
Just one quick sidenote. As a non-coder by looking at the code / patch you posted: This only means that Oren-Nayar diffuse is used if specular roughness is bigger than 0.0, right? This does not add a separate diffuse roughness, right?

> > ### Further > > * [ ] Oren-Nayar diffuse > > > On the code side, this seems like a [really simple change](https://projects.blender.org/Alaska/blender/commit/0c81cbedac6692af574026b24f96892b3c322b97) since Cycles already has a Oren-Nayar diffuse closure. Is there some other reason this has been delayed? Glad to see Oren-Nayar appear here. An addition to the Principled BSDF would add a lot. Just one quick sidenote. As a non-coder by looking at the code / patch you posted: This only means that Oren-Nayar diffuse is used if **specular** roughness is bigger than 0.0, right? This does not add a separate diffuse roughness, right?
Member

looking at the code / patch you posted: This only means that Oren-Nayar diffuse is used if specular roughness is bigger than 0.0, right? This does not add a separate diffuse roughness, right?

In the code change I made, I am re-using roughness (which is used for Subsurface Scattering Entry Roughness, Specular Roughness, Metallic roughness, and Transmissive Roughness) to drive Oren-Nayer roughness. This was just an example and may not represent what will happen if this change gets implemented into Cycles.

Along with that, Oren-Nayer is only used if the roughness is > 0.0. This is because I based my code change on the code from the Diffuse BSDF node. I believe it's setup this way in the Diffuse BSDF because Oren-Nayer at roughness 0 renders the same as the normal Diffuse closure, however the normal diffuse closure renders faster, so why not switch to the faster closure when we can?

> looking at the code / patch you posted: This only means that Oren-Nayar diffuse is used if **specular** roughness is bigger than 0.0, right? This does not add a separate diffuse roughness, right? In the code change I made, I am re-using roughness (which is used for Subsurface Scattering Entry Roughness, Specular Roughness, Metallic roughness, and Transmissive Roughness) to drive Oren-Nayer roughness. This was just an example and may not represent what will happen if this change gets implemented into Cycles. Along with that, Oren-Nayer is only used if the roughness is > 0.0. This is because I based my code change on the code from the Diffuse BSDF node. I believe it's setup this way in the Diffuse BSDF because Oren-Nayer at roughness 0 renders the same as the normal Diffuse closure, however the normal diffuse closure renders faster, so why not switch to the faster closure when we can?

OK, thanks for clearing this up. Confirms everything I expected. :)

OK, thanks for clearing this up. Confirms everything I expected. :)

After doing a quick check, most popular renderers seem implement Oren-Nayer as a separate Diffuse Roughness slider.

After doing a quick check, most popular renderers seem implement Oren-Nayer as a separate `Diffuse Roughness` slider.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
63 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#99447
No description provided.