<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>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'<br>
</p>
<p>The glTF V2 specification
(<a class="moz-txt-link-freetext" href="https://github.com/KhronosGroup/glTF/tree/master/specification/2.0">https://github.com/KhronosGroup/glTF/tree/master/specification/2.0</a>)
uses Physically Based Rendering (PBR). <br>
</p>
<p>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<br>
*
<a class="moz-txt-link-freetext" href="https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/">https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/</a><br>
*
<a class="moz-txt-link-freetext" href="https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/">https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/</a><br>
</p>
<p>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.</p>
<p><br>
</p>
<p>The glTF V2 specification that discusses materials is at
<a class="moz-txt-link-freetext" href="https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#materials">https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#materials</a>.
It includes an illustrative (image) example plus example (JSON)
code. Appendix B is currently unwritten.<br>
</p>
<p>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.</p>
<p>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. <br>
</p>
<p>The glTF system does not specify a "rust" texture (as in
variation over the surface). That is content.</p>
<p>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.<br>
</p>
<div class="moz-signature">-- <br>
<font class="tahoma,arial,helvetica san serif" color="#333366">
<font size="+1"><b>Leonard Daly</b></font><br>
3D Systems & Cloud Consultant<br>
LA ACM SIGGRAPH Chair<br>
President, Daly Realism - <i>Creating the Future</i>
</font></div>
</body>
</html>