• No results found

4 | Representations of the Local Light-field Spectrum

4.3 Occluder Spectrum Evaluation

Predicted covariance Measured covariance

Measured spectrum (log scale)

Figure 4.10– We analyse a soft shadow cast by a tilted plane. The covariance is estimated after the reflection by the diffuse plane. The resulting spectrum exhibits the same orientation. The measured spectrum is estimated using a windowing of the measured light-field. This windowing increases the frequency content of the spectrum. We can see this difference on the plot (the cross) and on the measured covariance.

Wherexis the transversal dimension, andzis the axial dimension (in a 2D setting). kdescribes the wavelength of the beam andR(z),ϕ(z), ϕ0 andω(z) describe the behaviour of the beam (dispersion, width and waist position).

The propagation of a Gaussian beam through an optical system can be stud-ied using matrix multiplications [2]. A Gaussian beam propagating through a thin lens keeps its Gaussian nature [43]. Those properties are interesting to model and test optical systems.

4.2.6.2 Comparison with Covariance

Covariance matrices exhibit a richer set of information than Gaussian beams.

The former characterizes the spectrum of the radiance function while the later characterizes the spatial distribution of irradiance.

Covariance matrix allows to analyse paraxial systems as the matrix op-erators such as refraction and travel are dual of the paraxial opop-erators [60].

Complex optical systems can be formulated using the set of operators as well as multiple inputs systems thanks to the additivity of covariance. The later is not possible with the definition of Gaussian beams.

4.3 Occluder Spectrum Evaluation

We saw various methods to represent or approximate the frequency spectrum of the light-field function. Yet the occlusion operator requires the corresponding representation of its frequency spectrum. We need to evaluate it during the construction of the light-path.

We first review existing approaches of occlusion evaluation (Section 4.3.1).

Then we propose two new data structure to obtain local occlusion information without altering the core of the ray-tracing engine (Section 4.3.2).

4.3. OCCLUDER SPECTRUM EVALUATION

4.3.1 Previous Work

Previously proposed approaches require either sampling of visibility (Section 4.3.1.1) or its rasterization (Section 4.3.1.2).

4.3.1.1 Sampling Occlusion

Durand et al. [47] used a sampling of the visibility to estimate the occlusion for directions on the hemisphere of a particular hit-point with the scene.

This method requires an appropriate sampling of the hemisphere and has to be done for each ray (but it can be precomputed for eye rays). This is not suited for a global illumination setting as visibility evaluation is a bottleneck.

4.3.1.2 Depth Map Discontinuities

Soler et al. [165] evaluated the visibility using a depth map. The visibility is rasterized which is cheaper than Durand et al. [47]. The evaluation of the directionality (when needed) is made using the gradient direction in the tile used to detect the discontinuity (for example a 3×3 pixels tile).

This method is not adapted for a general purpose, such as global illumina-tion. Gathering local occlusion information for a given ray requires to rasterize occluders.

4.3.2 Voxel Grids

We incorporate occlusion information into a spatial structure to evaluate it during a marching step. The data structures are two voxel grids where voxels store distribution information of the nearby occlusion.

The voxel grid has been developed for algorithms that look at multiple reflections analysis or when a depth map cannot be evaluated (for environment maps for example). This spatial structure subdivides the 3D scene into voxels in which we compute a conservative approximation of the occlusion frequency spectrum with the given spectrum representation.

During the covariance computation step, for a given ray, we ray march into this grid, using ray marching [4], to estimate the minimum occlusion window.

4.3.2.1 Normal voxel Grid

During the covariance computation step, for a given ray, we ray march into this grid, using ray marching [4], to estimate the minimum occlusion window.

Description: The normal voxel grid stores a Gaussian representation of the normal density distribution (noted NDF) inside the voxels.

Construction: For each object inside the voxel grid, we sample positions according to the area of objects. To each position we compute the associated normal. We define its covariance matrix using a dirac function in the direction of the normal. To obtain the covariance matrix of the normal distribution, we sum the individual covariance matrices of the normals. We also store the distance to the closest sample point with the center of the voxel.

4.3. OCCLUDER SPECTRUM EVALUATION

Evaluation of covariance is done by slicing from the 3D covariance matrix of normals using the tangent plane of the ray’s direction. The matrix is inverted and rotated to align the ray’s direction with the third component of the matrix.

Then, the 2D submatrix of the tangent plane is extracted and inverted to obtain the covariance matrix of the occluder. From the normals’ covariance matrixN, and a ray’s directiond, we define the occluder’s covariance matrix⃗ O as:

1 O =[

RTd N 1Rd

]

1,2 (4.33)

This slicing is not equivalent to an integration, as we store a Gaussian representation of the NDF and not a spectrum. It extracts the distribution of direction inside the tangent plane of the ray.

Frequency leaking: Using a covariance matrix to represent the distribution of normals smoothes it. This introduces leaking of frequency when evaluating the covariance for ray pointing in directions close to the normal of a surface.

This leaking creates an undesirable effect: self-occlusion of surfaces (See Fig-ure 4.11(a)). This self-occlusion is not problematic for one bounce illumination applications but in a global illumination setting, the self-occlusion accumu-lates leading to overestimation of occlusion. To avoid this effect, we introduce another voxel grid: thecone voxel grid.

(a) Using a covariance voxel grid (b) Using a cone voxel grid

Figure 4.11 – Auto-occlusion (a) produces an overestimate of the local fre-quency. Using a cone voxel-grid (b) allows to remove this issue.

4.3.2.2 Cone Voxel Grid

The cone grid stores the cone in which the NDF lies. This is a coarser rep-resentation of the NDF, but in our experiences, it gives a cleaner frequency estimate of the occlusion for the self-occlusion issue.

Definition: The cone grid stores a bi-cone in each voxel. A bi-cone is defined with a mean direction and an aperture. To test if a ray is occluded by a nearby