<p>I am not sure whether <code>2</code> refers to the second line or the third line (since it is directly above it) so I will explain both derivations.</p>
<h5>For line 2</h5>
<p>(This part might not be mathematically rigorous)</p>
<p>The core problem is <strong>whether the differential and Lebesgue integral can be interchangeable.</strong> Since if we can interchange them, <span class="math-container">$\omega_m$</span> has nothing to do with <span class="math-container">$\text{d}\omega_i$</span> then the differential operator can be applied to the first term in the integrand only.</p>
<p>The interchangeability depends on the properties of the integrand. According to Lebesgue dominated convergence theorem, if <span class="math-container">$\Omega$</span> has limited Lebesgue measure (since it is defined on a sphere, so this holds) and the integrand is assumed to be piecewise continuous and the derivate (partial derivative, given <span class="math-container">$\omega_m$</span>) is bounded, then we can interchange the limit (total differential can also be represented by limits) with integral operator. The assumption usually holds in the physically based rendering context. Also note that the discontinuous part has zero measure (intuitively, the boundary of the shadow, which causes discontinuity due to visibility).</p>
<p>For further reading on this topic, please refer to: <a href="https://planetmath.org/differentiationundertheintegralsign" rel="nofollow noreferrer">differentiation-under-the-integral-sign</a> and <a href="https://math.stackexchange.com/questions/377251/interchange-differential-operator-with-lebesgue-integral">interchange-differential-operator-with-lebesgue-integral</a>.</p>
<hr />
<h5>For line 3</h5>
<p>This is just a straightforward surface radiance transport, note that:
<span class="math-container">$$
L(\omega_o, \omega_m) = \int_{\Omega}
\underbrace{L(\omega_i)}_{\text{incident radiance}}
\underbrace{\rho(\omega_o, \omega_i, \omega_m)}_{\text{BSDF}}
\underbrace{\langle \omega_i, \omega_m\rangle}_{\text{foreshortening}}
\text{d}\omega_i
$$</span>
So if you replace this into line 2, you will get line 3 when the differential operation eliminates the integral over <span class="math-container">$\omega_i$</span>.</p>

CC BY-SA 4.0
2024-07-11T06:32:51.410Z
2 refers to the second line. Thanks for your explain, learn a lot from you.
Chen
CC BY-SA 4.0
2024-07-11T03:27:40.880Z
2024-07-11T03:27:40.880Z
Enigmatisms
<p>In <a href="https://hal.inria.fr/hal-01024289/document" rel="nofollow noreferrer">Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs</a>, author said that &quot;we differentiate Equation (17)&quot;</p>
<p><a href="https://i.sstatic.net/XW7YNjqc.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XW7YNjqc.jpg" alt="equation 17" /></a></p>
<p>but how to get 2 from 1?
<a href="https://i.sstatic.net/TM0UvRSJ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/TM0UvRSJ.png" alt="eq" /></a></p>

<microfacet>
Microfacet-Based BRDFs general form
Chen
# Microfacet-Based BRDFs general form

(Asked by: username_0 on 2024-07-10)

In [Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs](https://hal.inria.fr/hal-01024289/document), author said that "we differentiate Equation (17)"

[![equation 17](https://i.sstatic.net/XW7YNjqc.jpg)](https://i.sstatic.net/XW7YNjqc.jpg)

but how to get 2 from 1?
[![eq](https://i.sstatic.net/TM0UvRSJ.png)](https://i.sstatic.net/TM0UvRSJ.png)

**Tags:** microfacet


---

## 1 answers

### Answer by username_1 on 2024-07-11. Score: 1

I am not sure whether `2` refers to the second line or the third line (since it is directly above it) so I will explain both derivations.

##### For line 2

(This part might not be mathematically rigorous)

The core problem is **whether the differential and Lebesgue integral can be interchangeable.** Since if we can interchange them, $\omega\_m$ has nothing to do with $\text{d}\omega\_i$ then the differential operator can be applied to the first term in the integrand only.

The interchangeability depends on the properties of the integrand. According to Lebesgue dominated convergence theorem, if $\Omega$ has limited Lebesgue measure (since it is defined on a sphere, so this holds) and the integrand is assumed to be piecewise continuous and the derivate (partial derivative, given $\omega\_m$) is bounded, then we can interchange the limit (total differential can also be represented by limits) with integral operator. The assumption usually holds in the physically based rendering context. Also note that the discontinuous part has zero measure (intuitively, the boundary of the shadow, which causes discontinuity due to visibility).

For further reading on this topic, please refer to: [differentiation-under-the-integral-sign](https://planetmath.org/differentiationundertheintegralsign) and [interchange-differential-operator-with-lebesgue-integral](https://math.stackexchange.com/questions/377251/interchange-differential-operator-with-lebesgue-integral).

---

##### For line 3

This is just a straightforward surface radiance transport, note that:
$$
L(\omega\_o, \omega\_m) = \int\_{\Omega}
\underbrace{L(\omega\_i)}\_{\text{incident radiance}}
\underbrace{\rho(\omega\_o, \omega\_i, \omega\_m)}\_{\text{BSDF}}
\underbrace{\langle \omega\_i, \omega\_m\rangle}\_{\text{foreshortening}}
\text{d}\omega\_i
$$
So if you replace this into line 2, you will get line 3 when the differential operation eliminates the integral over $\omega\_i$.

> **Comments:**
> **username_0**: 2 refers to the second line. Thanks for your explain, learn a lot from you.  

---

