Culling - Computer Graphics Lab, GIST

Culling - Computer Graphics Lab, GIST
CT5510: Computer Graphics
Culling
BOCHANG MOON
Culling
•
An optimization process that removes invisible geometry to speed up rendering
•
Three types of culling
◦ View volume culling
◦ Occlusion culling
◦ Back‐face culling
View Volume Culling
•
A process to remove geometry that is outside the view volume
•
Q. why do we need to do this culling?
•
Q. how do we efficiently identify the object that is totally outside of the volume?
Screen space
View Volume Culling
•
A process to remove geometry that is outside the view volume
•
Q. why do we need to do this culling?
Eye (camera) space Object space
Screen space
Modeling transformation
World space
Viewing
transformation
Projection
Transformation
Viewport
Transformation
Canonical view volume (normalized device coordinates)
View Volume Culling
•
A process to remove geometry that is outside the view volume
•
Q. how do we efficiently identify the object that is totally outside of the volume?
◦ A bounding volume can be utilized. Why?
Screen space
View Volume Culling
•
Simple bounding volumes
◦ Bounding box
◦ e.g., axis‐aligned bounding box (AABB)
◦ Bounding sphere
View Volume Culling
•
Need identify the three cases
inside
intermediate
outside
Background: Implicit Functions
•
2D implicit curves
y
,
x
•
3D implicit surfaces
◦
, ,
0
0
Background: Implicit Functions
•
Infinite plane through point a with surface normal n
·
◦
0
◦ The surface normal n is a vector perpendicular to the plane.
◦ When a point is on the plane, · will be zero.
◦ Recall the definition of a dot product
◦
·
∥
∥∥
∥
View Volume Culling
•
We can check the following:
◦
·
∥ ∥
◦ c: center of the bounding sphere
◦ r: radius of the sphere
◦ Q. what’s the geometric meaning of ·
∥ ∥
?
a
n
c
Background: Dot Product
•
Vector multiplications
a
◦ Dot product (scalar product)
·
◦
∥
∥∥
→
◦ Usage: →
◦
∥
∥
projection of a vector to another one
·
∥ cos
∥ ∥
b
◦ Note: this is the length of the projected vector onto b
◦ Dot product in Cartesian coordinates
◦ Properties:
·
·
·
◦
0
·
·
◦
◦
◦ In 3D,
◦
1 and ·
·
·
·
·
View Volume Culling
•
Need identify the three cases
inside
intermediate
·
·
∥
∥
outside
∥
∥
·
∥
∥
View Volume Culling
•
Q. can we optimize our pipeline further?
intermediate
·
∥
∥
Hierarchical Culling
•
If a bounding volume is intermediate, ◦ Check its left and right children
Back‐Face Culling
•
If the angle between the view and normal is within a range (‐90 to 90 degrees), the triangle is visible.
◦ cos
0
e
n
Back‐Face Culling
•
If the angle between the view and normal is within a range (‐90 to 90 degrees), the triangle is visible.
◦ cos
◦ ·
0
0
◦ Dot product
◦
·
∥
∥∥
∥
e
n
Back‐Face Culling
•
Assumption for the back‐face culling:
◦ Models are closed (i.e., no holes).
Further Readings
•
Chapter 2.5
•
Chapter 8.4 and 12
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement