Explain the shape of a specular lobe

Started by
5 comments, last by MJP 9 years, 3 months ago

In a BRDF, the specular lobe represents the directions towards which light is going to be reflected.

G41cH.png

This OpenGL tutorial presents a simple model to "control the width of the specular lobe", by using the value pow(cosAlpha,5).

I don't see how to relate this formula to the shape of the lobe.
How to transform this formula in order to obtain the function who, when plotted, will make the shape of the specular lobe appear ?

Advertisement

Well, a function that you can plot won't really help you much when you're trying to do any sort of graphics programming. But if you *really* want a plot-able function, you can always take the phong equation for specular highlights, which goes something like

finalSpecColor = specColor * pow(dot(normal, halfAngle), specTerm)

where

halfAngle = normalize(viewDirection+lightDirection)

Once you have that, you can easily write a little program that steps through a bunch of different possible view directions on the unit circle and comes up with a simple plot of the outcome.

EDIT: I went ahead and made a quick little thing that shows the phong specular lobe for a given specular power. Mouse over to change the reflection direction biggrin.png https://dl.dropboxusercontent.com/u/45553463/thing/index.html

I'm sorry about any spelling or grammar mistakes or any undue brevity, as I'm most likely typing on my phone

"Hell, there's more evidence that we are just living in a frequency wave that flows in harmonic balance creating the universe and all its existence." ~ GDchat


EDIT: I went ahead and made a quick little thing that shows the phong specular lobe for a given specular power. Mouse over to change the reflection direction https://dl.dropboxusercontent.com/u/45553463/thing/index.html

Excellent, that is what I was looking for. Thanks a lot and congratulations for the swift prototyping.

For the sake of the original question I tried to plot the formula with Wolfram Alpha, but the results are not what I expected.

Simplified formula:

http://www.wolframalpha.com/input/?i=polar+plot+c+%3D+cos%280.2+%2B+0.5*theta%29%2C+m%3Dmax%28c%2C0%29%2C+r%3Dpow%28m%2C5%29

Formula with "named parameters" (could not be parsed):

http://www.wolframalpha.com/input/?i=polar+plot+l+%3D+0.5%2C+v+%3D+theta%2C+h+%3D+%28l%2Bv%29%2F2%2C+c+%3D+cos%28h%29%2C+m%3Dmax%28c%2C0%29%2C+r%3Dpow%28m%2C5%29

The results look about right, if you take the x-axis to be the surface normal, and the specular power to be around 5 to 8 or so, it looks about right.

I'm sorry about any spelling or grammar mistakes or any undue brevity, as I'm most likely typing on my phone

"Hell, there's more evidence that we are just living in a frequency wave that flows in harmonic balance creating the universe and all its existence." ~ GDchat

The results look about right, if you take the x-axis to be the surface normal, and the specular power to be around 5 to 8 or so, it looks about right.

Ok, thanks for the confirmation.

I would also highly suggest playing around with BRDF Explorer, which will show you both 2D and 3D plots of your BRDF in real-time based on your GLSL code.

This topic is closed to new replies.

Advertisement