Skip to content
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_specular extension branch. #1741

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions extensions/2.0/Khronos/KHR_materials_specular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# KHR\_materials\_specular

## Khronos 3D Formats Working Group

* Norbert Nopper, UX3D [@UX3DGpuSoftware](https://twitter.com/UX3DGpuSoftware)

## Acknowledgments

* TODO

## Status

Experimental

## Dependencies

Written against the glTF 2.0 spec.

## Overview

TODO

## Extending Materials

The specular materials are defined by adding the `KHR_materials_specular` extension to any glTF material.

```json
{
"materials": [
{
"extensions": {
"KHR_materials_specular": {
"specularFactor": 0.5
}
}
}
]
}
```

### Specular

All implementations should use the same calculations for the BRDF inputs. Implementations of the BRDF itself can vary based on device performance and resource constraints. See [appendix](/specification/2.0/README.md#appendix-b-brdf-implementation) for more details on the BRDF calculations.

| | Type | Description | Required |
|---------------------|---------------------------------------------------------------------|------------------------|----------------------|
|**specularFactor** | `number` | The specular. | No, default: `0.5` |
|**specularTexture** | [`textureInfo`](/specification/2.0/README.md#reference-textureInfo) | The specular texture. | No |

This extension is overwriting the default `F0 = 0.04` for non-metallic materials in the Metallic-Roughness workflow. Instead, `F0 = 0.08 * specularFactor * specularTexture` is used.

## Appendix

TODO

## Reference

### Theory, Documentation and Implementations

[Blender Principled BSDF](https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/principled.html)
[Disney BRDF Explorer - disney.brdf](https://github.com/wdas/brdf/blob/master/src/brdfs/disney.brdf)
[Physically-Based Shading at Disney](https://disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf)
[THE PBR GUIDE BY ALLEGORITHMIC - PART 1](https://academy.substance3d.com/courses/the-pbr-guide-part-1)
[THE PBR GUIDE BY ALLEGORITHMIC - PART 2](https://academy.substance3d.com/courses/the-pbr-guide-part-2)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "KHR_materials_specular glTF extension",
"type": "object",
"description": "glTF extension that defines the specular channel for the Metallic-Roughness layer.",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
"properties": {
"specularFactor": {
"type": "number",
"description": "The specular channel.",
"default": 0.5,
"minimum": 0.0,
"gltf_detailedDescription": ""
},
"specularTexture": {
"allOf": [ { "$ref": "textureInfo.schema.json" } ],
"description": "The specular channel texture.",
"gltf_detailedDescription": "The specular channel texture. Stored in channel A with default linear value 1.0 of the AO-Roughness-Metallic texture."
},
"extensions": { },
"extras": { }
}
}