Anisotropic Lighting

Started by
2 comments, last by NickW 10 years, 7 months ago

I'm reading this:

ftp://ftp.sgi.com/opengl/contrib/blythe/advanced99/notes/node154.html

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

normalV = normalize(lightVecV - dot(lightVecV, threadDirV)*threadDirV);

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)?

-----Quat
Advertisement

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.

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.

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.

This topic is closed to new replies.

Advertisement