Real-time Environment Mapping with Equal Solid-Angle Spherical Quad-Map

Tien-Tsin Wong, Liang Wan, Chi-Sing Leung, and Ping-Man Lam
Shader X4: Lighting & Rendering, Charles River Media, 2006

Summary

In this article, we first describe a sphere-to-rectangle mapping that partitions the spherical surface or 360o environment evenly (Figure 1, right). It is known as HEALPix (Hierarchical Equal Area, iso-Latitude Pixelisation), a sphere partitioning scheme borrowed from the area of astrophysics. We apply this partitioning scheme to environment mapping, so that we can map the 360o environment to a rectangular HEALPix map that fits nicely in memory (Figure 2). More importantly, all texels in this map span the same solid angle, i.e., they are equally important. Furthermore, the generated HEALPix map copes nicely with modern texture compression techniques like S3TC. Due to the millions of texture look-up operations in practical game applications, the key is to fetch the texels in HEALPix map (Figure 2, right) given a look-up direction (3D vector) in real time. In this article, we demonstrate that the computation of HEALPix mapping can be efficiently implemented using only around 20 lines of shader code. We then show that, even the same amount of storage is used, HEALPix map can preserve better visual details than cubemap (Figure 7). Finally, we describe in detail how to perform mipmapping on the HEALPix map.

Figures

Here shows some figures extracted from the article.

Figure. HEALPix partitions the sphere into 12 base quads. The rectilinear HEALPix map (consists of 12 base quads) fits nicely in memory.

Figure. Visual comparison of environment mapping with HEALPix maps (middle column) and cubemaps (right column). The resolution of both HEALPix maps is 90´90´12=97,200 pixels while that of both cubemaps is 128´128´6=98,304 pixels. Note that more image details are preserved by HEALPix map.

     

Figure. Local tile space for mipmap filtering. Left: The natural visualization layout: fish view. Right: The logical extension of local coordinate system with quad 0 at the center.

 


copyright © Liang Wan / HOME