One shader to rule them all
As I was aiming at rendering a lot of different fabric materials with Mantra, I eventually figured that those kind of materials weren’t easy to reproduce with basic PBR Nodes or even with the Principled Shader.
Thus I started to do some research and ended up with a new flexible shader, that I like to call “Principled Fabric Shader”, because it’s a base PBR shader.
I tried to find a good list of different fabrics and I regrouped all of them under 3 basic types:
- Cotton (good reflection roughness, fresnel rim secondary color due to its fluffy staple fiber)
- Silk (anisotropic specular and fresnel ramped color variation due to fiber orientation for iridescence purposes)
- Velvet (noisy anisotropic specular and color variation due to fluffy staple fibers changing direction)
Since we have the possibility to use whichever combinaison of the above that we want, we can achieve a very good range of different fabric materials.
We can blend from the main color to a secondary color, blend factor being driven by a Fresnel Node. There is a possibility to use a ramp to drive the Index of Refraction of the Fresnel Node, e.g. for Silk.
For some material, like Velvet, I added the possibility of noise in this Index of Refraction.
I also added the possibility to see only the secondary color for tweaking purposes.
To act like Silk or Velvet, we have to use Anisotropic Specular.
Once again, for material like Velvet, I added a noise option for the Anisotropic Direction.
Basic settings, Fresnel secondary color and good reflection roughness.
Use of a custom Fresnel ramp to alter the main color.
Anisotropic specular reflection.
Light Brushed Bump.
Use of a custom Fresnel ramp with noise to alter the main color.
Anisotropic specular reflection with noisy direction.
If you want to try it, improve it or else, here is the hda file.