<p>I do not have a derivation but i can explain the reasoning behind its usage.</p>

<p>On the left side is a (monte carlo) estimator for the rendering equation. It states the very same thing that the rendering equation states but on a finite number of discrete samples.</p>

<p>on the right side we have the $L_i(l_k)$ factor separated and "integrated" on its own.
This approximation holds true when $L_i(l_k)$ is a constant, since $\sum_{k}f(k)\times n = n \times\sum_{k}f(k)$ - and, likewise, $\int_{k}f(k)\times n\space dk = n\times\int_{k}f(k)dk$ - when $n$ is a constant.</p>

<p>$L_i(l_k)$ can be though of the colour of the incoming light and $\int_{k}f(l_k,v)dk$ can be thought of as the intensity of the reflected light. multiplying those together you get that now you can precompute $\int_{k}L_i(l_k)dk$, saving a lot of time in either texture lookups (in the case of sky / environment lighting / screen space ray marching) or raytracing calculations.</p>

<p>However, since $L_i(l_k)$ is usually not a constant, this integral is not separable. Yet, in some cases (like when dealing with diffuse lighting or, more specifically, diffuse ambient lighting), the information that $f(l_k,v)$ carries is low-frequency enough that it can reasonably be approximated as a constant with respect to the distribution of $L_i(l_k)$. Experimentally, it can be shown that the final result is not too different from what you would expect.</p>

CC BY-SA 3.0
2018-01-12T00:23:22.747Z
I'm missing the extra 1/N in your explanation.
user8469759
CC BY-SA 3.0
2018-01-12T03:14:44.627Z
@user8469759 the 1/N is implicit in the integrals. it comes from "averaging" samples in numerical integration
Sebastián Mestre
CC BY-SA 3.0
2018-01-12T10:30:21.793Z
Still, there's one more factor 1/N. Also I agree the BRDF is almost constant in realistic cases, but I wouldn't be sure of the $cos$ factor and the probability $p$ due to the importance sampling process.
user8469759
CC BY-SA 3.0
2018-01-14T02:00:32.393Z
those are meant to be "distributed" into the sigma notation sums, that is why there are parentheses. they should really be interpreted as integrals.
Sebastián Mestre
CC BY-SA 3.0
2018-02-06T15:57:15.587Z
Hi, what do you mean by "distributed"? could you elaborate that?
user8469759
CC BY-SA 3.0
2018-02-22T18:41:56.520Z
Hi, I'm sorry to bring this up again. I'm noticing that your explanation, for which I've managed to use as inspiration to work out some math, is missing the $\cos$ factor. Would your splitting explanation still be valid?
user8469759
CC BY-SA 3.0
2018-02-22T19:25:35.480Z
@user8469759 oh i missed that in my explanation. I might be wrong but: Similarly to the $1/N$, i think it should be kept on both sides. This is because the $\cos$ is sort of a conversion from one domain of light direction to another. You can think of it like when you do substitution while solving an integral; you should keep the "$du/dx$"
Sebastián Mestre
CC BY-SA 3.0
2018-02-22T19:54:23.800Z
Not sure I'm following
user8469759
CC BY-SA 3.0
2018-02-22T23:01:17.830Z
The $\cos\theta$ is a conversion factor from the light incoming from direction $\theta$ to the intensity of light projected on the surface.
Sebastián Mestre
CC BY-SA 3.0
2018-02-23T10:32:13.990Z
I can understand the meaning but my point is that Karis formula doesn't take into account that when he splits the formula. Also, if $f_r$ is low frequency, which means essentialy the lobe looks more and more a diffuse one, the cosine factor would change that shape hence the splitting can't be applied anymore. You could though apply the splitting if the light is low frequency, in the sense that the intensity doesn't change much with the direction.
user8469759
CC BY-SA 3.0
2018-01-11T21:44:28.813Z
2018-01-11T21:44:28.813Z
Sebastián Mestre
<p>In <a href="http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_slides.pdf" rel="nofollow noreferrer">these</a> slides, specifically page 11, the following formula is reported:</p>

<p>$$
\frac{1}{N} \sum_{k=1}^N \frac{L_i(l_k)f(l_k,v)\cos(\theta_{l_k})}{p(l_k,v)} \approx \left( \frac{1}{N} \sum_{k=1}^N L_i(l_k) \right) \left( \frac{1}{N} \sum_{k=1}^N  \frac{f(l_k,v)\cos(\theta_{l_k})}{p(l_k,v)} \right)
$$</p>

<p>The formula above should be an approximation of the rendering equations. I'm looking for a paper that explains how that formula is derived, I cannot manage to find neither the title of a paper (other than the name "Dimitar" mentioned in the same page I pointed out).</p>

<p>I've done some research about some possible method that would justify. <a href="https://math.stackexchange.com/questions/337643/split-up-sum-of-products-suma-i-b-i-approx1-n-suma-i-sumb-i-for-uncor">This</a> is the closest thing I managed to find, however there's some hypothesis that doesn't seem to me fits.</p>

CC BY-SA 3.0
2018-01-11T22:30:30.317Z
"Dimitar" refers to the [presentation by Dimitar Lazarov](http://blog.selfshadow.com/publications/s2013-shading-course/lazarov/s2013_pbs_black_ops_2_slides_v2.pdf), earlier in the same SIGGRAPH course. See page 21 there for the "split approximation".
Nathan Reed
<mathematics><shading>
Paper for the approximation formula provided by Brian Karis
user8469759
# Paper for the approximation formula provided by Brian Karis

(Asked by: username_0 on 2018-01-11)

In [these](http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_slides.pdf) slides, specifically page 11, the following formula is reported:

$$
\frac{1}{N} \sum\_{k=1}^N \frac{L\_i(l\_k)f(l\_k,v)\cos(\theta\_{l\_k})}{p(l\_k,v)} \approx \left( \frac{1}{N} \sum\_{k=1}^N L\_i(l\_k) \right) \left( \frac{1}{N} \sum\_{k=1}^N \frac{f(l\_k,v)\cos(\theta\_{l\_k})}{p(l\_k,v)} \right)
$$

The formula above should be an approximation of the rendering equations. I'm looking for a paper that explains how that formula is derived, I cannot manage to find neither the title of a paper (other than the name "Dimitar" mentioned in the same page I pointed out).

I've done some research about some possible method that would justify. [This](https://math.stackexchange.com/questions/337643/split-up-sum-of-products-suma-i-b-i-approx1-n-suma-i-sumb-i-for-uncor) is the closest thing I managed to find, however there's some hypothesis that doesn't seem to me fits.

**Tags:** mathematics, shading

> **Comments:**
> **username_1**: "Dimitar" refers to the [presentation by Dimitar Lazarov](http://blog.selfshadow.com/publications/s2013-shading-course/lazarov/s2013_pbs_black_ops_2_slides_v2.pdf), earlier in the same SIGGRAPH course. See page 21 there for the "split approximation".  

---

## 1 answers

### Answer by username_2 on 2018-01-11. Score: 3

I do not have a derivation but i can explain the reasoning behind its usage.

On the left side is a (monte carlo) estimator for the rendering equation. It states the very same thing that the rendering equation states but on a finite number of discrete samples.

on the right side we have the $L\_i(l\_k)$ factor separated and "integrated" on its own.
This approximation holds true when $L\_i(l\_k)$ is a constant, since $\sum\_{k}f(k)\times n = n \times\sum\_{k}f(k)$ - and, likewise, $\int\_{k}f(k)\times n\space dk = n\times\int\_{k}f(k)dk$ - when $n$ is a constant.

$L\_i(l\_k)$ can be though of the colour of the incoming light and $\int\_{k}f(l\_k,v)dk$ can be thought of as the intensity of the reflected light. multiplying those together you get that now you can precompute $\int\_{k}L\_i(l\_k)dk$, saving a lot of time in either texture lookups (in the case of sky / environment lighting / screen space ray marching) or raytracing calculations.

However, since $L\_i(l\_k)$ is usually not a constant, this integral is not separable. Yet, in some cases (like when dealing with diffuse lighting or, more specifically, diffuse ambient lighting), the information that $f(l\_k,v)$ carries is low-frequency enough that it can reasonably be approximated as a constant with respect to the distribution of $L\_i(l\_k)$. Experimentally, it can be shown that the final result is not too different from what you would expect.

> **Comments:**
> **username_0**: I'm missing the extra 1/N in your explanation.  
> **username_2**: @username_0 the 1/N is implicit in the integrals. it comes from "averaging" samples in numerical integration  
> **username_0**: Still, there's one more factor 1/N. Also I agree the BRDF is almost constant in realistic cases, but I wouldn't be sure of the $cos$ factor and the probability $p$ due to the importance sampling process.  
> **username_2**: those are meant to be "distributed" into the sigma notation sums, that is why there are parentheses. they should really be interpreted as integrals.  
> **username_0**: Hi, what do you mean by "distributed"? could you elaborate that?  
> **username_0**: Hi, I'm sorry to bring this up again. I'm noticing that your explanation, for which I've managed to use as inspiration to work out some math, is missing the $\cos$ factor. Would your splitting explanation still be valid?  
> **username_2**: @username_0 oh i missed that in my explanation. I might be wrong but: Similarly to the $1/N$, i think it should be kept on both sides. This is because the $\cos$ is sort of a conversion from one domain of light direction to another. You can think of it like when you do substitution while solving an integral; you should keep the "$du/dx$"  
> **username_0**: Not sure I'm following  
> **username_2**: The $\cos\theta$ is a conversion factor from the light incoming from direction $\theta$ to the intensity of light projected on the surface.  
> **username_0**: I can understand the meaning but my point is that Karis formula doesn't take into account that when he splits the formula. Also, if $f_r$ is low frequency, which means essentialy the lobe looks more and more a diffuse one, the cosine factor would change that shape hence the splitting can't be applied anymore. You could though apply the splitting if the light is low frequency, in the sense that the intensity doesn't change much with the direction.  

---

