Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
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
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 2 -
Contents
IntroductionBackground and related work
Bump mapping algorithmVector rotationIllumination calculation
Hardware architectureExperimental resultsConclusions
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 3 -
Contents
IntroductionBackground and related work
Bump mapping algorithmVector rotationIllumination calculation
Hardware architectureExperimental resultsConclusions
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 4 -
Background: bump mapping
Represent the bumpy parts of the object surface in detail using geometry mapping without complex modelingThree stepsFetch the height values from a 2D bump mapPerturb the normal vector NCalculate the illumination with three vectors,
the perturbed vector N’, the light vector L, and the halfway vector H
A large amount of per pixel computations is required.
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 5 -
Background: reference space
The normal vector perturbation can be preprocessed by defining the surface-independent space (reference space). [Peercy et al., Ernst et al.]
Instead, transformations from the object space into the reference space should be provided for each pixel (or for each small polygon).Definition of a 3×3 matrix & a 3×3 matrix multiplication
The normalization of the vectors for the illumination calculation is also required.
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 6 -
Background: polar coordinates
Representation of a vector P
P = (ϕP, θP) ϕP is an angle between the x-axis
and a vector Q θP is an angle between P and
the z-axis
An effective approach from the viewpoint of hardware requirements [Kim et al., Ikedo et al., Kugler] Only two angles No normalization of vectors
However, the matrix multiplication for the transformation or a large map for the normal vector perturbation are still required.
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 7 -
Previous work related with PCS
Support bump, reflection, refraction, and texture mapping in a single LSI chip [Ikedo et al.]
Classical straightforward method require a large amount of logic for matrix operations
May produce the incorrect reflection angle to calculate the intensity of specular light
IMEM: integrate the arithmetic units and the reference tables into one dedicated memory chip [Kugler]
Support the simple normal vector perturbation method Reduce the amount of computations by using the pre-
computed LUTs and mapsHowever, a map of large size over 3 Mbytes is required
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 8 -
Previous work related with PCS
Hardware architecture supporting the bump-mapped illumination by using the Phong illumination hardware [Kim et al.]
Give a small reduction to the hardware requirements for the illumination calculation
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 9 -
Overview of this paper
We propose a new transformation method and present its hardware architecture.Direct transformation of the vectors into the
reference spaceNo hardware for matrix transformation, but
only a few hardware logics for the vector rotations
Also, we present an effective illumination calculation hardware.Use of “the law of cosine”
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 10 -
Contents
IntroductionBackground and related work
Bump mapping algorithmVector rotationIllumination calculation
Hardware architectureExperimental resultsConclusions
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 11 -
Processing flow
Vector rotation stage 3D object space 3D reference space
Use of the angular operation Use of the projection onto the plane and the proportion onto
the sphere
Bump vector fetch stage The perturbed normal vectors are fetched from the
bump vector map.
Illumination calculation stage The inner products are computed. The illumination is calculated by referring to the
diffuse and specular tables.
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 12 -
Vector rotation
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 13 -
Geometric information
Geometric information required to find the polar coordinate (ϕΑ’, θΑ’) of the transformed vector A’
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 14 -
Calculation of ϕA’
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 15 -
Geometric relationship for θA’
The geometric relationship of the vectors on a sphere
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 .
x
y
z
1
1
1
0A
mnA
0C
mC
O 0y
mr
xzmnAnC
yzmnA
yzmC
mr
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 16 -
Calculation of θprop
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 17 -
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 18 -
Illumination calculation
In order to calculate the inner products of the vectors, the vectors should be transformed into the vectors in the Cartesian coordinates.
Phong illumination model
The inner products of the transformed vectors are calculated as follows.
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 19 -
Illumination calculationHowever, applying the law of cosine to these equations makes it
possible to reduce the amount of computations for the inner products.
The number of multiplications
The number of cosines
6 2
10 6
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 20 -
Contents
IntroductionBackground and related work
Bump mapping algorithmVector rotationIllumination calculation
Hardware architectureExperimental resultsConclusions
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 21 -
Proposed bump mapping hardwareThe illumination calculation unit consists
of two parts that calculate the intensities of the diffuse and the specular light.
The intensities of lights are obtained from the light tables referred to by the values of the inner products.
This unit can be implemented with 6 cosine tables, 1 diffuse table, 1 specular table, 2 multipliers, and 13 adders.
Light table method
The VectorRotation Unit
The VectorRotation Unit
+
The BumpVector Map
DiffuseTable
-- + --
cos cos cos cos cos cos
+ -
ShiftRight 1
ShiftRight 1
X
+
+
SpecularTable
+ -
ShiftRight 1
ShiftRight 1
X
+
N
NL L H H
mappedBumpIuvLL H H
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 22 -
Vector rotation unit
-
+
-
Shift
Rig
ht 1
Shift
Rig
ht 1
sin
&
cos
sin
&
cos
+
-
cos
cos
sin
sin
Shift
Rig
ht 1
Shift
Rig
ht 1
SIN
-1 -
1/s
in &
1/c
os X
X
TAN
-1
X
1/c
os
1/s
in
X
Y
Z
-90
+
This unit can be implemented with 6 tables, 3 multipliers, and 8 adders.
, where
For arbitrary values of yk’s, θprop’s are precomputed by the following equation.
θprop’s are fetched from Tprop with the indices of yk’s.
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 23 -
Hardware complexity
Architecture Peercy Kugler Kim Ernst Ours
Coordinate System Cartesian Polar Polar Cartesian Polar
ProcessingSteps
IlluminationEnvironment
Setup
27 Multipliers9 Division
Units3 SQRTs
18 Adders
1 Map5 Multipliers
3 LUTs2 Adders
31 Multipliers
6 LUTs18 Adders
27 Multipliers9 Division
Units3 SQRTs
18 Adders
6 Multipliers12 LUTs
16 Adders
Illuminationcalculation
N/A
8 Multipliers2 Maps5 LUTs
4 Adders
6 Multipliers12 LUTs5 Adders
7 Multipliers1 LUT
5 Adders
2 Multipliers8 LUTs
11 Adders
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 24 -
Contents
IntroductionBackground and related work
Bump mapping algorithmVector rotationIllumination calculation
Hardware architectureExperimental resultsConclusions
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 25 -
Experimental results
Wooden wall : mapping onto a plane
Brick wall : mapping onto a cube Map of the world : mapping onto a sphere
We modified Mesa 3.0 to implement the conventional method and the proposed method.
To differentiate the image qualities, we have performed texture- and bump-mapping using various objects with various maps.
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
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 26 -
Experimental results
Wooden wall : mapping onto a plane
Brick wall : mapping onto a cube Map of the world : mapping onto a sphere
There is also little difference in the image quality as in the case of the previous simulation.
(a) The conventional method(b) The proposed method
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 27 -
Experimental results
Wooden wall : mapping onto a plane
Brick wall : mapping onto a cube Map of the world : mapping onto a sphere
The images don’t look vivid because these mapping methods wear the maps converted from 512×256 resolution into 512×512 resolution on the surface of the object.
However, we can hardly differentiate the image quality between these two images.
(a) The conventional method(b) The proposed method
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 28 -
Contents
IntroductionBackground and related work
Bump mapping algorithmVector rotationIllumination calculation
Hardware architectureExperimental resultsConclusions
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 29 -
Conclusions
Bump mapping method with the effective vector rotation and illumination calculation algorithm.Reduce a large amount of computations
and hardwaresGenerate nearly the same quality of
images as the conventional method
Graphics Hardware 2003Media System Lab., Yonsei Univ.
- 30 -
Thank you!!!
We appreciate NRL project supported from the Ministry of Science & Technology of Korea.NRL Project homepagehttp://msl.yonsei.ac.kr/3d/
E-mail [email protected]