Principled Fabric Shader

One shader to rule them all

The Call...

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:

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.

The Shader

Albedo

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.

Specular

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.

Results

Cotton

Basic settings, Fresnel secondary color and good reflection roughness.

Some Bump.

Silk

Use of a custom Fresnel ramp to alter the main color.

Anisotropic specular reflection.

Light Brushed Bump.

Velvet

Use of a custom Fresnel ramp with noise to alter the main color.

Anisotropic specular reflection with noisy direction.

Little Bump.

The HDA

If you want to try it, improve it or else, here is the hda file.