<p>The cosine term in the rendering equation is to account the amount of light reaching the surface, and leaving it out from the rendering equation is what he refers as "complete nonsense", which is right. The original Phong model didn't have the cosine term in the rendering equation, so if you want to model the original nonsensical Phong with proper rendering equation, you need to hack it by adding the cosine denominator to the Phong BRDF.</p>

CC BY-SA 4.0
2018-05-12T13:20:58.187Z
2018-05-12T13:20:58.187Z
JarkkoL
<p>Ignoring emission and shadowing for simplicity, the <a href="https://en.wikipedia.org/wiki/Rendering_equation" rel="noreferrer">rendering equation</a> can be stripped down to:</p>

<p>$$L(x, \, \vec \omega) = \int_{\Omega}{f_r(x, \, \vec \omega^\prime, \, \vec \omega) \, (\vec \omega^\prime \cdot \vec n) \, d\vec \omega^\prime}$$</p>

<p>where $f_r$ is the BRDF and $(\vec \omega^\prime \cdot \vec n)$ is the cosine of the angle between light and surface normal.</p>

<p>For the Lambertian diffuse BRDF $\frac{\rho}{\pi}$ this is fine - we're multiplying it with the cosine, seeing Lambert's cosine law in action.</p>

<p>Now for the specular part of the Phong BRDF, you would commonly calculate a pixel's color like this:</p>

<p>$$I_{out} = I_{in} \, k_{specular} \, (\vec w \cdot \vec r)^\alpha$$</p>

<p>where $I_{in}$ is the incident light, $k_{specular}$ is the specular reflectivity of the surface, and $\alpha$ is the Phong exponent. Note the absence of $(\vec \omega^\prime \cdot \vec n)$ in this equation.</p>

<p>To use the rendering equation and end up with the same pixel value as the common Phong equation above, we'd need to write:</p>

<p>$$f^{Phong}_r(x, \, \vec \omega^\prime, \, \vec \omega) = \frac{1}{(\vec \omega^\prime \cdot \vec n)} \, k_{specular} \, (\vec w \cdot \vec r)^\alpha$$</p>

<p>Note the cosine in the denominator that cancels out the cosine in $L(x, \, \vec \omega)$.</p>

<p>In his <a href="http://www.farbrausch.de/~fg/articles/phong.pdf" rel="noreferrer">derivation of the Phong normalization factor</a>, Fabian Giesen states:</p>

<blockquote>
  <p>[...] this is the derivation for the original Phong formulation, where the $R \cdot V$ term is not multiplied by $cos \theta$. If you write that version of the Phong model as a BRDF, you end up with a $cos \theta$ in the numerator to cancel out the $cos \theta$ factor in the reflection equation. This numerator is complete nonsense physically, so the modern formulation of the Phong model removes it.</p>
</blockquote>

<p>I don't understand why he speaks about the numerator here, instead of the denominator. Is this a slip in the article, or a misunderstanding on my part?</p>

<p>What is the 'modern formulation' of Phong? What does it mean that cancelling out is 'complete nonsense physically'? With the normalization factor, $\frac{\alpha + X}{2 \pi}$ when should you use $X=1$ and when $X=2$?</p>

<p>Here is a path traced side-by-side comparison of a reflective sphere, Phong exponent 100, $X=2$ for the normalization. The left image has the cosine cancelled out, while the right image includes it, noticably darkening the borders.</p>

<p><img src="https://i.sstatic.net/FcNFnm.png" width="300" />
<img src="https://i.sstatic.net/8IstA.png" width="300" /></p>

<rendering><brdf><specular>
Phong and the Rendering Equation: What's with the cosine?
David Kuri
# Phong and the Rendering Equation: What's with the cosine?

(Asked by: username_0 on 2018-05-07)

Ignoring emission and shadowing for simplicity, the [rendering equation](https://en.wikipedia.org/wiki/Rendering_equation) can be stripped down to:

$$L(x, \, \vec \omega) = \int\_{\Omega}{f\_r(x, \, \vec \omega^\prime, \, \vec \omega) \, (\vec \omega^\prime \cdot \vec n) \, d\vec \omega^\prime}$$

where $f\_r$ is the BRDF and $(\vec \omega^\prime \cdot \vec n)$ is the cosine of the angle between light and surface normal.

For the Lambertian diffuse BRDF $\frac{\rho}{\pi}$ this is fine - we're multiplying it with the cosine, seeing Lambert's cosine law in action.

Now for the specular part of the Phong BRDF, you would commonly calculate a pixel's color like this:

$$I\_{out} = I\_{in} \, k\_{specular} \, (\vec w \cdot \vec r)^\alpha$$

where $I\_{in}$ is the incident light, $k\_{specular}$ is the specular reflectivity of the surface, and $\alpha$ is the Phong exponent. Note the absence of $(\vec \omega^\prime \cdot \vec n)$ in this equation.

To use the rendering equation and end up with the same pixel value as the common Phong equation above, we'd need to write:

$$f^{Phong}\_r(x, \, \vec \omega^\prime, \, \vec \omega) = \frac{1}{(\vec \omega^\prime \cdot \vec n)} \, k\_{specular} \, (\vec w \cdot \vec r)^\alpha$$

Note the cosine in the denominator that cancels out the cosine in $L(x, \, \vec \omega)$.

In his [derivation of the Phong normalization factor](http://www.farbrausch.de/~fg/articles/phong.pdf), Fabian Giesen states:

> [...] this is the derivation for the original Phong formulation, where the $R \cdot V$ term is not multiplied by $cos \theta$. If you write that version of the Phong model as a BRDF, you end up with a $cos \theta$ in the numerator to cancel out the $cos \theta$ factor in the reflection equation. This numerator is complete nonsense physically, so the modern formulation of the Phong model removes it.

I don't understand why he speaks about the numerator here, instead of the denominator. Is this a slip in the article, or a misunderstanding on my part?

What is the 'modern formulation' of Phong? What does it mean that cancelling out is 'complete nonsense physically'? With the normalization factor, $\frac{\alpha + X}{2 \pi}$ when should you use $X=1$ and when $X=2$?

Here is a path traced side-by-side comparison of a reflective sphere, Phong exponent 100, $X=2$ for the normalization. The left image has the cosine cancelled out, while the right image includes it, noticably darkening the borders.

![](https://i.sstatic.net/FcNFnm.png)
![](https://i.sstatic.net/8IstA.png)

**Tags:** rendering, brdf, specular


---

## 1 answers

### Answer by username_1 on 2018-05-12. Score: 2

The cosine term in the rendering equation is to account the amount of light reaching the surface, and leaving it out from the rendering equation is what he refers as "complete nonsense", which is right. The original Phong model didn't have the cosine term in the rendering equation, so if you want to model the original nonsensical Phong with proper rendering equation, you need to hack it by adding the cosine denominator to the Phong BRDF.


---

