Draft.
This is different from KHR_materials_anisotropy
draft
Written against the glTF 2.0 spec.
pbrMetallicRoughness
.KHR_materials_pbrSpecularGlossiness
.KHR_materials_unlit
.KHR_materials_volume
.This extension defines the anisotropic property of a material as observable with brushed metals for instance. An asymmetric specular lobe model is introduced to allow for such phenomena. The visually distinct feature of that lobe is the elongated appearance of the specular reflection. For a single punctual light source, the specular reflection will eventually degenerate into a zero width line in the limit, that is where the material is fully anisotropic, as opposed to be fully isotropic in which case the specular reflection is radially symmetric.
When using this extension:
WEBGI_materials_anisotropy
must be added to extensionsUsed
.WEBGI_materials_anisotropy
in extensionsRequired
.Sample values:
{
"materials": [
{
"extensions": {
"WEBGI_materials_anisotropy": {
"anisotropyFactor": 0.6,
"anisotropyNoiseFactor": 0.2,
"anisotropyDirection": [0.0, 1.0, 0.0],
"anisotropyDirectionMode":"CONSTANT"
}
}
}
]
}
Type | Description | Required | |
---|---|---|---|
anisotropyFactor | number |
The anisotropy. | No, default: 0.0 |
anisotropyDirection | textureInfo or float |
The anisotropy direction value or direction/rotation texture. | No, default: [0.0] |
anisotropyDirectionMode | "CONSTANT" or "ROTATION" or "DIRECTION" |
Specifies type for anisotropyDirection , whether constant or specific texture. |
No, default: "CONSTANT" |
anisotropyNoiseFactor | number |
Parameter to control noise/sparkle. | No, default: 0.0 |
anisotropyDirection
contains an array for a constant direction vector or the texture for 1D or 2D direction.
When anisotopyDirectionMode
is:
CONSTANT
: constant float is expected, specifies the rotation angle.ROTATION
, texture is expected with 1D rotation value in R channel. Direction is computed as [sin(rot), cos(rot)]
. This works similar to Anisotropy Rotation
in Blender Cycles Anisotropy BSDF. The texture is expected to be sRGB
encoded. TODO: add sample texture.DIRECTION
, texture is expected with 2D rotation value in RG channels. Direction is taken as [texel.r, texel.g]
. The texture is expected to be sRGB
encoded. TODO: add sample texture.TODO: add technical details.
reference: KHR_materials_anisotropy Draft
See gltf_materials_anisotropy repository for shader snippets and implementation details.