OpenGL Anisotropic Lighting

This topic is 2126 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

It says to pick the normal vector by projecting the light vector into the normal plane.  My code for this is:

However, this seems wrong.  Suppose I have a quad of brushed metal in the xy-plane, and +y is up.  The threads run in the x-direction (1, 0, 0).  Suppose also the light vector is (0,1,0) or close to it.

This would compute the normal as (0,1,0) which just seems wrong.

Also, it seems like if you pick the normal to always be "most aligned" with the light source, your surface will be unnaturally bright.

I feel like something is missing.  Is the anisotropic lighting supposed to be weighted against the usual lambertian diffuse term (using the true geometric normal)?

Share on other sites

The only weird thing about that paper is the fact that the light vector L is pointing toward the light source instead of away from it.  Otherwise, it pretty much makes sense.

In your example, the light is coming directly down the plane, but it's still perpendicular to the thread vector.  Think of each thread as a cylindrical mirror.  Since the threads themselves are infinitely small, the only reflected light you get from them is being reflected off the normal that is most aligned with the camera vector.  If you're looking straight on to one of the threads, the normal should be pointing directly back at you.

Share on other sites

Well that certainly looks...old. At a quick glance it looks similar to Kajiya-Kay, which is a non-physically-based BRDF used for hair and fur. If you're going for brushed metal, I would suggest using a microfacet BRDF instead. It's possible to derive an anisotropic version of an isotropic BRDF, with a bit of math. Otherwise Ashikhmin-Shirley is a good choice if you're looking for something that's ready to implement. It's physically-based, and uses a Blinn-Phong distribution which makes it an easy transition if you're using Blinn-Phong for isotropic materials.

The only weird thing about that paper is the fact that the light vector L is pointing toward the light source instead of away from it.  Otherwise, it pretty much makes sense.

Why would you think that it's weird? Just about every BRDF is formulated in terms of a vector pointing from the surface to the light source, and a vector pointing from the surface to the eye.

Share on other sites

Just seemed counter-intuitive to me is all since I figured the convention would be to follow the trajectory of the photons as them came from the light source.

• 9
• 17
• 10
• 11
• 18