<p>The rendering equation is the standard equation that people use to approximate geometric optics in computer graphics. The equation reads:</p>
<p><span class="math-container">$$L(x, \omega_o) = L_e(x, \omega_o) + \int_{\Omega_x}f(\omega_o, x, \omega_i) L_i(x, \omega_i)\cos\theta_i\,d\omega_i,$$</span></p>
<p>where <span class="math-container">$L$</span> is the radiance function (we want to find this function to compute the radiance arriving at the virtual camera sensors in the scene corresponding to specific pixels). <span class="math-container">$L_e$</span> is the emitted radiance from surface point <span class="math-container">$x$</span> in direction <span class="math-container">$\omega_o$</span> and it is non-zero only for light-sources - it basically encodes the strength/colour of light sources in the scene. <span class="math-container">$\Omega_x$</span> is the upper hemisphere around the normal <span class="math-container">$N_x$</span> at point <span class="math-container">$x$</span>. The <a href="https://en.wikipedia.org/wiki/Lambert%27s_cosine_law" rel="nofollow noreferrer">Lambertian factor</a> is <span class="math-container">$\cos\theta_i = \omega_i \cdot N_x$</span> where <span class="math-container">$\omega_i$</span> is a direction from <span class="math-container">$\Omega_x$</span>. It accounts for light getting spread out over a larger area for larger angles with the normal. <span class="math-container">$L_i(x, \omega_i)$</span> is the radiance arriving at <span class="math-container">$x$</span> from direction <span class="math-container">$\omega_i$</span>. In vaccum we have <span class="math-container">$L(\gamma(x,\omega_i), -\omega_i) = L_i(x,\omega_i)$</span>, where <span class="math-container">$\gamma$</span> is the ray-tracing function. Finally <span class="math-container">$f$</span> is the <a href="https://en.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function" rel="nofollow noreferrer">brdf</a>: it describes the light scattering properties of the surfaces in the scene - e.g. wood scatters light differently than metal or an ideal mirror.</p>
<p>As I understand it, you are only interested in one bounce reflected light, this is accounted by changing <span class="math-container">$L_i$</span> to <span class="math-container">$L_e$</span> and ignoring the direct emission:</p>
<p><span class="math-container">$$L(x, \omega_o) = \int_{\Omega_x}f(\omega_o, x, \omega_i) L_e(r(x,\omega_i), -\omega_i)\cos\theta_i\,d\omega_i$$</span>,</p>
<p>and from now on I'll set <span class="math-container">$y=r(x,\omega_i)$</span> for simplicity. You also seem to be considering a single directional light, which amounts to setting a Dirac delta light source: <span class="math-container">$L_e(y,-\omega_i) = \delta(l - \omega_i)$</span>. Setting <span class="math-container">$v=\omega_o, \, n=N_x$</span> and plugging into the equation yields:</p>
<p><span class="math-container">$$L(x, v) = f(v, x, l)(n \cdot l)$$</span></p>
<p>The behaviour wrt the angle between <span class="math-container">$n$</span> and <span class="math-container">$l$</span> in the above depends on <span class="math-container">$f$</span>. Let us consider some examples. The specular part of the Phong brdf is: <span class="math-container">$f(v,x,l) = C\frac{(r\cdot v)^{\alpha}}{n\cdot l}$</span> which results in:</p>
<p><span class="math-container">$$L(x, v) = C(r\cdot v)^{\alpha}$$</span></p>
<p>and thus if <span class="math-container">$r=v$</span> then the angle between <span class="math-container">$n$</span> and <span class="math-container">$l$</span> doesn't affect the radiance. Now consider the energy-conserving modification of the Phong brdf: <span class="math-container">$f(v,x,l) = C(r\cdot v)^{\alpha}$</span>, which results in:</p>
<p><span class="math-container">$$L(x, v) = C(r\cdot v)^{\alpha}(n\cdot l)$$</span></p>
<p>If <span class="math-container">$r=v$</span> and <span class="math-container">$\theta = \angle (n, l)$</span> then if <span class="math-container">$\theta_1&lt;\theta_2$</span> it follows that <span class="math-container">$L_1&gt;L_2$</span>. Now consider some imaginary brdf <span class="math-container">$f(v,x,l) = C\frac{(r\cdot v)^{\alpha}}{(n\cdot l)^2}$</span>, then you have:</p>
<p><span class="math-container">$$L(x, v) = C\frac{(r\cdot v)^{\alpha}}{n\cdot l}$$</span></p>
<p>and if <span class="math-container">$r=v$</span> it follows that <span class="math-container">$\theta_1&lt;\theta_2 \implies L_1&lt;L_2$</span>. From this you can conclude that you can get all possible cases based on your choice of brdf. My guess is that for most physically plausible brdfs however the following would hold: <span class="math-container">$\theta_1&lt;\theta_2 \implies L_1&gt;L_2$</span> due to <a href="https://en.wikipedia.org/wiki/Lambert%27s_cosine_law" rel="nofollow noreferrer">Lambert's cosine law</a>.</p>

CC BY-SA 4.0
2022-01-06T22:17:30.407Z
Please don't use comments for elongated discussions; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/132951/discussion-on-answer-by-lightxbulb-specular-reflection-with-different-viewing-di).
wychmaster
CC BY-SA 4.0
2022-01-04T13:50:45.697Z
2022-01-04T13:57:29.237Z
2022-01-04T13:57:29.237Z
lightxbulb
<p>Suppose <span class="math-container">$P_1$</span> and <span class="math-container">$P_2$</span> two different points on surface. And let</p>
<ul>
<li><span class="math-container">$l$</span>: be the light source direction,</li>
<li><span class="math-container">$n$</span>: normal vector</li>
<li><span class="math-container">$r$</span>: specular reflection direction</li>
<li><span class="math-container">$v$</span>: viewing direction .</li>
</ul>
<p>In case 1 (at <span class="math-container">$P_1$</span>) the angel between <span class="math-container">$l$</span> and <span class="math-container">$n$</span> is <span class="math-container">$\theta_1.$</span> And specular reflection <span class="math-container">$r$</span> coincide with <span class="math-container">$v.$</span> So we get maximum specular intensity <span class="math-container">$I_1$</span>,say.
Like the image below:</p>
<p><img src="https://i.sstatic.net/8NOIG.jpg" alt="enter image description here" /></p>
<p>In case 2 (at <span class="math-container">$P_2$</span>) <span class="math-container">$l$</span> is positioned as case 1. But <span class="math-container">$n$</span> is different on <span class="math-container">$P_2$</span>. The angle between <span class="math-container">$l$</span> and <span class="math-container">$n$</span> is <span class="math-container">$\theta_2.$</span> And in this case also specular reflection <span class="math-container">$r$</span> coincide with <span class="math-container">$v.$</span>  So --let's say that-- the maximum specular intensity is <span class="math-container">$I_2$</span>. In this case we have different angle between <span class="math-container">$n$</span> and <span class="math-container">$l,$</span> different <span class="math-container">$r,$</span> different <span class="math-container">$v$</span> from case1.</p>
<p>Like the image below :</p>
<p><img src="https://i.sstatic.net/sQbMy.jpg" alt="enter image description here" /></p>
<p>My question is specular intensity <span class="math-container">$I_1$</span> has greater intensity than <span class="math-container">$I_2$</span> or <span class="math-container">$I_1$</span> and <span class="math-container">$I_2$</span> are equal ?</p>

CC BY-SA 4.0
2022-01-04T08:57:23.303Z
It depends on the brdf.
lightxbulb
CC BY-SA 4.0
2022-01-04T09:47:51.110Z
@lightxbulb it's not possible to say if there is greater angle between n and l then intensity is less?
S. M.
CC BY-SA 4.0
2022-01-04T11:02:30.890Z
That's the case for a Lambertian where you get a $\frac{k_d}{\pi}\cos\theta$ ($\cos\theta = \vec{n}\cdot\vec{l}$) modulating factor in the rendering equation. However if I pick a different brdf this doesn't have to be the case anymore.
lightxbulb
CC BY-SA 4.0
2022-01-04T11:14:30.903Z
@lightxbulb I don't know brdf. I know basic specular reflection. If there is greater angle between n and l then angle between r and n also increase. Then intensity also less. Am I correct?
S. M.
CC BY-SA 4.0
2022-01-04T12:15:44.610Z
See https://en.m.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function Idk what brdf you mean by "basic specular reflection". If you mean ideal mirrors then the angle is irrelevant. If you mean (Blinn-)Phong then the angle is again irrelevant if $v$ and $r$ coincide. If you mean modified (Blinn-)Phong such that it is energy conserving (i.e. doesn't cancel $\cos\theta$ from the rendering equation), then the modulating factor in case 2 is smaller.
lightxbulb
CC BY-SA 4.0
2022-01-04T12:19:18.687Z
@lightxbulb "If you mean (Blinn-)Phong then the angle is again irrelevant if v and r coincide. "---- why angle is irrelevant?
S. M.
CC BY-SA 4.0
2022-01-04T12:32:00.140Z
Because for Phong the specular modulation factor is $(\vec{v}\cdot\vec{r})^{\alpha}$ and in your case the dot is one in both of your cases. The Blinn-Phong variant has a modulation factor of $(\vec{h}\cdot\vec{n})^{\alpha}$, and for $r=v$ it follows that $h=n$, so the dot is one once again in your cases. The modified Phong variant (modified to be energy conserving) has a modulating factor of $(\vec{v}\cdot\vec{r})^{\alpha}(\vec{n}\cdot\vec{l})$ so there your conjecture is correct. On the other hand, for an arbitrary brdf your assumption doesn't hold.
lightxbulb
CC BY-SA 4.0
2022-01-04T12:50:47.447Z
@lightxbulb you are right vector product v. r =1(if r or v is unit vector) but dot product of n. l is different for both cases because angle is different, so intensity is different?
S. M.
CC BY-SA 4.0
2022-01-04T12:52:00.680Z
It doesn't matter that $\vec{l}$ is different if the modulating term in the rendering equation comes out to be $(\vec{r}\cdot\vec{v})^{\alpha}$ with the specular part of the Phong brdf, clearly only the angle between $\vec{r}$ and $\vec{v}$ matters in that case. Similarly for $(\vec{h}\cdot\vec{n})^\alpha$ with the extra step that one must show $\vec{v}=\vec{r}\implies \vec{h}=\vec{n}$. As I said, it depends on the brdf. Your conjecture is correct for the modifications of (Blinn-)Phong that are energy conserving.
lightxbulb
CC BY-SA 4.0
2022-01-04T13:02:55.970Z
@lightxbulb everything looks fine according to formula depending on r and v. But I  have failed to convinced myself that   when angle between n and l is less or greater always we get same intensity when v and r is coincide.
S. M.
CC BY-SA 4.0
2022-01-04T13:10:59.287Z
"But I have failed to convinced myself that when angle between n and l is less or greater always we get same intensity when v and r is coincide." - because you do not always get the same intensity. It depends on the chosen brdf.
lightxbulb
CC BY-SA 4.0
2022-01-04T13:14:55.417Z
@lightxbulb if I  choose both cases same brdf then we also get same intensity?
S. M.
CC BY-SA 4.0
2022-01-04T13:20:47.770Z
My point is that you choose the same brdf in both cases, but nevertheless depending on the brdf you may get all 3 possibilities: 1) $\theta_1 < \theta_2 \implies I_1>I_2$, 2) $\forall \theta_1, \theta_2, I_1 = I_2$, 3) $\theta_1 > \theta_2 \implies I_1>I_2$.
lightxbulb
CC BY-SA 4.0
2022-01-04T13:24:57.713Z
@lightxbulb your 3 cases should be $I_1<I_2$?
S. M.
<lighting><shading><global-illumination><specular><diffuse>
Specular reflection with different viewing direction where reflection direction and viewing direction coincide
S. M.
# Specular reflection with different viewing direction where reflection direction and viewing direction coincide

(Asked by: username_0 on 2022-01-03)

Suppose $P\_1$ and $P\_2$ two different points on surface. And let

* $l$: be the light source direction,
* $n$: normal vector
* $r$: specular reflection direction
* $v$: viewing direction .

In case 1 (at $P\_1$) the angel between $l$ and $n$ is $\theta\_1.$ And specular reflection $r$ coincide with $v.$ So we get maximum specular intensity $I\_1$,say.
Like the image below:

![enter image description here](https://i.sstatic.net/8NOIG.jpg)

In case 2 (at $P\_2$) $l$ is positioned as case 1. But $n$ is different on $P\_2$. The angle between $l$ and $n$ is $\theta\_2.$ And in this case also specular reflection $r$ coincide with $v.$ So --let's say that-- the maximum specular intensity is $I\_2$. In this case we have different angle between $n$ and $l,$ different $r,$ different $v$ from case1.

Like the image below :

![enter image description here](https://i.sstatic.net/sQbMy.jpg)

My question is specular intensity $I\_1$ has greater intensity than $I\_2$ or $I\_1$ and $I\_2$ are equal ?

**Tags:** lighting, shading, global-illumination, specular, diffuse

> **Comments:**
> **username_1**: It depends on the brdf.  
> **username_0**: @username_1 it's not possible to say if there is greater angle between n and l then intensity is less?  
> **username_1**: That's the case for a Lambertian where you get a $\frac{k_d}{\pi}\cos\theta$ ($\cos\theta = \vec{n}\cdot\vec{l}$) modulating factor in the rendering equation. However if I pick a different brdf this doesn't have to be the case anymore.  
> **username_0**: @username_1 I don't know brdf. I know basic specular reflection. If there is greater angle between n and l then angle between r and n also increase. Then intensity also less. Am I correct?  
> **username_1**: See https://en.m.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function Idk what brdf you mean by "basic specular reflection". If you mean ideal mirrors then the angle is irrelevant. If you mean (Blinn-)Phong then the angle is again irrelevant if $v$ and $r$ coincide. If you mean modified (Blinn-)Phong such that it is energy conserving (i.e. doesn't cancel $\cos\theta$ from the rendering equation), then the modulating factor in case 2 is smaller.  
> **username_0**: @username_1 "If you mean (Blinn-)Phong then the angle is again irrelevant if v and r coincide. "---- why angle is irrelevant?  
> **username_1**: Because for Phong the specular modulation factor is $(\vec{v}\cdot\vec{r})^{\alpha}$ and in your case the dot is one in both of your cases. The Blinn-Phong variant has a modulation factor of $(\vec{h}\cdot\vec{n})^{\alpha}$, and for $r=v$ it follows that $h=n$, so the dot is one once again in your cases. The modified Phong variant (modified to be energy conserving) has a modulating factor of $(\vec{v}\cdot\vec{r})^{\alpha}(\vec{n}\cdot\vec{l})$ so there your conjecture is correct. On the other hand, for an arbitrary brdf your assumption doesn't hold.  
> **username_0**: @username_1 you are right vector product v. r =1(if r or v is unit vector) but dot product of n. l is different for both cases because angle is different, so intensity is different?  
> **username_1**: It doesn't matter that $\vec{l}$ is different if the modulating term in the rendering equation comes out to be $(\vec{r}\cdot\vec{v})^{\alpha}$ with the specular part of the Phong brdf, clearly only the angle between $\vec{r}$ and $\vec{v}$ matters in that case. Similarly for $(\vec{h}\cdot\vec{n})^\alpha$ with the extra step that one must show $\vec{v}=\vec{r}\implies \vec{h}=\vec{n}$. As I said, it depends on the brdf. Your conjecture is correct for the modifications of (Blinn-)Phong that are energy conserving.  
> **username_0**: @username_1 everything looks fine according to formula depending on r and v. But I  have failed to convinced myself that   when angle between n and l is less or greater always we get same intensity when v and r is coincide.  
> **username_1**: "But I have failed to convinced myself that when angle between n and l is less or greater always we get same intensity when v and r is coincide." - because you do not always get the same intensity. It depends on the chosen brdf.  
> **username_0**: @username_1 if I  choose both cases same brdf then we also get same intensity?  
> **username_1**: My point is that you choose the same brdf in both cases, but nevertheless depending on the brdf you may get all 3 possibilities: 1) $\theta_1 < \theta_2 \implies I_1>I_2$, 2) $\forall \theta_1, \theta_2, I_1 = I_2$, 3) $\theta_1 > \theta_2 \implies I_1>I_2$.  
> **username_0**: @username_1 your 3 cases should be $I_1<I_2$?  

---

## 1 answers

### Answer by username_1 on 2022-01-04. Score: 1 | Accepted answer

The rendering equation is the standard equation that people use to approximate geometric optics in computer graphics. The equation reads:

$$L(x, \omega\_o) = L\_e(x, \omega\_o) + \int\_{\Omega\_x}f(\omega\_o, x, \omega\_i) L\_i(x, \omega\_i)\cos\theta\_i\,d\omega\_i,$$

where $L$ is the radiance function (we want to find this function to compute the radiance arriving at the virtual camera sensors in the scene corresponding to specific pixels). $L\_e$ is the emitted radiance from surface point $x$ in direction $\omega\_o$ and it is non-zero only for light-sources - it basically encodes the strength/colour of light sources in the scene. $\Omega\_x$ is the upper hemisphere around the normal $N\_x$ at point $x$. The [Lambertian factor](https://en.wikipedia.org/wiki/Lambert%27s_cosine_law) is $\cos\theta\_i = \omega\_i \cdot N\_x$ where $\omega\_i$ is a direction from $\Omega\_x$. It accounts for light getting spread out over a larger area for larger angles with the normal. $L\_i(x, \omega\_i)$ is the radiance arriving at $x$ from direction $\omega\_i$. In vaccum we have $L(\gamma(x,\omega\_i), -\omega\_i) = L\_i(x,\omega\_i)$, where $\gamma$ is the ray-tracing function. Finally $f$ is the [brdf](https://en.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function): it describes the light scattering properties of the surfaces in the scene - e.g. wood scatters light differently than metal or an ideal mirror.

As I understand it, you are only interested in one bounce reflected light, this is accounted by changing $L\_i$ to $L\_e$ and ignoring the direct emission:

$$L(x, \omega\_o) = \int\_{\Omega\_x}f(\omega\_o, x, \omega\_i) L\_e(r(x,\omega\_i), -\omega\_i)\cos\theta\_i\,d\omega\_i$$,

and from now on I'll set $y=r(x,\omega\_i)$ for simplicity. You also seem to be considering a single directional light, which amounts to setting a Dirac delta light source: $L\_e(y,-\omega\_i) = \delta(l - \omega\_i)$. Setting $v=\omega\_o, \, n=N\_x$ and plugging into the equation yields:

$$L(x, v) = f(v, x, l)(n \cdot l)$$

The behaviour wrt the angle between $n$ and $l$ in the above depends on $f$. Let us consider some examples. The specular part of the Phong brdf is: $f(v,x,l) = C\frac{(r\cdot v)^{\alpha}}{n\cdot l}$ which results in:

$$L(x, v) = C(r\cdot v)^{\alpha}$$

and thus if $r=v$ then the angle between $n$ and $l$ doesn't affect the radiance. Now consider the energy-conserving modification of the Phong brdf: $f(v,x,l) = C(r\cdot v)^{\alpha}$, which results in:

$$L(x, v) = C(r\cdot v)^{\alpha}(n\cdot l)$$

If $r=v$ and $\theta = \angle (n, l)$ then if $\theta\_1<\theta\_2$ it follows that $L\_1>L\_2$. Now consider some imaginary brdf $f(v,x,l) = C\frac{(r\cdot v)^{\alpha}}{(n\cdot l)^2}$, then you have:

$$L(x, v) = C\frac{(r\cdot v)^{\alpha}}{n\cdot l}$$

and if $r=v$ it follows that $\theta\_1<\theta\_2 \implies L\_1<L\_2$. From this you can conclude that you can get all possible cases based on your choice of brdf. My guess is that for most physically plausible brdfs however the following would hold: $\theta\_1<\theta\_2 \implies L\_1>L\_2$ due to [Lambert's cosine law](https://en.wikipedia.org/wiki/Lambert%27s_cosine_law).

> **Comments:**
> **username_2**: Please don't use comments for elongated discussions; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/132951/discussion-on-answer-by-username_1-specular-reflection-with-different-viewing-di).  

---

