I'm a gameplay programmer
focused on developing
engaging and unique experiences!

My Resume Learn more

Physically Based Rendering and Roughness Maps

Part of being a graphics programmer is making decisions on how much to accurately simulate light in reality. These choices create trends in the graphics industry, where today physically accurate lighting is the most popular rendering technique. One of the main reasons for this is that by simulating realistically, changes in a material's properties have predictable results.

Additionally, another type of texture that indicates how specular lighting should interact with a texel is a roughness map. This is a map that indicates the roughness of a particular texel, which causes it to react differently to specular lighting.

Microfacets

One of the biggest changes from Blinn-Phong shading to PBR is accounting for microfacets, which are bumps on a surface that determine how smooth the object is. This is done by calculating the number of microfacets that have the same half vector as the Blinn-Phong half vector. Accounting for this makes it so that rougher specular highlights are more spread out while smoother ones are more concentrated. Something to note is that microfacets also can cause light to be occluded or reflected between other microfacets.

Fresnel Effect

Another aspect of PBR is accounting for the fresnel effect, where more light is reflected when viewed at a steep angle. The behavior of this effect can be dictated by a material property that states how much light is reflected when the fresnel effect doesn't occur

Dispersed Specular Lighting

By accounting for the microfacets and the fresnel effect, our specular lighting will then look like the animation below:

Notice how as the material becomes rougher the specular lighting fades and spread out more. On the opposite end, when the material gets smoother the specular lighting gets sharper and smaller.

Roughness Maps

Roughness maps are a grayscale texture that can give more detail to a material by dictating how specular lighting interacts with individual texels. The texels are on a range between black and white where black is smooth and white is rough. Something to note is the exact opposite of this is a gloss map, where black is rough and white is smooth. Gloss maps and roughness maps are interchangeable by simply inverting their colors!

If we integrate roughness maps correctly, we should be able to see the detail provide like the animation below:

Notice as the specular highlight moves over the material we can see more individual details highlighted on the green and yellow paint. This is from our roughness map!

No Comments Yet.

Leave a comment