SamuKata
colortwist
colortwist

patreon


Experiments in cloth shading (1/7)

After my last attempt at generating fabric textures fell apart, I decided to change gears and try something else. I've been aware of a nifty cloth shader drifting around the internet for quite some time, though finding support for it in most renderers is fairly rare (probably because it requires the use of external definition files that describe the weave pattern in plain text).

Unfortunately the renderer I'm currently using didn't come with support for this particular shader OOTB, so I set out to write my own port using the information and research papers publicly available on the internet.

This was the end result of the first attempt. Pretty much everything about this render was broken in some regard. I wasn't reading the surface normal correctly, wi and wo weren't aligned properly with the texture derivatives, the specular normalization method I tried using was totally incorrect, etc, etc.

However, it: A) compiled, and B) didn't crash. Furthermore, while the output was less than stellar, at least bits and pieces of the default weave pattern were visible, which meant that most of the math must be working in some capacity.

Experiments in cloth shading (1/7)

More Creators