-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KHR_materials_diffuse_transmission #1825
KHR_materials_diffuse_transmission #1825
Conversation
/ping @abwood New diagram added, looks nice! |
BTW, This extension is not yet listed in the list of glTF extensions. |
- Move info in interaction with other extensions to translucency - Add images - Add more detailed explanation
…one.3ds.com:7999/~o3v/gltf into KHR_materials_translucency
e5e96b4
to
6d8e1f2
Compare
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
Created (path-tracing) live demos for the example scenarios. |
...HR_materials_diffuse_transmission/schema/glTF.KHR_materials_diffuse_transmission.schema.json
Outdated
Show resolved
Hide resolved
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should open up a new PR with my proposed changes in order to get progress on this extension?
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
There are a couple of design issues with this extension, let me explain: 1: This extension models the scattering behavior of dense, non fully opaque, materials such as leaves or wax. 2: This extension is more or less based on an adaptation of the Beer/Lambert law. These two phenomena shall not be mixed into the same extensions - I know that it is super easy to get a shader to execute the code - it's just not a good parameterization of needed data. Luckily there is a simple solution: Make this extension into 'scattering transmission'
Now we have a self contained simplified extension, with less number of parameters, where the parameters are connected to what they actually control. Surely we must strive to have self contained, well parameterized extensions - we must not keep using the rationale 'we did it like this in extension XYZ' |
No, that's not a complete understanding. This extension only models what happens at the outermost surface of a material, such as the outermost surface of a block of wax, or on a thin-wall material such as a leaf. It allows light to enter and exit a volume such as wax, but it cannot say anything about what happens to light whilst travelling inside the volume. The presence of the volume and the properties within are governed by a different extension.
That's not quite correct. KHR_materials_transmission is a surface property, allowing light to enter and exit at the surface of a volume of material such as glass or water, possibly with a tint on the way in and out. The KHR_materials_volume extension intentionally doesn't explain how light got into or exits from the volume, it just explains the thickness of the volume and how light is attenuated along the way. The two are compatible, but KHR_materials_volume was always intended to be compatible with additional methods of entry and exit. For some graphical depictions of what I've said here, take a look at the slides of my 2022 webinar on glTF PBR here: Slide 14 covers this extension, and several slides before that explain the volumetric extension. Slide 16 has the chart that puts together compatibility and interactions between our various PBR extensions. I'd really encourage folks to read and deeply understand how this is intended to work before posting lengthy comments requesting foundational changes.
No, that's incorrect. This draft does not mention Beer's law, as this draft is only for the outermost surface of a material. Beer's law is covered by KHR_materials_volume with attenuation color and attenuation distance. See slide 16 of the above for an overview of how this all fits together. The overall design here wasn't just invented by me, of course. Bastien and Tobias authored many of these drafts based closely on Dassault Systemes Enterprise PBR, which is a published standard with active users. They got feedback in PBR TSG from Adobe, Autodesk, Microsoft / BabylonJS, Google / Filament / ThreeJS, and other PBR experts along the way. A lot of care and respect was given to fundamental PBR concepts such as energy conservation during those many discussions. Please take time to understand what's here, as a lot of thought and care went into it, and similar properties are already in use by other published standards. |
- Add more detailed parameter descriptions based on PR feedback + renderings - Add dragon and candle renderings as example for diffuse transmission + volume - Remove example section
Should this extension be targetable by animation pointer? |
@UX3D-haertl I'll update the object model after this is merged. |
Confusion likely comes from specifying (physically plausible) behavior using (only) surface properties and the concept of 'thin walled' or infinetly thin materials, which I generally regard as unwise. For this extension I think we must focus on usecases, leaf and wax candle, and figure out what we need to model this behavior. I strongly believe in simplification - less is more - use of two extensions instead of one will increase complexity. From what I can tell our usecases can be fulfilled by adding two optional parameters: What, if any, is the benefit of splitting and declaring surface properties and interior/scattering behavior into separate extensions? |
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
extensions/2.0/Khronos/KHR_materials_diffuse_transmission/README.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Khronos PBR TSG voted today (2024-11-18) to move this extension to "Release Candidate" status. This means the parameters of the extension will not change prior to ratification unless major problems are found. All glTF implementers are encouraged to test this extension in their respective implementations and provide feedback on any roadblocks encountered.
|
||
### diffuseTransmissionTexture | ||
|
||
The `A` channel of this texture defines proportion of light that is diffusely transmitted through a surface, rather than being diffusely re-emitted. This is expressed as a percentage of the light that penetrates the surface (i.e., not specularly reflected), rather than a percentage of the total light incident on the surface. A value of 1.0 indicates that 100% of the light that penetrates the surface is transmitted through it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The A
channel of this texture defines the proportion of light...
|
||
## Combining Diffuse Transmission with other Extensions | ||
### KHR_materials_transmission | ||
Both `KHR_materials_diffuse_transmission` and `KHR_materials_transmission` replace the diffuse BRDF with a mix of diffuse BRDF and a BTDF that transmits light onto the opposite side of the surface. In case of `KHR_materials_transmission`, this is a microfacet BTDF that shares its roughness with the microfacet BRDF. In case of `KHR_materials_diffuse_transmission`, on the other hand, this is a diffuse BTDF. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"In case of" should be "In the case of"
|
||
## Overview | ||
|
||
This extension models the physical phenomenon of light being diffusely transmitted through an infinitely thin material. Thin dielectric objects like leaves or paper diffusely transmit light due to dense volumetric scattering within the object. In 3D graphics, it is common to approximate thin volumetric objects as non-volumetric surfaces. The KHR_materials_diffuse_transmission extension models the diffuse transmission of light through such infinitely thin surfaces. For optically thick media (volumes) with short scattering distances and dense scattering behavior, i.e. candles, KHR_materials_diffuse_transmission provides a phenomenologically plausible and cost-effective approximation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the caption for the leaves and candle, we use the term "translucent" rather than diffuse transmission. Could this be confusing to readers? Perhaps, we could change "translucent surface" to "diffusely-transmitted surface" or something? I'm assuming that the term "translucent" is a holdover from the previous name for this extension.
An extension for the metallic-roughness material that adds a translucency effect, i.e., a diffuse lobe on the back-side of the surface. This is useful
KHR_materials_volume
(KHR_materials_volume #1726) in case of SSS with short scattering distance