Upload
mireya
View
30
Download
0
Embed Size (px)
DESCRIPTION
3D Game Design Chapter 4. Hierarchical Scene Representation ( 4.3 Rendering a Scene Graph ). Networked Virtual Computing Lab. Yun-Seok Lee. Basic Concept. View frustum The portion of the world to be viewed The world bounding volume is used to determine whether the object is culled or not. - PowerPoint PPT Presentation
Citation preview
3D Game DesignChapter 4. Hierarchical Scene Representation( 4.3 Rendering a Scene Graph )
Networked Virtual Computing Lab.Yun-Seok Lee
Basic Concept
View frustum The portion of the world to be viewed
The world bounding volume is used to determine whether the object is culled or not.Geometry classes could provide a Boolean flag indicating whether the world data is current or not.
1. Culling by Spheres
View frustum plane is specified by N • X = d
The culling condition N • C – d < -r N : unit-length vector that points to the interior of the
frustum C : center of the bounding sphere r : radius of the sphere The left side of the inequality is the signed distance f
rom C to plane.
2. Culling by Oriented Boxes
A box is culled. If all its vertices are outside the
plane.
Vertices, distance and
The culling condition The test is identical to that of sphere, except that r
is known for the sphere but must be calculated for each test of a box.
222111000 AaAaAaCV
222111000)( ANaANaANaCdCNdVN
|||||| 221100 ANaANaANar
rdCN
radius
3. Culling by CapsulesA capsule A radius r > 0 A parameterized line segment. P + tD, where D≠0 and t∈[0,
1].The signed distances from plane to end points.
The culling condition if
if // culled else if
if // culled
dPN
0
dDPN )(1
0 DN
rdPN
0 DN
rdDPN )(
4. Culling by LozengesA lozenge A radius r > 0 A parameterized rectangle P + sE0 + tE1, where E0 ≠ 0, E1≠0,
E0 E• 1=0, (s,t)∈[0,1]2.The four rectangle corners P00 = P, P10 = P + E0, P01 = P + E1, P11
= P + E0 + E1.The signed distances If any of the signed distances are nonnegative, then the lozenge is
not culled. The distance of the nearest corner to the plane is nonnegative, th
en the lozenge is not culled.
dPN ijij
5. Culling by CylindersA cylinder A radius r > 0. a height h∈[0,∞]. A parameterized segment C + tW, where |W|=1 and t∈[-h/2, h/2]. U, V and W is an orthonormal set. , and
The culling condition if
if // culled else if
If or If / culled
)sin()()cos()()()( 2 ArVNArUNdCNyWN
dXN 22
120 ryy 2/2 hy
rdCN
0WN
0WN
2/)min( 2 hy 2/)max( 2 hy
WN
WNCNdy
2
2
)(1
rdCN
WyVyUyCX
210
6. Culling by EllipsoidsAn ellipsoids , where, M is a positive definite m
atrix. If C + sN is outside the frustum plane, an ellipsoid is out
side.A radius of an ellipsoid The points X that project to the end points of the interval
must occur where the normals to the ellipsoid are parallel to N.
-> -> -> -> // culled
1)()()( CXMCXXQ T
)(2 CXMQ
NCXM
)( NMCX
1 NMNNMMNM TT 12112 )()(1
NMNCXNr T
1)( NMNr T
1
rdCN