[Shader] PBR NK-Multishader UPDATED with carpaint

Hi everyone,
after few months spent tweaking this multishader I decided to release it for the public.
It’s been used for architectural projects mainly.
The blend file contains the shader, a basic camera rig with focus object and a color correction panel for calibration.
The NK-multishader is greatly based on the CynicatPro’s work and other tutorials made by others found on the net and their great effort in sharing knowledge.
You can easily create PBR Dielectrics, Metals, Dispersion glasses, Volume glasses and SSS materials.
In the blend file you can find a text file with instructions.

You can find it on my website: http://www.crazyrobinhood.org/

Of course you can use it and redistribute it according to its Creative Commons Attribution-ShareAlike 4.0 International License.
Let me know what you think!
Have fun!

EDIT:
new version is available with complex carpaint shader and some procedural nodes.
The file has been polished and updated to give a balanced scene to create materials.

EDIT2:
new version with more accurate white balance filmic scene and a new Architectural fake glass nonPBR
with shadow and alpha controls to help composite architectural glasses.

Attachments


Good job. Thanks and good luck.

Thanks for the support!
I will pst here future tweaking and changes.

Thank you very much!

Thank you but…
Why cookies?

Not meant as criticism, but a few points I noticed:

  1. What does NK stand for? To me it usually means complex fresnel for conductors, but the material is based on “Metal-Rim” color. Although I prefer edge tint approach for user control, it wasn’t what I expected to find.

  2. We have to add 1 (or more) to map value if plugging specular maps into the IOR socket. Should have been mentioned in the text or slider input. 1 means specular blend is completely turned off, which is fine, but it doesn’t say anywhere if 1.45 or 1.04 should be used to mimic most dielectric materials. Normally 1.45 IOR translates to 0.04 specularity in PBR systems, where here would be 1.04?

  3. We have to transform roughness maps (power of 2?) if using roughness maps from other PBR systems (game engine like?). I really hate the Cycles roughness range being the way it is.

  4. I don’t use SSS much, but isn’t max limit of 1000 a bit excessive?

  5. Maybe Metal-Rim could also control glossy color at facing angles for dielectrics/glass (still white at grazing angles)? Although not physical for dielectrics, Disney included it as Specular Tint in their shader for artistic control reasons, and for glass it serves a means of coloring effects due to coatings (nobody “models” coatings separately).

  6. Maybe SSS-Scale (if 0-1 range, see point 4) could also control the blending curve between refraction and glossy for glass? This also has to do with being able to produce glass with coating effects. At 0.5 it would follow the fresnel curve from IOR exactly, at 0.0 it would shape the fresnel curve so that facing angles are more reflective, at 1.0 it would shape the fresnel curve so that facing angles are less reflective. I typically just apply a shifted power curve to achieve this. While probably not realistic, it allows me to make glass become less reflective (at facing angles) when I need it to simulate anti reflective coating. Could also be in the -1 to +1 range, with +1 being anti reflective. I don’t think I have ever used reflective coating. The SSS Radius driven by normal? I’m not sure I get it.

  7. You should have a GlassThin-OUT output socket which handles single singled glass (transparency + glossy) which handles inverted faces correctly wrt fresnel IOR (iirc just a 1/IOR before going into the fresnel node if backside of face). I believe disney treats faces as double sided, but I’m not sure how it handles true volumes (never checked). Doing this for true volumes would spell trouble when placing camera inside the volume (looking at the sky from inside water volume), so I would be careful trying to do this for everything. But should be safe if only for single sided glass.

  8. Should IOR still be a valid control for metals, and should it work the way it does? The real IOR value for metals would be very high (higher than what is allowed, should we consider dielectric IOR). Point is, if you set it to 1 the white edge doesn’t happen at all, and if set to high values it almost completely replaces the color. You get somewhat sensible results at 1.05-1.25 (ish?), which are weird numbers for metals. I’m split; artistic freedom is good, but the naming/numbers used looks wonky.

  9. Maybe top it off with a topcoat layer? Pure white reflection, you just control a basic amount (0 means completely off), a very limited amount (say 0-1 maps to 0-0.01) of roughness (which means you don’t have to account for it fresnel wise), and a separate normal input.

  10. More a practical thing, but for previewing purposes, you can get away with Skorupa’s blur node for the camera visible version of the HDR. Doesn’t look that great for this, but HDRs take considerable amount of memory so why waste memory on it?

In my own approach I use anisotropic glossy (with tangent and rotation control) instead of isotropic glossy, and I completely separate out glass, thinglass, and I have a more specialized version to handle metals (dealing especially with anisotropics). Most metals in real life, unless super polished or bare metals (from metal production process) shows signs of being machined, meaning anisotropy. But also many natural materials has some degree of it (wooden planks in direction of grains, fabrics, etc). To the point I’m not even sure why we even have a glossy shader :smiley: Drawback on anisotropy is lack of control. Then again, I’m completely ignoring SSS and dispersion.

I also note the lack of inputs for AO and heightmap. Although I have no idea how to implement heightmap (not bump or displacement). I’ve tried a few times but I’m getting absolutely nowhere. It’s supposed to do something to normals to make reflections appear closer or farther (or something). I’m holding my own personal because I’m not able to create the GUI I want for it with current Blender.

So yeah, that became a bit longer than intended :smiley: Always enjoying looking at how other handles certain things. Hope some of it is useful and constructive for future stuff.

Thank you CarlG!
Very interesting comments.

Btw, NK stands just for my name’s abbreviation. :slight_smile:

The shader is provided “as is” and of course it’s not intended to be definitive in any way.
It’s just my personal setup for architecture materials and of course I would love to see personal tweaking from the users and modifications!

I’m going to replace the blurry hdr with a jpg, thanks for the advice!

And thank you for your detailed post reply!

Thank you but…
Why cookies?

HI there, do you mean in my website?
I don’t use profiling cookies there but just technical ones, I had to add the warning anyway because of italian laws about that.
Thanks for the support!

Tested with 2.78 RC2

Thank you very much for sharing!

And thank you for support!

  1. Should IOR still be a valid control for metals, and should it work the way it does?

http://forums.cgsociety.org/archive/index.php?t-513458.html

I used this list for IOR minimum and maximum values. Apparently the Silicon is the higher value.
I dont’ really know if that list is correct because I don’t have a measurement tool.
If someone knows a more scientific table, please let me know.

Über shader, Über Alles! :):slight_smile:
Very handy, it speeds the everyday job.
It solves in few clicks most of situations.
Thanks for sharing.

Thanks for support man!

thanks nk, your shader is great!
Ciao da Genova :stuck_out_tongue:

Thanks stevin!
check out last version with camera group updated!

Shader has been updated with a complex carpaint and tweaks.
Happy new year to everyone!

Updated Carpaint with slider for clearcoat value.
Added a version that works good with the Sobotka filmic OpenColorIO configuration.
You can check his git here:

Thanks, really nice !

Glad you like it and find it helpful!
Let me know if you can improve it somehow. I think sharing knowledge is the way to go.
Best.
NK