Latexluv opened this issue on Jun 04, 2010 ยท 182 posts
bagginsbill posted Wed, 09 June 2010 at 6:44 PM
This is very interesting. Long ago, when I built the nylon/leg shader, I did it by eye, the way everybody does. It took a lot of guesswork and never quite met my expectations for realism.
This time, as I always do now, I approached it from the physics first.
I made a simplifying assumption that the fibers are simply tiny cylindrical tubes, arranged in a criss-cross pattern. I also assumed (without too much loss of generality) that the orientation of the fibers is strictly horizontal and vertical. That isn't quite true, because rotating the cloth produces variety in the angles formed between the cloth surface and the viewer. This behavior is called anisotropy and I could deal with it if I could write shaders in software, instead of using the nodes, which limit the sorts of math I can do. But I think that I'm getting 95% correct results regardless.
Do you want to see the physics or no? It's very simple trigonometry, but I don't want to spoil the fun with too much "gobbledygook", as some people are offended by my brain, apparently.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)