Frustum Culling in OpenGL. Ref: MarkMoley.com. Culling Techniques. Outline. Introduction View Frustum Plane Equation Frustum Plane Extraction Frustum/Point/Sphere Inclusion Tests. Definition (View Frustum). the volume of space that includes everything visible from a given viewpoint
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Frustum Culling in OpenGL
Ref: MarkMoley.com
Fall 2006 revised
Fall 2006 revised
Fall 2006 revised
Fall 2006 revised
Fall 2006 revised
Fall 2006 revised
Fall 2006 revised
Fall 2006 revised
Fall 2006 revised
u
s
t
M
P
Fall 2006 revised
u
s
t
M
P
c : product of PM
In OpenGL,clip volume is [-1,1]3
Fall 2006 revised
uy
ux
-1
1
Left
Fall 2006 revised
The left plane in clip coordinate:
The corresponding equation in world coordinate:
uy
ux
-1
1
Left
Fall 2006 revised
uy
ux
-1
1
Right
Fall 2006 revised
The right plane in clip coordinate:
The corresponding equation in world coordinate:
Right
uy
ux
-1
1
Fall 2006 revised
Fall 2006 revised
The valid sides of all halfspaces are > 0
Fall 2006 revised
p
p
PointInOffsetFrustum Test
Minkowski sum of sphere and frustum
Fall 2006 revised
Coordinate dependent!
Fall 2006 revised
uy
ux
-1
1
Left
d<0
Fall 2006 revised
Fall 2006 revised
View-frustum culling
Ray-tracing
Collision detection
Fall 2006 revised
View-frustum culling
Ray-tracing
Collision detection
Fall 2006 revised
View-frustum culling
Ray-tracing
Collision detection
Fall 2006 revised
View-frustum culling
Ray-tracing
Collision detection
Fall 2006 revised
Fall 2006 revised
Fall 2006 revised
Epilogue
Portal rendering
World coordinates?!
Plane representation in R3
Fall 2006 revised
Similar to building walkthrough
Occlusions in scene are common (culling important)
Geometric database can be huge; preprocessing is required to facilitate smooth viewing
Fall 2006 revised
Potential visible set (PVS)
only load the rooms that are visible from the current room
Fall 2006 revised
1
7
2
4
3
6
5
E
M
B
8
L
C
R
Ki
K
M
Portal Rendering
B
1
4
E
2
C
7
3
6
5
L
8
R
K
Fall 2006 revised
Ki
Fall 2006 revised
u
s
t
M
P
But aren’t slocal coordinates?
Fall 2006 revised
Modelview
Matrix
Viewing
Transform
Model
Transform
world
coordinates
Fall 2006 revised
the scene is (mostly) static and specified in their world coordinate (the modeling transform is identity)
the viewer navigates around them, changing the viewing transform only
Fall 2006 revised
Modelview
Matrix
Viewing
Transform
Model
Transform
world
coordinates
I
t
u
s
t = PMs
M : viewing transform
s : world coordinate
Fall 2006 revised
x–z+10
L
R
–x–z+10
X
Z
Fall 2006 revised
x: pivot variable
Fall 2006 revised
n
x
p
Fall 2006 revised
Fall 2006 revised
Compute and display the screen-space bounding box of an AABB (axis-aligned bounding box)
Convert world coordinates to clip coordinates, perspective-divide to get window coordinates
Useful in GPU-assisted collision detection applications
Fall 2006 revised
Useful for projective texturing (showing where the projector is)
Useful for illustrating frustum culling
Given [-1,1]3 clip coordinates, determine their corresponding world coordinates to render
Fall 2006 revised