This is an updated repost from my old, deactivated blog or from notes of my past studies. The date follows the original time of writing.

Introduction

Rendering is an evolving science: every day new papers are published, new posts show up on our Twitter feed and we learn new techniques, tricks and mathematical proofs. With new technologies come new topics to be studied and applied, but the foundations stand still as the building blocks, constant over time (most of the time, at least!).

Shading, the act of computing the final intensity - actually it is the radiance, but you can think of it as intensity for now! - of a pixel, is one of the most important topics in rendering; new techniques are always showing up as the entire field converges to a physically based model. This convergence is great and also the next logical step, as the most realistic model of how light interacts with matter is the real world.

For a complete and correct representation of light-matter interaction, we need a way to rigorously represent light. This field already exists and is called Radiometry (the physics of how we represent and measure light). Therefore, we can work with things such as the intensity of beams and the accumulation (read: average or integration!) of light at a certain point in space. These quantities are the basic building blocks for the physically based treatment of light in rendering and the focus of this post.

Irradiance

Irradiance is the measure of incoming light flux per square meter; in short, that is all, but let’s analyze what this statement means. A point I want to make is that this quantity doesn’t depend on direction; it is like a mean of the total light flux reaching the surface at each point.

Figure 1
Figure 1: Irradiance Through Differential Area A

Working with figure 1, we can make this idea more visual. We can look at Irradiance as the average of the light flux coming from various directions relative to the normal, thus working as if the entire plane had a constant light flux passing through its surface. Therefore, we define Irradiance as:

E(n)=1A∑i=0NΦi(I)E(n) = \frac{1}{A}\sum_{i=0}^{N}\Phi_i \tag{I}

This definition gives us a more intuitive understanding of what Irradiance is, although we can also define Irradiance in terms of differentials:

E(n)=dΦdA(II)E(n) = \frac{d\Phi}{dA} \tag{II}

Definition IIII works on a point (a differential area) while II works on areas, thus if you want to express the concept of Irradiance on points with differential flux, you must use IIII, as II gives constant Irradiance for all points belonging to the surface area.

Radiance

We saw the notion of flux passing through an area as a measure of a surface’s brightness; now we turn our focus to the light beams themselves. Let’s see how we can measure this same notion, but now for the light beams coming from a certain direction.

Before we define radiance, we need to define what a solid angle is. In simple terms, a solid angle is the analogue of an angle in 2D, but now in 3 dimensions.

Figure 2
Figure 2: Solid Angle Definition

A more intuitive way to think about this is as follows (see Figure 2): imagine you are at point PP looking in the direction of cone ω\omega. Even though AA is greater than your relative area of vision ω\omega, you can still see it because it is farther away, thus ω\omega acts like the projection of AA on the hemisphere, therefore PP sees AA and ω\omega as the same. Think about this for a while and you will see why this is true.

Well, hopefully we now have an intuition about what a solid angle is, but we also need a formula to compute it.

Assuming that AA is part of a greater sphere of radius rr and that ω\omega belongs to the surface area of the unit sphere, we get the following relation:

4π4πr2=ωA  ⟹  ω=Ar2(III) \frac{4\pi}{4\pi r^{2}} = \frac{\omega}{A} \implies \omega = \frac{A}{r^{2}} \tag{III}

This is the inverse square law. Imagine that PP is now a point light source and ω\omega is the first area that the flux being emitted by PP passes through. We can’t create light, as we are excluding emitters, so the same flux that passed through ω\omega must pass through AA too, but AA is r2r^{2} greater than ω\omega, therefore AA must be less bright than ω\omega and this factor is exactly 1r2\frac{1}{r^2}.

Now we define radiance:

L(Ψ)=dΦdA⊥dωi(IV) L(\Psi) = \frac{d\Phi}{dA_{\bot}d\omega_{i}} \tag{IV}

Actually, the more formal definition of Radiance uses partial derivatives and accounts for time variations, polarization and wavelength dependence. We ignore all those factors here. Glassner - Volume I: Chapter 13 gives a great explanation of why such a simplification is still valid for our objectives.

It is more helpful to write dA⊥dA_{\bot} as a function of dAdA, thus we have:

L(Ψ)=dΦdAcos⁡θdω(V) L(\Psi) = \frac{d\Phi}{dA\cos{\theta}d\omega} \tag{V}

The proof of the relation dA⊥=dAcos⁡θdA_{\bot} = dA\cos{\theta} is left as an exercise to the reader! (Hint: dA⊥dA_{\bot} is parallel to the beam of light and dAdA to the surface normal.)

Now let’s analyze VV:

As we know, radiance is the quantity used to measure light coming from a certain direction (in our case Ψi\Psi_i) with a certain flux associated with this direction. Therefore, we must account for both direction and intensity. The solid angle controls the fading of the light with distance and also the projection notion explained before, thus it is the one that accounts for the fading of the flux, therefore influencing the intensity factor. The directional component is controlled by cosθicos\theta_i, which controls the projection of the parallel surface onto the true surface area, thus controlling how much of the incoming flux the true surface receives.

Now that both Radiance and Irradiance are explained and defined, we relate the two:

L(Ψi)=dΦdAcosθidωi=E(n)cosθidωi  ⟹  E(n)=L(Ψi)cosθidωi(VI)L(\Psi_i) = \frac{d\Phi}{dAcos\theta_i d\omega_i} = \frac{E(n)}{cos\theta_i d\omega_i} \implies E(n) = L(\Psi_i)cos\theta_id\omega_i \tag{VI}

The equation above gives us the differential Irradiance IIII, therefore if we want to work with the finite Irradiance II, we must integrate this differential Irradiance, thus accounting for all directions above our point PP:

E(n)=∫Ω(n)L(Ψi)cosθidωi(VII)E(n) = \int_{\Omega(n)}L(\Psi_i)cos\theta_id\omega_i \tag{VII}

A point must be made about VIIVII:

Even though II and VIIVII return finite values for points, they differ in nature: II assumes a constant Irradiance across the entire surface, but VIVI does not, as you can integrate the Irradiance of the entire surface as a function of the normal at each point, thus getting different values for each. On a plane, II and VIVI are exactly the same, though.

That is it, until next time!

And live long and prosper!