EDIT: THIS ENTIRE THREAD IS IRRELEVANT WITH THE NEW PRINCIPLED SHADER IN BLENDER 2.79!
I have been working very hard to create quality PBR shaders that:
-
Work well with PBR maps from other software like Substance Painter and Toolbag
-
Look accurate
[LIST] -
Fresnel curve shape should change with IOR - this causes interesting edge variations
-
Glossy surfaces should still conserve energy when not rendering caustics
-
Conductors should have complex IOR (N, K) (input colors could be used to calculate N and K for artistic control)
-
Shaders should react to roughness properly (NOT what CynicatPro does)
-
Use real world inputs - the artists can map input values outside of the shader node if needed
-
Dielectrics should be able to tint their reflections (not quite the same as conductors)
-
Glass should disperse light, but doing so should follow energy conservation and respect the spectral composition of the incoming light
-
Shaders should be combined in a physically based order and manner
-
Be efficient
-
Use clever modular shaders to create materials only as complex as is needed (not ubershaders)
-
Use as few shader nodes and mix nodes as possible
-
Be easy to use
-
Fake refractive caustics to a reasonable extent (to avoid needed real caustics)
-
Fake reflective caustics at least enough to conserve energy
[/LIST]
I made my basic shader components for dielectrics, conductors, cloth, glass, etc. But, I needed to make a custom node group to handle typical PBR maps. Since conductors require two color (or vector) inputs, the conductor shader would not be practical to use in such a manner. So, I only used a dielectric shader. My dielectric shader supports tinted reflections better than most PBR metal shaders, so it may be sufficient. I just needed to map the inputs correctly. The only thing that could be an issue is the glossy algorithm in the dielectric. The dielectric uses GGX while a metallic surface would use Beckmann. If that is a problem, I just need to add two more nodes.
I downloaded the assets here to test my PBR shader for the metalness workflow.
http://artisaverb.info/PBT.html
I imported the model into Blender, linked in my PBR metalness shader, and setup the model’s material as follows:
I set all the textures to “non-color data” except for the albedo map, which I left at “color”. The node group contains 3 shader nodes, 2 mix shaders, and 1 add shader.
This is the result with no material tweaking. It took 12:57.82 to render compared to 10:45,54 for a plain glossy shader.
This is the original rendered in (I believe) Toolbag: