- Ben Houston, Threekit @bhouston
- Bastian Sdorra, Dassault Systemes @bsdorra
- Tobias Haeussler @proog128
- Mike Bond, Adobe @miibond
- Alexey Knyazev, Individual Contributor, @lexaknyazev
- Eric Chadwick, DGG, @echadwick-artist
- Alex Wood, AGI @abwood
- Ed Mackey, AGI @emackey
Copyright 2024 The Khronos Group Inc. All Rights Reserved. glTF is a trademark of The Khronos Group Inc. See Appendix for full Khronos Copyright Statement.
Complete, Ratified by the Khronos Group
- Written against the glTF 2.0 spec.
- The
KHR_materials_volume
extension as this builds upon its volumetric effect.
- This extension must not be used on a material that also uses
KHR_materials_pbrSpecularGlossiness
. - This extension must not be used on a material that also uses
KHR_materials_unlit
.
This extension adds one parameter to the metallic-roughness material: dispersion
.
dispersion
enables configuring the strength of the angular separation of colors (chromatic aberration) transmitting through a relatively clear volume. It is an enhancement to the default KHR_materials_volume
transmission model which assumes no dispersion.
Optical dispersion is represented in terms of the Abbe number parameterization (
With the simplifying assumption that the index of refraction variance is linear,
the Abbe number (
where
To calculate the index of refraction at a specific wavelength (
Given an Abbe number ( KHR_materials_ior
extension (assumed to be at the central wavelength, (
And:
By substituting the symbolic wavelength constants
In this extension, we store a transformed dispersion instead of the Abbe number directly. Specifically we store
Note
This is the same transform used by both Adobe Standard Material and ASWF's OpenPBR.
The dispersion, defined in terms of Abbe number, is defined by adding the KHR_materials_dispersion
extension to any glTF material.
{
"materials": [
{
"extensions": {
"KHR_materials_dispersion": {
"dispersion": 0.1
}
}
}
]
}
Type | Description | Required | |
---|---|---|---|
dispersion | number |
The strength of the dispersion effect, specified as 20/Abbe number. | No, default: 0 |
The default value of 0 has a special meaning in that no dispersion should be used. This is the default value for backwards compatibility. Any value zero or larger is considered to be a valid dispersion value, although the range between [0 , 1] is the range of realistic values.
Here is a table of some material dispersion Abbe numbers, including the outlier of Rutile which is a very high dispersion material:
Material | Abbe Number (V) | Dispersion (20/V) |
---|---|---|
Rutile | 9.8 | 2.04 |
Polycarbonate | 32 | 0.625 |
Diamond | 55 | 0.36 |
Water | 55 | 0.36 |
Crown Glass | 59 | 0.33 |
This section is non-normative.
Dispersion can have a large influence on the look of objects such as gemstones. However, note that gemstones have many internal reflections, and dispersion alone is not enough to capture their look in a real-time rasterizer. Here is a path-traced example of a gemstone with dispersion (left) and without.
One real-time method for rendering dispersion effects is to trace volume transmission separately for each of color channel accounting for the per channel IOR as determined by the Abbe number. The resulting composite image will show color separation between the channels as a result.
For this method, use the material's IOR value (from KHR_materials_ior
, or the default 1.5
) for the green channel's IOR (
This extension defines dispersion
as
// Dispersion will spread out the ior values for each r,g,b channel
float halfSpread = (ior - 1.0) * 0.025 * dispersion;
vec3 iors = vec3(ior - halfSpread, ior, ior + halfSpread);
The red channel will always have the smallest IOR value. In extreme cases, a clamp may be required to prevent this value falling below 1.0
.
The following screenshot demonstrates the above technique as rendered in real-time by BabylonJS:
For comparison, here is the same sample model path-traced in Adobe Substance 3D Stager:
In general, higher IOR values result in more visible dispersion, up until the point where the IOR values become so high that the light encounters total internal reflection within a volume.
Abbe Number - Wolfram Formula Repository
Mikhail N. Polyanskiy. Refractive Index Database (2023)
SCHOTT. Interactive Abbe Diagram (2023)
Copyright 2024 The Khronos Group Inc.
Some parts of this Specification are purely informative and do not define requirements necessary for compliance and so are outside the Scope of this Specification. These parts of the Specification are marked as being non-normative, or identified as Implementation Notes.
Where this Specification includes normative references to external documents, only the specifically identified sections and functionality of those external documents are in Scope. Requirements defined by external documents not created by Khronos may contain contributions from non-members of Khronos not covered by the Khronos Intellectual Property Rights Policy.
This specification is protected by copyright laws and contains material proprietary to Khronos. Except as described by these terms, it or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast or otherwise exploited in any manner without the express prior written permission of Khronos.
This specification has been created under the Khronos Intellectual Property Rights Policy, which is Attachment A of the Khronos Group Membership Agreement available at www.khronos.org/files/member_agreement.pdf. Khronos grants a conditional copyright license to use and reproduce the unmodified specification for any purpose, without fee or royalty, EXCEPT no licenses to any patent, trademark or other intellectual property rights are granted under these terms. Parties desiring to implement the specification and make use of Khronos trademarks in relation to that implementation, and receive reciprocal patent license protection under the Khronos IP Policy must become Adopters and confirm the implementation as conformant under the process defined by Khronos for this specification; see https://www.khronos.org/adopters.
Khronos makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this specification, including, without limitation: merchantability, fitness for a particular purpose, non-infringement of any intellectual property, correctness, accuracy, completeness, timeliness, and reliability. Under no circumstances will Khronos, or any of its Promoters, Contributors or Members, or their respective partners, officers, directors, employees, agents or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials.
Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL, WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput, OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are trademarks of The Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC, OpenCL is a trademark of Apple Inc. and OpenGL and OpenML are registered trademarks and the OpenGL ES and OpenGL SC logos are trademarks of Silicon Graphics International used under license by Khronos. All other product names, trademarks, and/or company names are used solely for identification and belong to their respective owners.