# How to shift normal along tangent?

I guess that is what I’m trying to achieve at least. But I’m open to suggestions. Basically, I want to shift the “dark spot” of the velvet shader by manipulating its normal output. And I want to shift it by some number of degrees based on i.e. the local U direction. For for a laying cylinder with light directly above it, the dark spot would be shifted i.e. 20 degrees in the +U direction. It’s an effect I have noticed in my own fabric living room chairs, and I guess it originates from the “lay” of the fabric fibers - feels smooth stroking in one direction, rough stroking in opposite direction.

In image, there is a single spotlight directly above. And no, it’s not from wear.

If you add the tangent vector to the normal vector and normalize the result, you’ll get a 45º rotation.
For other angles, you can scale the normal and tangent before adding them.
For even more precision, multiply the normal by the cosine of the angle, the tangent by the sine, and add them together.
Shifting in the opposite direction is the same, but with the negative of the tangent vector (a negative sine does this automatically).

So for i.e. 0.2, do you mean scalar multiply them, something like this:
(0.8 * normal) + (0.2 * tangent) -> normalize ?
Still, scaling the normal? Something in my mind screams when I see that, as anything involving shaders/light interaction would fail and would have to be compensated for, somehow.

I was trying to do some simple adding and normalizing when I posted, but the shading from velvet was not satisfactory (sharp terminator) so I’m thinking I’m doing something horribly wrong.

Long time ago I would use received light and the light vector to darken and brighten the sides, although I can’t recollect how. But with closures I’m kinda lost. Or maybe we’re supposed to manipulate the velvet sigma value rather than the normal? The manual tells me nothing and I can’t find any good tutorials.

a bit more like this:
cos(a)*N + sin(a)*Tg

Yupp, this is the best way to get terminator problems… But sometimes the distribution model doesn’t fit some phenomena and we have to add them by hand.
In this case, you want anisotropic velvet, but we only have isotropic.

Yeah, I guess. Does other renderers (Renderman, Clarisse) have this effect possible in their path tracing line? My chairs certainly isn’t velvet material (not smooth enough), probably more like velour.

It’s not critical for me, but I would really like to have the effect possible. Shading of furniture fabrics sounds like something more people would be seriously invested in (product rendering etc). For the rendering I do at work, making it “look like some fabric” is generally enough

I just happened to notice how my own chairs appeared under specific lighting. I also just noticed that brushed stainless steel actually have double reflections at certain angles. I know of double refraction, but I can’t find anything on double reflection (like mixing two glossy with different normals).