Anisotropic vs Isotropic Surfaces

Note: This post may become part of a larger discussion at some point in regards to more advanced 3D surfaces. At this time, I just wanted to get some thoughts recorded.

Sounds Fancy!

In some cases, I’m convinced that people throw out the word “anisotropy” (or “Anisotropy Specularity”) because it sounds big and complicated. While the shader code to accomplish it is somewhat more complex than the standard 3D surface, the explanation of what it means is actually pretty simple.

Anisotropic surfaces are surfaces which look different based on the angle you are viewing them from. A couple of real-world examples would be brushed metal and suede leather. If you look at a piece of suede in a room where there is a distinct light source (window, lamp, etc.) and spin it slowly around, the sheen of the material changes. You can most easily see this if you first brush half of the patch of suede in one direction and the other half in the opposite direction.

In the interest of completeness, isotropic surfaces look the same no matter what angle you view them at. In that same room, if you have a smooth plastic plate, turning it around won’t change the look of the surface or how light reflects from it.

Anisotropy and You

In 3D graphics, anisotropy is most commonly used with specular reflections ( if that term is unfamiliar to you, see my discussion of Diffuse, Specular, and Ambient surface settings ). Shaders (aka materials) which have an anisotropic specular model allow you to set different values based on the relationship between the camera, the surface, and the light sources. So you might have a surface which has a Glossiness value of 30% in one direction, but 90% if the light is reflecting in a different direction.

You could also have a shader which allows for variations in the diffuse surface values. For instance the special car paints that you see on show cars (or sometimes on the street) where the car “changes color” as it passes by.

It Isn’t Broken

One thing to be aware of, though. These settings may not work on all objects. The reason is that most shaders rely on the UV Mapping that was done for the object. In a simple case, the shader determines if the light’s reflection is closer to the orientation of the U axis or the V axis, and makes choices about which settings to use based on that result.

If you’re wondering why that matters, consider a sword blade. The blade is modeled using many polygons which define the length, width, and thickness of the blade. When the model creator makes the object, they apply a UV Mapping to it. During that mapping, they decide whether to have the U axis refer to the width of the blade or the length of the blade.* This all happens long before you’re ever setting up your scene, and (without re-mapping the blade yourself) there isn’t anything you can do about it. Let’s say they chose to extend the U axis across the blade and the V axis extends the length of the blade.

You apply a shader which is written to use the “Specular 1” values when light reflects along the U axis, but chooses the “Specular 2” values when the light is reflecting closer to the V axis. You set the settings such Specular 1 will create stronger highlights, but be more spread out along the surface, while Specular 2 creates smaller, more constrained highlights, but they aren’t as strong. Rather than getting interesting long highlights when the blade is viewed along it’s length, you’ll get the stronger highlights when the blade is viewed across it’s width.

In keeping with proper Internet protocol, it is now time to go to the site for the vendor who created the item or the tool that you’re using to render and rant about how their implementation of Anisotropy is obviously broken! For good measure, be sure to link to the Renderman reference shaders or (even better) link to Gregory Ward’s “Measuring and Modeling Anisotropic Reflection“!

What’s that? You’re not into creating Internet drama? “Big deal, just switch the settings,” you reply.

That’s fine, that will work in this case. But the decision about how the U and V axes of the surface map apply to the model doesn’t have to conform to anything about the model. The original creator of the model may have wanted to paint a dragon spiraling around the blade’s length. To make it easier for themselves, they twisted the UV map 30 degrees around the object. Now there is no correlation to the length of the blade and either the U or V axis.

Heading to the Tropics

If this makes your head hurt, don’t worry. In most cases you don’t need to be that concerned about whether a surface should be Anisotropic or Isotropic. And when the difference might matter, the creator of the object may have considered that fact when they made it. However, I thought it might help to understand what the term means and why it can (sometimes) be hard to achieve the effect you were hoping for using it.

* Technically they could choose the thickness of the blade for the U or V axis as well, but that would be silly; so let’s not go there.