An Effective Hardware Architecture for Bump Mapping Using
An Effective Hardware Architecture for Bump Mapping Using Angular Operation Seung-Gi Lee†, Woo-Chan Park, Won-Jong Lee, Tack-Don Han, and Sung-Bong Yang Media System Lab. (National Research Lab. ) Dept. of Computer Science Yonsei University - -
Contents 2 q. Introduction n Background and related work q. Bump mapping algorithm n Vector rotation n Illumination calculation q. Hardware architecture q. Experimental results q. Conclusions Media System Lab. , Yonsei Univ. Graphics Hardware 2003
3 Contents q. Introduction n Background and related work q. Bump mapping algorithm n Vector rotation n Illumination calculation q. Hardware architecture q. Experimental results q. Conclusions Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Background: bump mapping 4 q. Represent the bumpy parts of the object surface in detail using geometry mapping without complex modeling q. Three steps n Fetch the height values from a 2 D bump map n Perturb the normal vector N n Calculate the illumination with three vectors, the perturbed vector N’, the light vector L, and the halfway vector H q. A large amount of per pixel computations is required. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Background: reference space 5 q The normal vector perturbation can be preprocessed by defining the surfaceindependent space (reference space). [Peercy et al. , Ernst et al. ] q Instead, transformations from the object space into the reference space should be provided for each pixel (or for each small polygon). n Definition of a 3 3 matrix & a 3 3 matrix multiplication q The normalization of the vectors for the illumination calculation is also required. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Background: polar coordinates 6 q Representation of a vector P n P = ( P, P) n P is an angle between the x-axis and a vector Q n P is an angle between P and the z-axis q An effective approach from the viewpoint of hardware requirements [Kim et al. , Ikedo et al. , Kugler] n Only two angles n No normalization of vectors q However, the matrix multiplication for the transformation or a large map for the normal vector perturbation are still required. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Previous work related with PCS 7 q Support bump, reflection, refraction, and texture mapping in a single LSI chip [Ikedo et al. ] n Classical straightforward method require a large amount of logic for matrix operations n May produce the incorrect reflection angle to calculate the intensity of specular light q IMEM: integrate the arithmetic units and the reference tables into one dedicated memory chip [Kugler] n Support the simple normal vector perturbation method n Reduce the amount of computations by using the precomputed LUTs and maps n However, a map of large size over 3 Mbytes is required Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Previous work related with PCS 8 q Hardware architecture supporting the bumpmapped illumination by using the Phong illumination hardware [Kim et al. ] n Give a small reduction to the hardware requirements for the illumination calculation Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Overview of this paper 9 q. We propose a new transformation method and present its hardware architecture. n Direct transformation of the vectors into the reference space n No hardware for matrix transformation, but only a few hardware logics for the vector rotations q. Also, we present an effective illumination calculation hardware. n Use of “the law of cosine” Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Contents 10 q. Introduction n Background and related work q. Bump mapping algorithm n Vector rotation n Illumination calculation q. Hardware architecture q. Experimental results q. Conclusions Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Processing flow 11 q Vector rotation stage n 3 D object space 3 D reference space § Use of the angular operation § Use of the projection onto the plane and the proportion onto the sphere q Bump vector fetch stage n The perturbed normal vectors are fetched from the bump vector map. q Illumination calculation stage n The inner products are computed. n The illumination is calculated by referring to the diffuse and specular tables. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Vector rotation The first rotation: - N around the z-axis 12 The second rotation: - N around the y-axis • The polar coordinates of the normal vector N are used as the rotation angles. • A corresponds to a light vector L and a halfway vector H. • The first rotation makes it possible to rotate accurately around the y-axis. • As a result, A in the object space is transformed into Aref in the reference space. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Geometric information 13 u. Geometric information required to find the polar coordinate ( A’, A’) of the transformed vector A’ • The calculation of x Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Calculation of j. A’ 14 u. The projection of A’ onto the xy-plane is required to find an angle A’ Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Geometric relationship for A’ u. The geometric relationship of the vectors on a sphere 15 üWe assume two arbitrary vectors that begin with the origin and end with points at which the plane in parallel with the xz-plane intersects the circles, Cm and. üWhen these vectors move on Cm and Cmyz under the above assumption, the ratio of the angular variation to the variation range of each vector for Cm is equal to that of. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Calculation of prop 16 u can be calculated by using an angle of. u. The projection of Amn and its related components onto the yz-plane üThe y coordinate of a point at which the extension line of intersects a unit circle C 0 in the yz-plane is y 0/rm. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
17 Calculation of A’ u. Geometric information required to find the polar coordinate ( A’, A’) of the transformed vector A’ ü X , Y, Z ü The law of cosine Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Illumination calculation 18 u. Phong illumination model u. In order to calculate the inner products of the vectors, the vectors should be transformed into the vectors in the Cartesian coordinates. u. The inner products of the transformed vectors are calculated as follows. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Illumination calculation 19 u. However, applying the law of cosine to these equations makes it possible to reduce the amount of computations for the inner products. v The number of multiplications 6 2 v The number of cosines 10 6 Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Contents 20 q. Introduction n Background and related work q. Bump mapping algorithm n Vector rotation n Illumination calculation q. Hardware architecture q. Experimental results q. Conclusions Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Proposed bump mapping hardware 21 u. The illumination calculation unit consists of two parts that calculate the intensities of the diffuse and the specular light. u. The intensities of lights are obtained from the light tables referred to by the values of the inner products. u. This unit can be implemented with 6 cosine tables, 1 diffuse table, 1 specular table, 2 multipliers, and 13 adders. The calculation of the inner products u. Light table method ü The table entries are indexed by scalar values. ü The size of the table is 28 16 ~210 16 bits. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Vector rotation unit 22 u. This unit can be implemented with 6 tables, 3 multipliers, and 8 adders. u. For arbitrary values of yk’s, θprop’s are precomputed by the following equation. , where uθprop’s are fetched from Tprop with the indices of yk’s. Media System Lab. , Yonsei Univ. Graphics Hardware 2003
23 Hardware complexity Architecture Peercy Kugler Kim Ernst Ours Coordinate System Cartesian Polar 27 Multipliers 9 Division Units 3 SQRTs 18 Adders 1 Map 5 Multipliers 3 LUTs 2 Adders 31 Multipliers 6 LUTs 18 Adders 27 Multipliers 9 Division Units 3 SQRTs 18 Adders 6 Multipliers 12 LUTs 16 Adders N/A 8 Multipliers 2 Maps 5 LUTs 4 Adders 6 Multipliers 12 LUTs 5 Adders 7 Multipliers 1 LUT 5 Adders 2 Multipliers 8 LUTs 11 Adders Illumination Environment Setup Processing Steps Illumination calculation Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Contents 24 q. Introduction n Background and related work q. Bump mapping algorithm n Vector rotation n Illumination calculation q. Hardware architecture q. Experimental results q. Conclusions Media System Lab. , Yonsei Univ. Graphics Hardware 2003
Experimental results 25 u. We modified Mesa 3. 0 to implement the conventional method and the proposed method. u. To differentiate the image qualities, we have performed texture- and bump-mapping using various objects with various maps. Wooden wall : mapping onto a plane u. In case of wooden wall, there is little difference in the quality between these two images, to the extent of not being differentiated by the naked eyes. (a) The conventional method (b) The proposed method Brick wall : mapping onto a cube Media System Lab. , Yonsei Univ. Map of the world : mapping onto a sphere Graphics Hardware 2003
Experimental results 26 u. There is also little difference in the image quality as in the case of the previous simulation. Wooden wall : mapping onto a plane (a) The conventional method Brick wall : mapping onto a cube Media System Lab. , Yonsei Univ. (b) The proposed method Map of the world : mapping onto a sphere Graphics Hardware 2003
Experimental results 27 u. The images don’t look vivid because these mapping methods wear the maps converted from 512 256 resolution into 512 resolution on the surface of the object. Wooden wall : mapping onto a plane u. However, we can hardly differentiate the image quality between these two images. (a) The conventional method (b) The proposed method Brick wall : mapping onto a cube Media System Lab. , Yonsei Univ. Map of the world : mapping onto a sphere Graphics Hardware 2003
Contents 28 q. Introduction n Background and related work q. Bump mapping algorithm n Vector rotation n Illumination calculation q. Hardware architecture q. Experimental results q. Conclusions Media System Lab. , Yonsei Univ. Graphics Hardware 2003
29 Conclusions q. Bump mapping method with the effective vector rotation and illumination calculation algorithm. n. Reduce a large amount of computations and hardwares n. Generate nearly the same quality of images as the conventional method Media System Lab. , Yonsei Univ. Graphics Hardware 2003
30 Thank you!!! q. We appreciate NRL project supported from the Ministry of Science & Technology of Korea. q. NRL Project homepage nhttp: //msl. yonsei. ac. kr/3 d/ q. E-mail address nsklee@kurene. yonsei. ac. kr Media System Lab. , Yonsei Univ. Graphics Hardware 2003
- Slides: 30