Request to improve this Fabric shader
You can download the blendfile on:
Below an explanation why I made this shader this way.
I always had a problem rendering fabrics. After playing with the velvet shader I noticed that it is a diffuse shader and makes the material at facing angle darker.
When looking at fabrics pictures on the internet I couldn’t find such an effect. Until yesterday I went to the shop and saw a soft toy with long fur. And finally noticed the black spot there. It is caused by the shadows of the hair which you see only at facing angle. So I suppose this velvet shader is “usefull” to simulate fabrics with a bit longer hair/fur.
When looking at fabrics on the internet and looking at a soft toy with short fur, I noticed that at grazing angle the material is less saturated than at facing angle. ( I am not talking about the reflection of light). My theory is that grazig angle we see the parts of the hair that is thin, and contain less color whereas at facing angle we also see the thicker parts of the hair in where we see more color. ?
So I implemented this in the fabric shader:
- Velvet shader makes darker at facing angle
- My implementation makes grazing angle less saturated.
Another thing. Fabrics consists out of hair, right? And in Blender we have our hair shader, but we can’t use that. I noticed that the hair shader is in fact a glossy shader. One part rough, and the other sharper glossy. The gloss is colored. Whereas the velvet shader is just a diffuse shader.
Some fabrics look a little bit metalic; The gloss is colored. But is has also that colorless gloss. It’s like on carpainting. I see two kinds of gloss. 1 rough colored, 1 sharper gloss colorless. So I implemented two gloss layers. I didn’t give the rough gloss ( I called it metalicness) a fresnel thing. Because, well, it function’s like a diffuse and diffuse doesn’t have fresnel ? I don’t know. I gave only the sharp gloss our PBR fresnel.
I implemented Ace Dragon’s modbump and Cynicat pro’s PBR reflection. Did an attempt to implement glossfix as well, but found it a bit dark.
- Thanks to Ace Dragon, I don’t see dark artifacts now when using gloss with bump. ( modbump), but still at grazing angle, sometimes I see darker areas. Modbump cannot help here I suppose since it is real geometrie.
- Not sure if I have to use overlay or multiply when coloring textures with patterns.
- Not sure if I have to mix the metalicness (rough colored gloss with a map via color ramp) Maybe I have to leave the map out); it makes it dark.
- I am not sure if I implemented that metalicness idea well. I believe all fabrics have it more or less. ( like hair has).
Anyway, have fun with the fabric shader and I hope some blender geniuses would love to improve this shader and share it.