diff --git a/README.md b/README.md index 26a1f7aad6..fa6c8287ff 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,9 @@ SPDX-License-Identifier: CC-BY-4.0
-[![Join the Slack group](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://www.khr.io/slack) +[![Join glTF Discord](https://img.shields.io/badge/discuss-on%20discord-blue.svg)](https://khr.io/khrdiscord) [![Join the forums](https://img.shields.io/badge/discuss-in%20forums-blue.svg)](https://community.khronos.org/c/gltf-general) +[![Join the Slack group](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://www.khr.io/slack) glTF™ (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. glTF minimizes both the size of 3D assets, and the runtime processing needed to unpack and use those assets. glTF defines an extensible, common publishing format for 3D content tools and services that streamlines authoring workflows and enables interoperable use of content across the industry. diff --git a/extensions/2.0/Khronos/KHR_materials_anisotropy/README.md b/extensions/2.0/Khronos/KHR_materials_anisotropy/README.md index 3075483a23..80ae5e996e 100644 --- a/extensions/2.0/Khronos/KHR_materials_anisotropy/README.md +++ b/extensions/2.0/Khronos/KHR_materials_anisotropy/README.md @@ -64,18 +64,24 @@ Sample values: | | Type | Description | Required | | ----------------------- | -------- | ------------------------- | ------------------ | -| **anisotropyStrength** | `number` | The anisotropy strength. When anisotropyTexture is present, this value is multiplied by the blue channel. | No, default: `0.0` | -| **anisotropyRotation** | `number` | The rotation of the anisotropy in tangent, bitangent space, measured in radians counter-clockwise from the tangent. When anisotropyTexture is present, anisotropyRotation provides additional rotation to the vectors in the texture. | No, default: `0.0` | -| **anisotropyTexture** | [`textureInfo`](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-textureinfo) | The anisotropy texture. Red and green channels represent the anisotropy direction in [-1, 1] tangent, bitangent space, to be rotated by anisotropyRotation. The blue channel contains strength as [0, 1] to be multiplied by anisotropyStrength. | No | +| **anisotropyStrength** | `number` | The anisotropy strength. When the anisotropy texture is present, this value is multiplied by the texture's blue channel. | No, default: `0.0` | +| **anisotropyRotation** | `number` | The rotation of the anisotropy in tangent, bitangent space, measured in radians counter-clockwise from the tangent. When the anisotropy texture is present, this value provides additional rotation to the vectors in the texture. | No, default: `0.0` | +| **anisotropyTexture** | [`textureInfo`](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-textureinfo) | The anisotropy texture. Red and green channels represent the anisotropy direction in $[-1, 1]$ tangent, bitangent space to be rotated by the anisotropy rotation. The blue channel contains strength as $[0, 1]$ to be multiplied by the anisotropy strength. | No | ## Anisotropy Two new material properties are introduced: a strength parameter and the direction in which the specular reflection elongates relative to the surface tangents. -The strength parameter is a dimensionless number in the range `[0, 1]` and increases the roughness along a chosen direction. The default direction aligns with the tangent to the mesh as described in the glTF 2.0 specification, [Meshes section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes). +The strength parameter is a dimensionless number in the range $[0, 1]$ and increases the roughness along a chosen direction. The default direction aligns with the tangent to the mesh as described in the glTF 2.0 specification, [Meshes section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes). -All meshes with materials that use anisotropy **SHOULD** supply `TANGENT` vectors as a mesh attribute. If `TANGENT` vectors are not supplied for such a mesh, the mesh **MUST** supply a `normalTexture`, and tangents are computed according to rules in the [Meshes section](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes) of the glTF specification. Likewise when `TANGENT` vectors are not supplied for a mesh, the mesh **MUST NOT** supply different texture coordinates on the `normalTexture` and `anisotropyTexture`. +A mesh primitive using an anisotropy material **MUST** have a defined tangent space, i.e., it **MUST** have `NORMAL` and `TANGENT` attributes or its base material **MUST** have a normal texture. When the mesh primitive does not have `NORMAL` or `TANGENT` vectors, they are computed as defined in the glTF 2.0 specification. -The `anisotropyTexture`, when supplied, encodes XY components of the direction vector in tangent space as red and green values, and strength as blue values, all stored with linear transfer function. After dequantization, red and green texel values **MUST** be mapped as follows: red [0.0 .. 1.0] to X [-1 .. 1], green [0.0 .. 1.0] to Y [-1 .. 1]. Blue does not require remapping. When `anisotropyTexture` is not supplied, the default value is red 1.0 (X 1.0), green 0.5 (Y 0.0), and blue 1.0 (strength 1.0). The direction of this XY vector specifies the per-texel direction of increased anisotropy roughness in tangent, bitangent space, prior to being rotated by `anisotropyRotation`. The blue channel contains strength as [0.0 .. 1.0] to be multiplied by `anisotropyStrength` to determine the per-texel anisotropy strength. +Since the glTF 2.0 specification does not mandate any particular tangent space derivation algorithm, mesh primitives using anisotropy materials **SHOULD** always provide their `NORMAL` and `TANGENT` vectors. + +When the material has both `normalTexture` and `anisotropyTexture` properties defined, these textures **SHOULD** use the same texture coordinates because they operate in the same tangent space and their texel values are usually correlated to each other. + +The anisotropy texture, when supplied, encodes XY components of the anisotropy direction vector in tangent space as red and green values, and the anisotropy strength as blue values, all stored with linear transfer function. After dequantization, red and green texel values **MUST** be mapped as follows: red $[0, 1]$ to X $[-1, 1]$, green $[0, 1]$ to Y $[-1, 1]$. Blue does not require remapping. When the anisotropy texture is not supplied, the default dequantized texel value is $(1.0; 0.5; 1.0)$, which corresponds to the $(1; 0)$ direction vector (+X axis) and full strength. + +The direction of this XY vector specifies the per-texel direction of increased anisotropy roughness in tangent, bitangent space, prior to being rotated by the `anisotropyRotation` property value. After dequantization, the blue channel contains strength as $[0, 1]$ to be multiplied by the `anisotropyStrength` property value to determine the per-texel anisotropy strength. > **Note:** The direction vector of the anisotropy is the direction in which highlights will be stretched. The direction of the micro-grooves in the material causing the anisotropy will run perpendicular. diff --git a/extensions/2.0/Khronos/KHR_materials_anisotropy/schema/material.KHR_materials_anisotropy.schema.json b/extensions/2.0/Khronos/KHR_materials_anisotropy/schema/material.KHR_materials_anisotropy.schema.json index ec52f78ee2..427e71dbda 100644 --- a/extensions/2.0/Khronos/KHR_materials_anisotropy/schema/material.KHR_materials_anisotropy.schema.json +++ b/extensions/2.0/Khronos/KHR_materials_anisotropy/schema/material.KHR_materials_anisotropy.schema.json @@ -11,18 +11,18 @@ "default": 0.0, "minimum": 0.0, "maximum": 1.0, - "gltf_detailedDescription": "The anisotropy strength. When anisotropyTexture is present, this value is multiplied by the blue channel." + "gltf_detailedDescription": "The anisotropy strength. When the anisotropy texture is present, this value is multiplied by the texture's blue channel." }, "anisotropyRotation": { "type": "number", "description": "The rotation of the anisotropy.", "default": 0.0, - "gltf_detailedDescription": "The rotation of the anisotropy in tangent, bitangent space, measured in radians counter-clockwise from the tangent. When anisotropyTexture is present, anisotropyRotation provides additional rotation to the vectors in the texture." + "gltf_detailedDescription": "The rotation of the anisotropy in tangent, bitangent space, measured in radians counter-clockwise from the tangent. When the anisotropy texture is present, this value provides additional rotation to the vectors in the texture." }, "anisotropyTexture": { "allOf": [ { "$ref": "textureInfo.schema.json" } ], "description": "The anisotropy texture.", - "gltf_detailedDescription": "The anisotropy texture. Red and green channels represent the anisotropy direction in [-1, 1] tangent, bitangent space, to be rotated by anisotropyRotation. The blue channel contains strength as [0, 1] to be multiplied by anisotropyStrength." + "gltf_detailedDescription": "The anisotropy texture. Red and green channels represent the anisotropy direction in $[-1, 1]$ tangent, bitangent space, to be rotated by the anisotropy rotation. The blue channel contains strength as $[0, 1]$ to be multiplied by the anisotropy strength." }, "extensions": { }, "extras": { } diff --git a/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md b/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md index db065e76ec..532bd6360e 100644 --- a/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md +++ b/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md @@ -77,6 +77,12 @@ clearcoatRoughness = clearcoatRoughnessFactor * clearcoatRoughnessTexture.g If `clearcoatNormalTexture` is not given, no normal mapping is applied to the clear coat layer, even if normal mapping is applied to the base material. Otherwise, `clearcoatNormalTexture` may be a reference to the same normal map used by the base material, or any other compatible normal map. +A mesh primitive using a clearcoat material with a clearcoat normal texture **MUST** have a defined tangent space, i.e., it **MUST** have `NORMAL` and `TANGENT` attributes or its base material **MUST** have a normal texture. When the mesh primitive does not have `NORMAL` or `TANGENT` vectors, they are computed as defined in the glTF 2.0 specification. + +Since the glTF 2.0 specification does not mandate any particular tangent space derivation algorithm, mesh primitives using clearcoat materials with clearcoat normal textures **SHOULD** always provide their `NORMAL` and `TANGENT` vectors. + +When the material has both `normalTexture` and `clearcoatNormalTexture` properties defined, these textures **SHOULD** use the same texture coordinates because they operate in the same tangent space and their texel values are usually correlated to each other. + The clearcoat effect is modeled via a microfacet BRDF. The BRDF is layered on top of the glTF 2.0 Metallic-Roughness material, including emission and all extensions, using a new `fresnel_coat` function: ``` diff --git a/extensions/2.0/Khronos/KHR_materials_ior/README.md b/extensions/2.0/Khronos/KHR_materials_ior/README.md index 2c8e9d0d70..a28011f14c 100644 --- a/extensions/2.0/Khronos/KHR_materials_ior/README.md +++ b/extensions/2.0/Khronos/KHR_materials_ior/README.md @@ -47,7 +47,7 @@ Written against the glTF 2.0 spec. ## Overview -The dielectric BRDF of the metallic-roughness material in glTF uses a fixed value of 1.5 for the index of refraction. This is a good fit for many plastics and glass, but not for other materials like water or asphalt, sapphire or diamond. This extensions allows users to set the index of refraction to a certain value. +The dielectric BRDF of the metallic-roughness material in glTF uses a fixed value of 1.5 for the index of refraction. This is a good fit for many plastics and glass, but not for other materials like water or asphalt, sapphire or diamond. This extension allows users to set the index of refraction to a certain value. ## Extending Materials diff --git a/extensions/2.0/Khronos/KHR_materials_volume/README.md b/extensions/2.0/Khronos/KHR_materials_volume/README.md index 168cf70d25..e31ebdb96a 100644 --- a/extensions/2.0/Khronos/KHR_materials_volume/README.md +++ b/extensions/2.0/Khronos/KHR_materials_volume/README.md @@ -157,11 +157,15 @@ T(*x*) = e-σt*x* where T is commonly referred to as *transmittance*. -Substituting σt in the previous equation by its definition via *attenuation color* and *attenuation distance*, as defined above, and setting *x* = *d* we get +Substituting σt in the previous equation by its definition via *attenuation color* and *attenuation distance*, as defined above, we get -T(da) = e(log(*c*) / *d*) * *d* = *c* +T(x) = e(log(*c*) / *d*) * *x* -So, after traveling distance *d* through the medium we get attenuation color *c*. +The above formula can be simplified as: + +T(x) = *c* *x* / *d* + +So, after traveling distance *x* through a medium with attenuation color *c* and attenuation distance *d*, we get we get transmittance T(x). ## Base Color and Absorption diff --git a/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md b/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md index 017272482c..22c33de18c 100644 --- a/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md +++ b/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md @@ -57,6 +57,8 @@ All attribute accessors in a given node **must** have the same `count`. > **Implementation Note:** When instancing is used on the node, the non-instanced version of the mesh should not be rendered. +Because the extension does not provide a way to specify a non-instanced fallback, files that use the extension **should** specify it in `extensionsRequired` array. + ## Transformation Order When using instancing, the instance transform matrix is constructed by multiplying translation (if present), rotation (if present), and scale in the same order as they are for nodes: diff --git a/extensions/Prefixes.md b/extensions/Prefixes.md index 084ef57d4e..6449498a1d 100644 --- a/extensions/Prefixes.md +++ b/extensions/Prefixes.md @@ -82,6 +82,7 @@ To request a prefix, submit a [GitHub issue](https://github.com/KhronosGroup/glT | `SNAP` | Snap, Inc. | https://snap.com/ | [#2125](https://github.com/KhronosGroup/glTF/issues/2125) | | `SPECTRUM` | Spectrum | https://spectrumcustomizer.com/ | [#1804](https://github.com/KhronosGroup/glTF/issues/1804) | | `TENCENT` | Tencent, Inc. | https://www.tencent.com/ | [#2118](https://github.com/KhronosGroup/glTF/issues/2118) | +| `TRACE` | Trace | https://www.trace3d.app/