Skip to main content

History: HLMS Materials

Preview of version: 2

High Level Materials System (HLMS)

HLMS is the new material system replacing the old material system of earlier Ogre versions. This doesn't mean that the old material system is completely gone, but for most of the cases the HLMS materials are sufficient. The HLMS system is extendable, e.g. you can implement a 'skin' or 'fur' HLMS yourself. Ogre includes two HLMS flavours out-of-the-box:

  • PBS - Physically Based Shading; an approach for materials and rendering that creates more accurate and predictable results than previous game rendering techniques Polycount wiki for more information.
  • Unlit - Unlit rendering; the textures in the material are not affected by light.

Materials can be loaded and saved as a file, but unlike the previous material system, the format of the HLMS materials is Json.

Alert
Note, that there are 2 other HLMS implementations named PbsMobile and UnlitMobile. They are used for GLES2 rendering and may not be completely on-par with the regular Pbs and Unlit verions.

Material structure

A material consists of a certain structure:
Datablock - contains individual information about a specific material and may 'consist' of:
    |_ Samplerblock (0..32); A sampler block contains the properties of a texture.
    |_ Macroblock (0..32); Describes the rasterizer state and includes properties such as depth check, depth write, cull mode, ... Macrcoblocks may be shared between datablocks.
    |_ Blendblock (0..32); Also describes the rasterizer state, but is separated from macroblocks because of sorting of transparent materials. Blendblocks may be shared between datablocks.

Pbs

The Pbs material is probably the most used material. It is build up by using different texture maps. A texture map is an image that can be loaded from a .png or .jpg file for example:

  • Diffuse map; Wraps the texture image onto the 3D geometry surface while displaying its original pixel color.
  • Normal map; The textures' color representation affects surfaces (bumps, scratches, ...) while providing higher degrees of detail. Sometimes used by the name 'albedo'.
  • Specular / Metallic map; When in metal workflow, the texture is used as a metallic texture and is expected to be a monochrome texture. When in specular workflow, the texture is used as a specular texture, and is expected to be either coloured or monochrome.
  • Roughness map; The roughness map describes the surface irregularities that cause light diffusion. Rougher surfaces will have larger and dimmer looking highlights. Smoother surfaces will keep specular reflections focused, which can appear to look brighter or more intense even though the same total amount of light is reflected.
  • Detail weight map; It provides a mask to cover detail maps over the mesh, by controlling weight of each of the 4 maps via the RGBA channels of the weight map. 'R' controls the detail map 0, 'G' the detail map 1, 'B' the detail map 2, and 'A' the detail map 3.
  • Detail map 0;
  • Detail map 1;
  • Detail map 2;
  • Detail map 3;
  • Detail normal map 0;
  • Detail normal map 1;
  • Detail normal map 2;
  • Detail normal map 3;
  • Environment probe map; Environment probe map is also referred to as Reflection map. The image map is projected onto a 3D surface to represent a reflection of the environment.

Unlit


Material workflow

Ogre V2 support two basic types of workflow, Specular Workflow and Normal workflow. Both types of workflow are explained in more detail in PBR Guide volume 2
(See also PBR Guide volume 1 for the first part of the PBR guide).

Ogre also supports

History

Information Version
Fri 14 of Apr, 2017 12:45 GMT-0000 spookyboo 11
Fri 14 of Apr, 2017 12:43 GMT-0000 spookyboo 10
Fri 14 of Apr, 2017 12:42 GMT-0000 spookyboo 9
Fri 14 of Apr, 2017 12:42 GMT-0000 spookyboo 8
Fri 14 of Apr, 2017 12:28 GMT-0000 spookyboo 7
Fri 14 of Apr, 2017 12:22 GMT-0000 spookyboo 6
Fri 14 of Apr, 2017 12:21 GMT-0000 spookyboo 5
Fri 14 of Apr, 2017 12:14 GMT-0000 spookyboo 4
Fri 14 of Apr, 2017 12:09 GMT-0000 spookyboo 3
Fri 14 of Apr, 2017 11:32 GMT-0000 spookyboo 2
Fri 14 of Apr, 2017 10:07 GMT-0000 spookyboo 1