# The Cube Surface Light Field for Interactive Free-Viewpoint Rendering
## 3 Cube Surface Light Field Representation  
The core idea of the cube surface light field representation is to parameterize the light rays on the two intersections with the cube surface and use the color value at the first intersection of the light ray and the object's surface to be the color of this light ray, constructing a pure ray-based 4D light field representation of the scenes, as shown in Figure 2.  
The light rays in free space can be divided into two categories. The first category of light ray does not intersect with the objects in the scene, and almost does not influence the objects' appearance. The second category of light ray intersects with the scene's objects and has a significant impact on the objects' appearance, resulting in light and dark effects on the objects' surfaces. The origination of such light rays either can be from one or more light sources or can be the reflected light rays on the surface of an adjacent object. In particular, the images captured by a camera have already encoded the final impact of the light rays from these two originations on the appearance of the scene. Therefore, only the second category of light ray is concerned in the study of free-viewpoint rendering, and we do not distinguish whether the light ray is from the light source or the reflection from the adjacent objects' surface. The cube surface light field uses a unified cube geometry to parameterize the set of the second category of light ray in free space and uses the pairs of intersected points on the cube surface to be the parameters of light rays. We define that the center of the cube geometry is located at the origination of the 3D Cartesian coordinate system (CCS), and the edge length is the same as the size of the scene's bounding box. According to the twelve edges of the cube geometry, its surface can be divided into six sub-planes, corresponding to +X, +Y, +Z, -X, -Y, -Z planes, respectively. Therefore, the cube surface can be defined by a 2D function composed of six sub-planes, as shown in Equation (1), in which (x, y) refers to the 2D coordinates of the interior points on each sub-plane. Figure 2: The cube surface light field representation. The parameters of each light ray are defined by the two intersections (A and B) with the cube surface and the ray’s colors are defined by the RGB color at the first intersection with the object’s surface. \[\mathrm{C}:\sum\limits_{i=1}^{6}\Pi_{i}(x,y)\subset\mathbb{R}^{2} \tag{1}\]  
On the cube surface, the origination of each light ray is defined by the 2D coordinates at the first intersections with the light rays and the cube surface, and the directions of the light rays are defined by the 2D coordinate at the second intersections with the light rays and the cube surface. The color values of each light ray are defined as the color at the first intersections with the light rays and the scenes, which are described by the RGB color representation. Consequently, the cube surface light field can be defined as a set of RGB color values of the light rays parameterized by the intersection pairs with a specific cube surface, as shown in Equation (2), in which \(m\) and \(n\) refer to the serial number of the sub-plane where the originations and directions of the light rays are parameterized. Similarly, (\(u,v\)) and (\(s,t\)) refer to the 2D coordinates of arbitrary interior points on the \(m\)-th sub-plane and on the \(n\)-th sub-plane, respectively. \[\mathrm{L}:\sum\limits_{m=1}^{6}\left(\Pi_{m}(u,v)\times\sum\limits_{n=1}^{6} \Pi_{n}(s,t)\right)\rightarrow\mathrm{RGB} \tag{2}\]  
Obviously, for all the light rays that intersect with the scene, the two intersections with the cube surface cannot be on the same sub-plane of the cube surface. Therefore, \(m\) and \(n\) must not get the same value at the same time in the cube surface light field. According to Equation (2), each light ray has been defined as a six-tuple (\(m\), \(u\), \(v\), \(n\), \(s\), and \(t\)) so far. Since \(m\) and \(n\) are both enumeration values, their definition domains are integers between [1, 6].