Game Physics Engine Development



tải về 6.67 Mb.
Chế độ xem pdf
trang6/292
Chuyển đổi dữ liệu24.10.2023
Kích6.67 Mb.
#55399
1   2   3   4   5   6   7   8   9   ...   292
Ian Millington-Game Physics Engine Development-EN

C
H A P T E R
16
S
TA B I L I T Y
A N D
O
P T I M I Z AT I O N
375
16.1
S
TA B I L I T Y
375
16.1.1 Quaternion Drift
376
16.1.2 Interpenetration on Slopes
377
16.1.3 Integration Stability
379
16.1.4 The Benefit of Pessimistic Collision Detection
380
16.1.5 Changing Mathematical Accuracy
381
16.2
O
P T I M I Z AT I O N S
383
16.2.1 Sleep
383
16.2.2 Margins of Error for Penetration and Velocity
390
16.2.3 Contact Grouping
393
16.2.4 Code Optimizations
394
16.3
S
U M M A R Y
397
C
H A P T E R
17
P
U T T I N G
I
T
A
L L
T
O G E T H E R
399
17.1
O
V E R V I E W O F
T H E
E
N G I N E
399
17.2
U
S I N G
T H E
P
H Y S I C S
E
N G I N E
401
17.2.1 Ragdolls
402
17.2.2 Fracture Physics
405
17.2.3 Explosive Physics
411
17.3
L
I M I TAT I O N S O F
T H E
E
N G I N E
418
17.3.1 Stacks
418
17.3.2 Reaction Force Friction
419
17.3.3 Joint Assemblies
419
17.3.4 Stiff Springs
419
17.4
S
U M M A R Y
419
P
A R T
V I
W
H AT
C
O M E S
N
E X T
?
4 2 1
C
H A P T E R
18
O
T H E R
T
Y P E S
O F
P
H Y S I C S
423
18.1
S
I M U LTA N E O U S
C
O N TA C T
R
E S O LU T I O N
423


Physics Engine Design
xv
18.1.1 The Jacobian
424
18.1.2 The Linear Complementary Problem
425
18.2
R
E D U C E D
C
O O R D I N AT E
A
P P R O A C H E S
428
18.3
S
U M M A R Y
429
A
P P E N D I C E S
A
C
O M M O N
I
N E R T I A
T
E N S O R S
431
A.1
D
I S C R E T E
M
A S S E S
431
A.2
C
O N T I N U O U S
M
A S S E S
432
A.3
C
O M M O N
S
H A P E S
432
A.3.1 Cuboid
432
A.3.2 Sphere
432
A.3.3 Cylinder
433
A.3.4 Cone
433
B
U
S E F U L
F
R I C T I O N
C
O E FFI C I E N T S
F O R
G
A M E S
434
C
O
T H E R
P
R O G R A M M I N G
L
A N G U A G E S
435
C.1
C
435
C.2
J
AVA
436
C.3
C
O M M O N
L
A N G UA G E
R
U N T I M E
( . N E T )
436
C.4
L
UA
436
D
M
AT H E M AT I C S
S
U M M A R Y
438
D.1
V
E C T O R S
438
D.2
Q
UAT E R N I O N S
439
D.3
M
AT R I C E S
440
D.4
I
N T E G R AT I O N
441
D.5
P
H Y S I C S
442
D.6
O
T H E R
F
O R M U L A E
443
B
I B L I O G R A P H Y
445
I
N D E X
447


L
I S T
O F
F
I G U R E S
1.1
Trigonometry and coordinate geometry
9
2.1
Three-dimensional coordinates
16
2.2
Left- and right-handed axes
20
2.3
A vector as a movement in space
21
2.4
The geometry of scalar–vector multiplication
25
2.5
The geometry of vector addition
25
2.6
Geometric interpretation of the scalar product
31
2.7
Geometric interpretation of the vector product
34
2.8
Same average velocity, different instantaneous velocity
37
4.1
Screenshot of the ballistic demo
57
4.2
Screenshot of the bigballistic demo
59
4.3
Screenshot of the fireworks demo
60
6.1
The game’s camera attached to a spring
83
6.2
A rope-bridge held up by springs
86
6.3
A buoyant block submerged and partially submerged
89
6.4
A non-stiff spring over time
93
6.5
A stiff spring over time
94
6.6
The rest length and the equilibrium position
99
7.1
Contact normal is different from the vector between objects in contact
107
7.2
Interpenetrating objects
112
7.3
Interpenetration and reality
113
7.4
Vibration on resting contact
116
7.5
Resolving one contact may resolve another automatically
121
8.1
Screenshot of the bridge demo
140
8.2
Screenshot of the platform demo
141
9.1
The angle that an object is facing
146
9.2
The circle of orientation vectors
147
9.3
The relative position of a car component
149
xvi


List of Figures
xvii
9.4
The car is rotated
150
9.5
Aircraft rotation axes
153
9.6
A matrix has its basis changed
185
10.1
A force generating zero torque
198
10.2
The moment of inertia is local to an object
202
11.1
Screenshot of the flightsim demo
221
11.2
Different centers of buoyancy
223
11.3
Screenshot of the sailboat demo
227
12.1
A spherical bounding volume
234
12.2
A spherical bounding volume hierarchy
236
12.3
Bottom-up hierarchy building in action
242
12.4
Top-down hierarchy building in action
243
12.5
Insertion hierarchy building in action
244
12.6
Working out a parent bounding sphere
247
12.7
Removing an object from a hierarchy
248
12.8
A sub-object bounding volume hierarchy
250
12.9
A binary space partition tree
255
12.10 Identifying an object’s location in a quad-tree
256
12.11 A quad-tree forms a grid
258
12.12 An object may occupy up to four same-sized grid cells
261
13.1
An object approximated by an assembly of primitives
265
13.2
Collision detection and contact generation
266
13.3
Cases of contact
267
13.4
The relationship between the collision point, collision normal,
and penetration depth
268
13.5
The point–face contact data
270
13.6
The edge–edge contact data
270
13.7
The edge–face contact data
271
13.8
The face–face contact data
272
13.9
The difference in contact normal for a plane and a half-space
278
13.10 Contacts between a box and a plane
280
13.11 The half-sizes of a box
281
13.12 Contacts between a box and a sphere
282
13.13 Separating axes between a box and a sphere
284
13.14 Contact between two boxes
288
13.15 Replacing face–face and edge–face contacts between boxes
289
13.16 The projection of two boxes onto separating axes
290
13.17 Sequence of contacts over two frames
292
13.18 Projection of a point–face contact
294
13.19 Determining edge–edge contacts
296


xviii
List of Figures
14.1
The rotational and linear components of a collision
303
14.2
Three objects with different bounce characteristics
305
14.3
The three sets of coordinates: world, local, and contact
307
14.4
Linear projection causes realism problems
322
14.5
Velocity-based resolution introduces apparent friction
323
14.6
Nonlinear projection is more believable
324
14.7
Nonlinear projection does not add friction
324
14.8
Angular motion cannot resolve the interpenetration
328
14.9
Angular resolution causes other problems
329
14.10 Data flow through the physics engine
331
14.11 Resolution order is significant
338
14.12 Repeating the same pair of resolutions
339
14.13 Resolving penetration can cause unexpected contact changes
341
15.1
A reaction force at a resting contact
352
15.2
The long-distance dependence of reaction forces
354
15.3
Micro-collisions replace reaction forces
355
15.4
A microscopic view of static and dynamic friction
361
15.5
Anisotropic friction
362
15.6
The problem with sequential contact resolution
373
16.1
Objects drift down angled planes
377
16.2
Collisions can be missed if they aren’t initially in contact
381
16.3
A chain of collisions is awakened
390
16.4
Iterative resolution makes microscopic changes
391
16.5
Sets of independent contacts
393
17.1
Data flow through the physics engine
401
17.2
Screenshot of the ragdoll demo
402
17.3
Closeup of a ragdoll joint
403
17.4
Pre-created fractures can look very strange for large objects
406
17.5
Screenshot of the fracture demo
407
17.6
The fractures of a concrete block
408
17.7
The cross section of force across a compression wave
415
17.8
Screenshot of the explosion demo
418



tải về 6.67 Mb.

Chia sẻ với bạn bè của bạn:
1   2   3   4   5   6   7   8   9   ...   292




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương