[x3d-public] glTF Materials
Leonard Daly
Leonard.Daly at realism.com
Wed Sep 6 11:20:30 PDT 2017
The topic of glTF material libraries came up during the X3D WG meeting.
I volunteered to report back on what is available. This is the report.
Because all of this is publicly available and generally useful, I am
also posting it to 'x3d-public'
The glTF V2 specification
(https://github.com/KhronosGroup/glTF/tree/master/specification/2.0)
uses Physically Based Rendering (PBR).
Note: PBR Articles are plentiful. Listed here are a couple I used when
writing this up. These are useful to help in term definition and
understanding
*
https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/
*
https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/
Khronos works by defining a specification and allowing extensions -
either Khronos or vendor developed. This discussion is just about the
approved spec and does not include draft or extension documents. At this
time there is no common material library; however, there is a draft
document for glTF V1 that is posted.
The glTF V2 specification that discusses materials is at
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#materials.
It includes an illustrative (image) example plus example (JSON) code.
Appendix B is currently unwritten.
PBR is mostly used to handle metals. Most non-metallic surfaces are
special cases or otherwise covered in the metallic-roughness model. This
model specifies what happens to light when it strikes the surface of the
object - it is the bidirectional reflectance distribution function
(BRDF). It is the responsibility of the lighting system to use these
values with the various light sources (including reflection from other
objects) to determine an objects perceived appearance.
For each supplied pixel, the objects BRDF is calculated from six number,
(RGBA, metallic-factor, roughness-factor; described in Appendix B -
currently unwritten). Each value comes from a texmap (image; 2 total -
metallic and roughness are combined) so the BRDF is a function of
surface coordinates. If the inputs for the six numbers are constant over
the object (i.e., the texmaps are a single color), then the object's
BRDF will produce the same value for each point on the object's surface.
The glTF system does not specify a "rust" texture (as in variation over
the surface). That is content.
As far as I can tell, there is no effort at any organization affiliated
with glTF to provide a library of various textures (e.g., dirt, brick,
stone, rust, wood, leaf-litter, etc.). This is content and out-of-scope
of the glTF work. It is more along the lines of A-Frame asset or Unity
libraries -- somewhat akin to the Universal Media library for X3D content.
--
*Leonard Daly*
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170906/c0ff0234/attachment.html>
More information about the x3d-public
mailing list