About the first part, my guess is they just keep a reference compendium of all the various major shading models so that they can switch them if they ever want to.
I’m going to take a stab at this, even though I don’t 100% know the specifics, so bare with me… Yeah, they are technically grayscale maps, but you need two channels for it just like a flow map. You still need a channel for both the tangent and the binormal because like I said earlier, if you only had one, the other could be 90 degrees to the left or the right. As far as I can tell, most anisotropic maps just put the tangent/binormal into XY UV space, rather than having to bake out three normal maps for each of the normal channels. I’m assuming a value of 128/128 would be your neutral, zero would be -180 degrees and a value of one would be +180 degrees. If you shift one channel, you need to shift the second by the same amount(picture rotating a 3-axis gizmo around the z axis, the x/y have to stay 90 degrees apart and 90 degrees apart from the z axis). It might be possible to simplify the second channel into being a 0/1 sign channel where it would say the binormal is to the left or right of the tangent, but then you’d still need to do some math to take the value of the tangent channel and then +/- the 90 degree offset.
Edit: Oh and I’m not sure if you can have non-90 degree tangent/binormals in the anisotropic texture, but you might be able to get some effects out of it. The shader will evaluate both anyways and might make something interesting. Again, I’ve never really played around with them.
So I have come across a problem with the tangents at the seams of UVs. They don’t appear to match up even though they share the same edge.
I am using the static sphere mesh provided by the engine. They seem to diverge towards the poles. red = tangent, blue = bi-tangent and green = normal.
This causes a disconnect in the shading when using the tangents.
Can anyone explain why this is happening and a possible fix?
Thank you both for the quick replies. That seems to be the case. I wasted hours thinking it was on my end. The fix is to change tangent smoothing angle to 180.
I will post a quote from maya’s obscure docs:
Can you share the shader code? I’m trying to recreate an anisotropic shader but I can’t because I get stuck implementing the rotating specular lobe part ( the part where the specular highlight rotates just like those pictures you have)
Any tips for authoring maps for anisotropy? I’ve tried to do the standard radial anistropy for but I’m getting weird results. See the attached image.
I looked at many references, including this tutorial: https://www.youtube.com/watch?v=i1Ups-DPlxs
Am I doing something wrong or is this a limitation of the shader? The only way I’ve been able to recreate the effect is by altering the UVs.
By default the tangent input expects a vector map (anisotropy map) which consist the red and green channels. You can read more about it here: Anisotropic Direction
But, it boils down to this:
red = highlights run horizontally
green = highlights run vertically
The rotation input expects a ‘rotation map’ where black corresponds to 0 degrees rotation and white a 360 degrees rotation.
You are correct that the tangents are tied to the UVs, so I usually just planar UV map circular things and make sure they are orientated properly.
where are you using that anis_map.png file?
what do the UVs look like?
It should be possible to do. Make sure its srgb is unchecked for the rotation texture.
@stororokw Hey! I was wondering if there’s still a way to get your shader, since it seems the original github link has been removed. it looks really cool.
Nah, there’s no anisotropic material in there dude. There’s a brake disc which uses a radial normal, which “works” for that one very specific use case. But it wouldn’t work on more complex objects, and even in this example, it doesn’t do what it’s supposed to do with the reflections (stretch them along the anisotropic angles).
From what i can see above this looked really promising, i don’t think it would take much work to make it production ready at all. Would be good to look at the old code though.
I tried it out but I don’t know how to get the **Tangent **vectors. What did you use? I tried the TangentBases Material expression, didn’t work.