Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 3.57 KB

gltfTutorial_014_AdvancedMaterial.md

File metadata and controls

56 lines (37 loc) · 3.57 KB

Previous: Simple Texture | Table of Contents | Next: Simple Cameras

An Advanced Material

The Simple Texture example in the previous section showed a material for which the "base color" was defined using a texture. But in addition to the base color, there are other properties of a material that may be defined via textures. These properties have already been summarized in the Materials section:

  • The base color,
  • The metallic value,
  • The roughness of the surface,
  • The emissive properties,
  • An occlusion texture, and
  • A normal map.

The effects of these properties cannot properly be demonstrated with trivial textures. Therefore, they will be shown here using one of the official Khronos PBR sample models, namely, the WaterBottle model. Image 14a shows an overview of the textures that are involved in this model, and the final rendered object:


Image 14a: An example of a material where the surface properties are defined via textures.

Explaining the implementation of physically based rendering is beyond the scope of this tutorial. The official Khronos glTF Sample Viewer contains a reference implementation of a PBR renderer based on WebGL, and provides implementation hints and background information. The following images mainly aim at demonstrating the effects of the different material property textures, under different lighting conditions.

Image 14b shows the effect of the roughness texture: the main part of the bottle has a low roughness, causing it to appear shiny, compared to the cap, which has a rough surface structure.


Image 14b: The influence of the roughness texture.

Image 14c highlights the effect of the metallic texture: the bottle reflects the light from the surrounding environment map.


Image 14c: The influence of the metallic texture.

Image 14d shows the emissive part of the texture: regardless of the dark environment setting, the text, which is contained in the emissive texture, is clearly visible.


Image 14d: The emissive part of the texture.

Image 14e shows the part of the bottle cap for which a normal map is defined: the text appears to be embossed into the cap. This makes it possible to model finer geometric details on the surface, even though the model itself only has a very coarse geometric resolution.


Image 14e: The effect of a normal map.

Together, these textures and maps allow modeling a wide range of real-world materials. Thanks to the common underlying PBR model - namely, the metallic-roughness model - the objects can be rendered consistently by different renderer implementations.

Previous: Simple Texture | Table of Contents | Next: Simple Cameras