# Phong model BRDF

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

## Recommended Posts

Can someone explain the next quote from Real-Time Rendering, section 7.6?

Why is the outgoing radiance equal to 0 when the angle between n and l is <= 0?

The author then explains a few things, getting to the next BRDF which I understand:

(equation 7.46)

But right after that, he says: "The directional-hemispherical reflectance of the specular term can now be calculated. It turns out that when Theta = 0, it reaches a maximum value of 2*Cspec / (m+2)."

How did he get that? First, theta isn't present in equation 7.46, and second, I can't see any possible way to get to the term he wrote.

Here's the whole quote from the book

Edited by Pilpel

##### Share on other sites

Why is the outgoing radiance equal to 0 when the angle between n and l is <= 0?

Because the surface is back-facing from the light's point of view. The rendering equation itself -- which the BRDF plugs into -- multiplies the entire BRDF by N?L, so having this condition within the BRDF is actually superfluous. I guess it's just mentioned because most realtime renderers actually don't implement the rendering equation properly, so that condition is required to avoid getting specular highlights on the wrong side of an object.

As for the rest, this cosm term seems weird. Phong is based around (L?reflect(V,N))m, which is equivalent to cos(?r)m, where ?r is the angle between the reflection direction and the light direction...

##### Share on other sites

I don't get it. When does theta ever become negative? When it's 0, n and l point to the same direction, so how can the surface be backfacing?

One more question: in the shader code itself, gl_FragColor will eventually be Lo (outgoing radiance), or the BRDF itself?

Edited by Pilpel

##### Share on other sites

I don't get it. When does theta ever become negative? When it's 0, n and l point to the same direction, so how can the surface be backfacing?

One more question: in the shader code itself, gl_FragColor will eventually be Lo (outgoing radiance), or the BRDF itself?

Oh, hahah I typed all that and didn't notice the problem...

It should actually be testing whether cos(?) is above or below zero -- i.e. whether ? is below or above 90º!

Yeah in a traditional Phong shader, Lo is the result.

##### Share on other sites

Damn with this book. It's supposed to be a standard yet it fails sometimes. I spent too much time figuring out why the hell he notes ? <= 0.

##### Share on other sites

Why is the outgoing radiance equal to 0 when the angle between n and l is <= 0?

Because the surface is back-facing from the light's point of view. The rendering equation itself -- which the BRDF plugs into -- multiplies the entire BRDF by N?L, so having this condition within the BRDF is actually superfluous. I guess it's just mentioned because most realtime renderers actually don't implement the rendering equation properly, so that condition is required to avoid getting specular highlights on the wrong side of an object.

As for the rest, this cosm term seems weird. Phong is based around (L?reflect(V,N))m, which is equivalent to cos(?r)m, where ?r is the angle between the reflection direction and the light direction...

It's not cosm, it's cosm?r, where ?r is the angle between the light direction and the reflected view direction.

##### Share on other sites

That makes a hell of a lot more sense...  :wub:

##### Share on other sites

Hi again, although I don't like this chapter of the book it does explain mandatory stuff.

A few questions:

1. What's a "reflectance value"? As mentioned twice in:

2. If the "specular term" is the whole right term in the BRDF, then what's Rspec? (mentioned as "Rspec of the specular term")

3. Why does the BRDF in equation 7.45 becomes too bright at glancing angles? ?i is the angle between the normal and the light, not the normal and the view direction. Shouldn't it be glancing angles if viewed from the light source then?

4. How did the author get to equation 7.47 in here?

Edited by Pilpel

1. 1
2. 2
Rutin
20
3. 3
khawk
18
4. 4
A4L
14
5. 5

• 12
• 16
• 26
• 10
• 44
• ### Forum Statistics

• Total Topics
633763
• Total Posts
3013728
×