From 3365ea3ee0f8bd7608db7826e6ff09ae976d0617 Mon Sep 17 00:00:00 2001 From: Mike Bond Date: Thu, 28 Aug 2025 13:44:00 -0700 Subject: [PATCH 1/4] Add EXT_materials_anisotropy_openpbr --- .../README.md | 72 +++++++++++++++++++ ...T_materials_anisotropy_openpbr.schema.json | 22 ++++++ 2 files changed, 94 insertions(+) create mode 100644 extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md create mode 100644 extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/schema/material.EXT_materials_anisotropy_openpbr.schema.json diff --git a/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md new file mode 100644 index 0000000000..f591e28869 --- /dev/null +++ b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md @@ -0,0 +1,72 @@ +# EXT\_materials\_anisotropy\_openpbr + +## Contributors + +* Gary Hsu, Microsoft [@bghgary](https://twitter.com/bghgary) +* Mike Bond, Adobe, [@miibond](https://github.com/MiiBond) + +## Status + +Draft + +## Dependencies + +Written against the glTF 2.0 spec. +* Requires the `KHR_materials_anisotropy` extension to also be defined on the material + +## Exclusions + +* 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`. + +## Overview + +This extension defines a way to interpret the `anisotropyStrength` parameter from `KHR_materials_anisotropy` using OpenPBR conventions instead of the default glTF interpretation. This allows materials to achieve consistent appearance when authoring content for OpenPBR-compliant renderers while maintaining compatibility with existing glTF workflows. + +## Extending Materials + +OpenPBR anisotropy interpretation can be enabled by adding the `EXT_materials_anisotropy_openpbr` extension as a sub-extension of `KHR_materials_anisotropy` on a glTF material. For example: + +```json +{ + "materials": [ + { + "name": "brushed_metal", + "extensions": { + "KHR_materials_anisotropy": { + "anisotropyStrength": 0.6, + "anisotropyRotation": 0.0, + "extensions": { + "EXT_materials_anisotropy_openpbr": { + "openPbrAnisotropyEnabled": true + } + } + } + } + } + ] +} +``` + +| | Type | Description | Required | +|----------------------------------|---------------------------------------------------------------------------------|----------------------------------------|----------------------| +|**openPbrAnisotropyEnabled** | `boolean` | Enables OpenPBR interpretation of anisotropy strength. | No, default: `false` | + +When `openPbrAnisotropyEnabled` is `false` or not present, the standard glTF anisotropy calculations should be used as defined in `KHR_materials_anisotropy`. + +When `openPbrAnisotropyEnabled` is `true`, implementations should interpret the anisotropic strength using the OpenPBR conventions described below. + +## Anisotropic Strength Behaviour + +In both glTF and OpenPBR, the strength of the anisotropic effect in the tangent and bitangent direction is calculated using the material's specular roughness as well as the anisotropic strength parameter from the `KHR_materials_anisotropy` extension. It is these calculations that differ between glTF and OpenPBR. The rotation and texture packing remains the same. + +In glTF: +$alphaTangent = mix( alphaRoughness, 1.0, anisotropyStrength^2 )$
+$alphaBiTangent = alphaRoughness$ + +In OpenPBR: +$alphaTangent = alphaRoughness \sqrt{2 / (1+ (1-anisotropyStrength)^2)}$
+$alphaBiTangent = alphaTangent(1 - anisotropyStrength)$ + + +When `openPbrAnisotropyEnabled` is `true`, the anisotropic strength from `KHR_materials_anisotropy` is applied according to the OpenPBR conventions to obtain the tangent and bitangent roughness values. diff --git a/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/schema/material.EXT_materials_anisotropy_openpbr.schema.json b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/schema/material.EXT_materials_anisotropy_openpbr.schema.json new file mode 100644 index 0000000000..d63f82e4ab --- /dev/null +++ b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/schema/material.EXT_materials_anisotropy_openpbr.schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "material.EXT_materials_anisotropy_openpbr.schema.json", + "title": "EXT_materials_anisotropy_openpbr glTF Material Extension", + "type": "object", + "description": "OpenPBR anisotropy interpretation extension.", + "allOf": [ + { + "$ref": "glTFProperty.schema.json" + } + ], + "properties": { + "openPbrAnisotropyEnabled": { + "type": "boolean", + "description": "Enables OpenPBR interpretation of anisotropy parameters.", + "default": false + }, + "extensions": {}, + "extras": {} + }, + "additionalProperties": false +} \ No newline at end of file From 9a20e74755fa94f3ef595a834228f83d6491855f Mon Sep 17 00:00:00 2001 From: MiiBond Date: Thu, 25 Sep 2025 08:42:06 -0700 Subject: [PATCH 2/4] Update extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md Co-authored-by: Gary Hsu --- .../2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md index f591e28869..17683a15b0 100644 --- a/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md +++ b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md @@ -60,12 +60,12 @@ When `openPbrAnisotropyEnabled` is `true`, implementations should interpret the In both glTF and OpenPBR, the strength of the anisotropic effect in the tangent and bitangent direction is calculated using the material's specular roughness as well as the anisotropic strength parameter from the `KHR_materials_anisotropy` extension. It is these calculations that differ between glTF and OpenPBR. The rotation and texture packing remains the same. -In glTF: -$alphaTangent = mix( alphaRoughness, 1.0, anisotropyStrength^2 )$
+In glTF: \ +$alphaTangent = mix( alphaRoughness, 1.0, anisotropyStrength^2 )$ \ $alphaBiTangent = alphaRoughness$ -In OpenPBR: -$alphaTangent = alphaRoughness \sqrt{2 / (1+ (1-anisotropyStrength)^2)}$
+In OpenPBR: \ +$alphaTangent = alphaRoughness \sqrt{2 / (1+ (1-anisotropyStrength)^2)}$ \ $alphaBiTangent = alphaTangent(1 - anisotropyStrength)$ From 9e85f6788b8cb9bfccd8c1cf8ffd38c657be6d1f Mon Sep 17 00:00:00 2001 From: MiiBond Date: Thu, 25 Sep 2025 08:42:37 -0700 Subject: [PATCH 3/4] Update extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md Co-authored-by: Gary Hsu --- .../2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md index 17683a15b0..782fec61da 100644 --- a/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md +++ b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md @@ -56,7 +56,7 @@ When `openPbrAnisotropyEnabled` is `false` or not present, the standard glTF ani When `openPbrAnisotropyEnabled` is `true`, implementations should interpret the anisotropic strength using the OpenPBR conventions described below. -## Anisotropic Strength Behaviour +## Anisotropic Strength Behavior In both glTF and OpenPBR, the strength of the anisotropic effect in the tangent and bitangent direction is calculated using the material's specular roughness as well as the anisotropic strength parameter from the `KHR_materials_anisotropy` extension. It is these calculations that differ between glTF and OpenPBR. The rotation and texture packing remains the same. From aaf2905d9388c24993a55ee0975f660d8199376d Mon Sep 17 00:00:00 2001 From: MiiBond Date: Thu, 25 Sep 2025 08:42:45 -0700 Subject: [PATCH 4/4] Update extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md Co-authored-by: Gary Hsu --- .../2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md index 782fec61da..44bb262eb8 100644 --- a/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md +++ b/extensions/2.0/Vendor/EXT_materials_anisotropy_openpbr/README.md @@ -38,7 +38,7 @@ OpenPBR anisotropy interpretation can be enabled by adding the `EXT_materials_an "anisotropyRotation": 0.0, "extensions": { "EXT_materials_anisotropy_openpbr": { - "openPbrAnisotropyEnabled": true + "anisotropyUseOpenPbr": true } } }