<p>Both equations are correct, they are just writing the incoming radiance at point <span class="math-container">$x$</span> as an integral over two different domains. The first line is the solid angle formulation (integrating over all <span class="math-container">$\omega \in \Omega$</span>), while the second one is the surface area formulation (integrating over all differential area point <span class="math-container">$A_y \in S_l$</span>). The additional cosine term divided by the square distance is simply the Jacobian of this change of variable.</p>
<p>The surface area formulation of the rendering equation is quite useful as it allows to integrate over all area light sources in a scene. Sometimes, it can be better to use the solid angle form for certain types of emitters (e.g. when your emitter is a perfect sphere, in which case you can sample its spherical cap more efficiently). In most cases, however, the surface area is preferred as it allows for more general emissive profiles.</p>
<p>As an example, suppose your light is an emissive bunny. How would you sample the subtended solid angle? It can be quite tricky without determining the silhouette edges! But in the surface area form, all you have to do is sample a triangle proportional to its area, sample a point on that triangle using barycentric coordinates, and you're done.</p>
<p>Both formulations have their pros and cons and a renderer will allow you to switch between one and the other (only when possible), with the default being surface area as most emitters are usually attached to an arbitrary mesh.</p>

CC BY-SA 4.0
2022-12-24T18:10:01.603Z
Thanks a lot for the reply, much appreciated! So practically speaking if I'm doing Monte Carlo Integration to approximate this integral. In the solid angle formulation I would sample directions ($\omega$), what would I be sampling in the second fomrulation? If I understand correctly that would be points on the surface of the emitter? Wouldn't that be super inefficient if the surface is unknown? How would that work in practice?
analysis1
CC BY-SA 4.0
2022-12-24T19:12:22.407Z
Yes. In the surface area formulation, you would sample point on an emitter and combine the contribution with MIS and Next Event Estimation (NEE). More precisely, you would sample a point on an emitting surface to estimate $L_e$ and sample your BSDF for an outgoing direction to recurse for path tracing. Regarding your second question, you usually know your emitters in advance so sampling it isn't too much of an issue. However, it can be inefficient when only a very small portion of the light is visible from $x$, in which case many samples will be wasted due to zero-visibility.
Hubble
CC BY-SA 4.0
2022-12-26T00:32:30.587Z
Thanks a lot! I just had one follow up I'm not clear about. Let's say you're doing the solid angle formulation. Then how will you account for the square fall off of the light intensity (with distance)? If you choose a angle in your hemisphere and march along it and then meet a surface, you will just add up the radiance, without really accounting for the distance where you find this surface?
analysis1
CC BY-SA 4.0
2022-12-26T08:24:51.043Z
@analysis1 The $\frac{1}{r^2}$ comes from the change of measure, it is not in the solid angle formulation - radiance doesn't fall off as $\frac{1}{r^2}$ - the projected areas do. In the area formulation you essentially project said areas on the hemisphere which results in the extra cosine and distance fall off + the visibility term.
lightxbulb
CC BY-SA 4.0
2022-12-24T16:04:16.363Z
2022-12-24T16:04:16.363Z
Hubble
<p>I'm watching the <a href="https://www.cg.tuwien.ac.at/courses/Rendering/VU/2021S" rel="nofollow noreferrer">TU Wien rendering lectures</a> in the course we were presented with a rendering equation (first one on the screenshot) and then another, which results from a change of variables (if I understand correctly).</p>
<p>No when we moved to the basic path tracer lecture, we have been using the first equation. Why is that? I thought we use the second equation when dealing with arbitrary objects (with bigger distances than 1 and different angles of the surface) and Eq.1 was just a tool to derive it.</p>
<p>In general I am a bit confused, when to use what equation, what is the correct image formation model, if I have an image of a scene I click and I have a renderer, how do I accurately model what we will capture?</p>
<p><a href="https://i.sstatic.net/uAWsl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uAWsl.png" alt="enter image description here" /></a></p>

<raytracing><rendering><pathtracing><physically-based>
Rendering equation integration variable change
analysis1
# Rendering equation integration variable change

(Asked by: username_0 on 2022-12-23)

I'm watching the [TU Wien rendering lectures](https://www.cg.tuwien.ac.at/courses/Rendering/VU/2021S) in the course we were presented with a rendering equation (first one on the screenshot) and then another, which results from a change of variables (if I understand correctly).

No when we moved to the basic path tracer lecture, we have been using the first equation. Why is that? I thought we use the second equation when dealing with arbitrary objects (with bigger distances than 1 and different angles of the surface) and Eq.1 was just a tool to derive it.

In general I am a bit confused, when to use what equation, what is the correct image formation model, if I have an image of a scene I click and I have a renderer, how do I accurately model what we will capture?

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

**Tags:** raytracing, rendering, pathtracing, physically-based


---

## 1 answers

### Answer by username_1 on 2022-12-24. Score: 1 | Accepted answer

Both equations are correct, they are just writing the incoming radiance at point $x$ as an integral over two different domains. The first line is the solid angle formulation (integrating over all $\omega \in \Omega$), while the second one is the surface area formulation (integrating over all differential area point $A\_y \in S\_l$). The additional cosine term divided by the square distance is simply the Jacobian of this change of variable.

The surface area formulation of the rendering equation is quite useful as it allows to integrate over all area light sources in a scene. Sometimes, it can be better to use the solid angle form for certain types of emitters (e.g. when your emitter is a perfect sphere, in which case you can sample its spherical cap more efficiently). In most cases, however, the surface area is preferred as it allows for more general emissive profiles.

As an example, suppose your light is an emissive bunny. How would you sample the subtended solid angle? It can be quite tricky without determining the silhouette edges! But in the surface area form, all you have to do is sample a triangle proportional to its area, sample a point on that triangle using barycentric coordinates, and you're done.

Both formulations have their pros and cons and a renderer will allow you to switch between one and the other (only when possible), with the default being surface area as most emitters are usually attached to an arbitrary mesh.

> **Comments:**
> **username_0**: Thanks a lot for the reply, much appreciated! So practically speaking if I'm doing Monte Carlo Integration to approximate this integral. In the solid angle formulation I would sample directions ($\omega$), what would I be sampling in the second fomrulation? If I understand correctly that would be points on the surface of the emitter? Wouldn't that be super inefficient if the surface is unknown? How would that work in practice?  
> **username_1**: Yes. In the surface area formulation, you would sample point on an emitter and combine the contribution with MIS and Next Event Estimation (NEE). More precisely, you would sample a point on an emitting surface to estimate $L_e$ and sample your BSDF for an outgoing direction to recurse for path tracing. Regarding your second question, you usually know your emitters in advance so sampling it isn't too much of an issue. However, it can be inefficient when only a very small portion of the light is visible from $x$, in which case many samples will be wasted due to zero-visibility.  
> **username_0**: Thanks a lot! I just had one follow up I'm not clear about. Let's say you're doing the solid angle formulation. Then how will you account for the square fall off of the light intensity (with distance)? If you choose a angle in your hemisphere and march along it and then meet a surface, you will just add up the radiance, without really accounting for the distance where you find this surface?  
> **username_2**: @username_0 The $\frac{1}{r^2}$ comes from the change of measure, it is not in the solid angle formulation - radiance doesn't fall off as $\frac{1}{r^2}$ - the projected areas do. In the area formulation you essentially project said areas on the hemisphere which results in the extra cosine and distance fall off + the visibility term.  

---

