Rama physically-based lighting
Diffuse surfaces

1 Introduction

In this section we want to compute the light which goes from the Rama light sources into the camera via a single bounce on a diffuse surface. This is equal to the light that bounces off from the diffuse surface, times the transmittance of the atmosphere between this surface and the camera. This transmittance has been computed in the previous section so we only compute the first term here, i.e. how much light from the light sources is reflected directly by a diffuse surface.

2 Model

From the BRDF definition, a light source patch centered at $\bs$, of normal $\bn_s$ and surface $\diff S$ and emitting a radiance $L_0$ in all directions of the upper $\bn_s$ hemisphere (see Fig. 1), gives on a perfectly diffuse surface patch centered at $\bp$, of normal $\bn$ and albedo $\alpha$ a reflected radiance $\diff L$ equal to \begin{align} \diff L&=\color{red}{L_i}\color{green}{\mathrm{f_r}}\color{blue}{\cos\theta_i}\diff\omega_i\\ &=\color{red}{L_0\mathfrak{t}(\bs,\bp)V(\bs,\bp)}\color{green}{\frac{\alpha}{\pi}}\color{blue}{\mathrm{max}\left(\bn\cdot\bl,0\right)}\mathrm{max}\left(-\bn_s\cdot\bl,0\right)\frac{\diff S}{l^2} \end{align} where $\bl\eqdef(\bs-\bp)/l$ is the unit vector towards the light source patch, $l\eqdef\Vert\bs-\bp\Vert$ is the distance between the light source and the diffuse surface, and where $\mathfrak{t}(\bs,\bp)$ and $V(\bs,\bp)$ are the transmittance of the atmosphere and the visibility ($0$ or $1$) between $\bs$ and $\bp$, respectively.



Figure 1: Diffuse lighting by a light source patch.

The light that bounces off from the diffuse surface, coming directly from the light sources, is then "simply" the integral of the above equation over all the light source elements: \begin{equation} L_{LD}(\bp,\bn)=\frac{\alpha L_0}{\pi}\int_{light\,sources}\mathfrak{t}(\bs,\bp)V(\bs,\bp)\mathrm{max}\left(\bn\cdot\bl,0\right)\mathrm{max}\left(-\bn_s\cdot\bl,0\right)\frac{\diff S}{l^2} \end{equation}

3 Implementation

Because of the transmittance and visibility terms, the above equation can not be integrated analytically. However, since our method is to precompute the lighting in a lightmap, we can use a costly numerical integration method to evaluate this integral (using ray-tracing to compute the visibility terms). Once $L$ is stored in the lightmap, we can simply render the Rama model textured with it, times the transmittance between the camera and the surface patches, to get the direct lighting on diffuse surfaces.

This is what we do, using a $2304\times 2304$ lightmap with, for each texel, $n=50$ samples per light source (i.e. $300$ samples in total) for the numerical integration. Since the light sources are very thin, we take the samples at regular intervals along their main axis only. For each sample we set $dS$ to the total light source surface ($1.08\,km^2$ for the north light sources, $1.13$ for the south ones) divided by $n$, and set $L_0$ to the value computed in the previous section.

We validate our implementation by measuring the average value of $L$. Since $L_0$ was chosen such that each square meter of Rama's surface absorbs $I_0=133\,W.m^{-2}$ in average, we expect the average value of $L$ to be near the average albedo times $I_0/\pi$ (we don't expect a strict equality since, in general, the average of a product is not equal to the product of the averages), when there is no atmosphere. Our measurements give an average albedo equal to $\bar{\alpha}=(0.1026,0.1206,0.0969)$, and an average bounced radiance equal to $\bar{L}=(4.18,5.02,3.73)\,W.m^{-2}$ - which is indeed close to $\bar{\alpha}I_0/\pi=(4.34,5.10,4.06)$.

4 Results

Here are the results with a single linear light source, with or without atmospheric attenuation (between the light source and the surface, and between the surface and the camera):


Figure 2: Direct lighting on diffuse surfaces, for a single light source, without atmospheric attenuation. Direct lighting on diffuse surfaces, for a single light source, with atmospheric attenuation.

We can see that the atmospheric attenuation gives reddish colors, which is due to the fact that blue is out scattered more than the other colors by the atmosphere. With the 6 linear light sources (and a smaller exposure) we get the following:



Figure 3: Direct lighting on diffuse surfaces, without atmospheric attenuation. Direct lighting on diffuse surfaces, with atmospheric attenuation.