Relations between parameters of the physically based Material and BRDF model?

Hey guys, I’m currently studying UE4’s physically based shading system described in the Real Shading in Unreal Engine.

The basic Material has four parameters: BaseColor, Metallic, Roughness, Cavity.

Here are their shading models (BRDF used) (sorry for the quality of the image):



It is pointed out how Roughness is used and I guess BaseColor is referred as c[SUB]diff [/SUB]. But how Metallic and Cavity is implemented in details? And if you know the exact involved codes in the source of the Engine, please tell me. Thanks!

Nope, no cavity, it is specular.

BaseColor is an artistic control parameter. It is not the same, as c[SUB]diff [/SUB] you see in the formulas. BaseColor becomes c[SUB]diff [/SUB] only when adjusted by metalness.

You can take a look at shader files yourself. BasePassPixelShader would be a good place to start.