Maya Realtime PBR Skin Shader
DirectX PBR Skin Shader implementation for Maya`s Viewport 2.0. Works exactly like the native Ubershader that ships with Maya. Features include Dual Lobe Specular, Back Scatter (Forward Scatter), Custom Subsurface Scattering.
Maya Viewport 2.0 PBR Skin Shader
Render your real-time characters skin directly in Maya`s viewport using a fullset of features commonly used in the Game Industry!
If your project uses a physically based material workflow (Substance Painter / Quixel Mixer) you will greatly benefit by using this shader to enhance Maya`s native rendering abilities.
It`s a “principled” BRDF
Based on Unreal`s shading model which in turn is based on Disney`s, it follows a set of simple principles:
- Intuitive rather than physical parameters should be used.
- There should be as few parameters as possible
- Parameters should be zero to one over their plausible range.
- Parameters should be allowed to be pushed beyond their plausible range where it makes sense.
- All combinations of parameters should be as robust and plausible as possible.
Inputs and Switches
- Linear space lighting (Switch) – Perform gamma correction.
- Tone Mapping Function (Dropbox) – Change tonemapping ( None, Uncharted, Aces, Filmic )
- Shadows (Switch) – Enable / Disable Shadows Map
- Shadow Strenght (Slider) – Control the shadow amount
- Shadow Bias (Slider) – Pushes the shadows into the surfaces
- Inverse Square lighting (Switch) – The light falloff function
- Double Sided Lighting (Switch) – Enable normals on both sides
- Base Color (Value and Texture2D)
- Metallic (Value and Texture2D)
- Specular (Value and Texture2D)
- Roughness (Value and Texture2D)
- Normal (Value and Texture2D)
- Ambient Occlusion (Value and Texture2D)
- Extra switches for choosing between flat values or textures
- Gamma correction on specular and roughness textures
- Channel selectors for the specular and roughness textures
- Roughness texture min / max linear interpolation
- Roughness per lobe and mix – Similar to Unreal Engine
- Specular/Diffuse/BRDF Textures – You can create these with IBLBaker
- Diffuse intensity
- Environment rotation
- Irradience Blur – Changes the mipmap
- Switch to use the vertex color as input – Works with fStretch plugin
- Ability to use an Atlas or individual masks
- Atlas tile settings – You can use Texture Atlas Tools from nVidia
- Wrinkle masks inputs which can be controlled by blendshape values
- Same as Maya`s Ubershader
- Same as Maya`s Ubershader
- Ability to use a mask, and texture channel selector
- SSS Width – Also affects the shadows
- Deepscatter Map with Parallax – Use this to simulate skin depth
- Deepscatter (actually ForwardScatter) – for Ears etc.
- Blended Normals Controls
- Normal Intensity based on Angle
- Normal Intensity of Environment
- Bloodflow simulation – using the wrinkle masks
- Roughness compression – using the wrinkle maps
- Fuzz texture selector
- General Fuzz using a fresnel
- Fuzz with blend on the environment specular
- Fuzz with blend on the specular
Values and Texture Maps
Tesselation and Displacement
This shader uses the Cook-Torrance BRDF model ( Microfacet specular = D*G*F / (4*NoL*NoV) = D*Vis*F ). For these examples we used a gamma correction of 2.2. Note: Your results or comparisons might vary depending on gamma-correction / tone mapping or any other modifications that might occur.
Normal distribution function – GGX / Trowbridge-Reitz – “Walter et al. 2007, “Microfacet models for refraction through rough surfaces”
Geometric shadowing function – Appoximation of joint Smith term for GGX “Heitz 2014, “Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs”
Fresnel function – Schlick 1994, “An Inexpensive BRDF Model for Physically-Based Rendering”
To better match visually the shader in unreal we also added an extra rim/fresnel function:
Diffuse function Burley 2012, “Physically-Based Shading at Disney”
Pre-calculated environment maps for different roughness values, stored in the mip-map levels of a cubemap. This is the typical approach used by much of the game industry. You can bake your own environment maps in the compatible .dds format using a tool like IBLBaker (free).