Physically based rendering materials are defined
by three channels, which is the Albedo, Microsurface and Metallic channels. Any other texture types, such as Ambient Occlusion,
Normal, Height, Opacity, etc all function as they usually do with any other
kind of shader as long as it sticks close to the industry standards of visualizing the
fed data. To fully understand these three channels and
what they are supposed to represent, we first need a basic understanding of light and its
interaction with surfaces - as physically based rendering tries to imitate this behaviour
though these three channels. Hence the name; Physically Based Rendering. As light hits a surface, it can either submerge
into it, reflected off of it or penetrate it. It is these three potential behaviours that
decides the surface’s appearance. Submerged light enters the surface and scatters
within it before resurfacing. The resurfaced light is referred to as ‘refracted
light’, or diffuse. Depending on the atoms of which the surface
consists of, - the color of the refracted light and the depth it may travel within the
surface will vary. The depth of the scattering is important because
it has a lot to do with the reflective appearance of refracted light. Surfaces can be categorized into two types
based on the reflective properties, related to the absence or presence of metallic atoms. The first type is dielectric (insulative),
which because it contains no metal atoms - the light will scatter deep and wide though the
material before resurfacing. The implications of this is that the original
structure of the light will be lost and unrecognizable when it finally resurfaces. In addition, the resurfaced light will emit
in different directions because of how it scatters within the surface. This means there is little reflective potentiality,
and thus it will return a matt color of whichever color resurfaces. The second type is metallic (conductive),
which is made of metal atoms. This will drastically reduce the scattering
of submerged light because metal atoms reflect a lot of the light back before given an opportunity
to absorbing and scatter them. This in return means that a lot of the structure
of the light that entered the surface is close to the same when it resurfaces. This is why metal surfaces are so reflective. The reflected light simply bounces off the
surface before submerging into it. This is also referred to as specular light. Take note of the difference between submerged
refracted reflection, such as with metal - and bounced reflection, such as reflective or specular lighting. Reflected light does not submerge into the
surface, and does therefore not share the color-scheme of the refracted light. This means the reflected light will always
reflect in the color tone of its light source. This means that if you have a light source which is red, and a surface which is orange - The reflected light will reflect in red, even though the surface is orange. The
clarity of the reflection depends on the uniformity of the light after the surface interaction. The deciding factor of this is the microscopic
details on the surface. While reflected light is not absorbed, it
is scattered in new directions upon impact. The more scattered the light is, the more
blurred the reflected light becomes. So lets have a look at the albedo, microsurface
and metallic channels and what role they play in imitating this behaviour. The albedo is a RGBa channel where RGB hold the prime color values in Red, Green and Blue,
while the alpha is actually free to contain just about anything, and isn’t necessarily
reserved for opacity. The albedo channel represents the color of
refracted light, which again is the light that resurfaces after it has submerged the
surface, scattered, and eventually resurfaced. It is completely oblivious to any reflective
behaviour and is only about the color that escapes the light absorption process. The microsurface channel is the scattering
factor of the reflected - or specular light, which again is the light which bounces off
the surface on impact. Common scattering factors are surface layers
like dirt, moisture, dust, or physical damage, which makes the surface uneven. Again, it’s important to note that the microsurface
channel has to do with the scattering of reflected light, and has nothing to do with the scattering
of submerged refracted light. The microsurface is a grayscale channel which
controls the scattering factor by the brightness intensity. It has two popular ways of being represented,
which is as a Roughness channel or a Glossiness channel. They are the same thing except that their
values are inverted from each other. The roughness channel implies if the texture
is white, the surface is rougher and thus scatters the reflected light into more directions
- making it appear blurred. The glossiness channel implies if the texture
is white, the surface is smooth and thus reflects the reflected light uniformly and thus appears
as a sharp reflection. The metallic channel has to do with the reflective
behaviour of the submerged refracted light through the presence of metal atoms. As previously mentioned, metal atoms reflects
a lot of the light before it can be scattered and absorbed, and thus the submerged light
will resurface unscattered. Because of metals reflective properties, the
environment will be reflected in the colors to a much greater degree. It is therefore important to change the environmental
map within your texturing software once in awhile to see the appearance of the material
under different lighting conditions, - as metallic surfaces will look very different
depending on the ambient light of the environment. The flatter the light, the less contrastingly
the material will look. Not all of the light will be reflected or
absorbed however, unless the metal appears black which means all of the light that wasn’t
reflected was fully absorbed. Metal is therefore also colored though refracted
light along side of the reflected light. The method of which we give our metal a color
depends on the channel, as the metallic channel also has two ways of being represented. The first is the Metalness method, which uses
a grayscale image to indicate which portion of the model is made of metal. A white color indicates that the surface is
metallic, and black means it is dielectric. This method uses the albedo channel as the
refracted light for the metal surface as well. So whichever color is in the albedo channel
will be the color of the metal. The second method is Specular Albedo, which
is a RGB image which indicates both the portion of the model which is made of metal and also
the refracted color. This means it functions as both the metalness
texture and albedo texture combined. It’s important to note that this method
requires that whichever portion of the surface is metallic, must have the same portion of
the albedo texture rendered as black, or it will not appear correctly. Remember that this is not necessary with the
grayscale metalness texture, as it gets its color from the albedo channel. Neither of the methods has a visual advantage
over the other, - it’s just two different ways of handing over the information to the
shader. The only difference between them for you is
how you have to make the textures and eventually how you package them. Here are some examples of that: When using the Specular Albedo method, - there
is no need for Albedo Color if the entire surface is metallic; the refracted color and
metalness of the surface is both defined through the single RGBa texture file. What’s left is the microsurface channel,
and since that is a simple grayscale channel, the texture can be inserted into the alpha
channel of the Specular Albedo. You then have all the PBR-defined material
information in a single texture. This can make it very easy to manage files. For the metalness method, both the metallic
and microsurface channels are grayscale so they can both be packaged into a single RGBA
file. You can put the metalness into the R-channel,
microsurface into the G-channel, and while you’re at it you can put the Ambient Occlusion
into the B-channel and any other texture into the A-channel. This again can make it very easy to manage
files. I hope this lesson gave you a basic understanding
the PBR texturing process, stick around for more.