Linux 3D Graphics Programming 9781556227233, 155622723X

I am a senior at University of DeVry in Game and Simlution Programming and this book fits in right with what I am learni

352 109 9MB

English Pages 641 Year 2001

Report DMCA / Copyright

DOWNLOAD DJVU FILE

Table of contents :
Advance Linux 3d Graphics Programming......Page 1
Contents......Page 4
Acknowledgments......Page 11
Preface......Page 12
Goals of This Text......Page 13
Organization of the Book and the Code......Page 15
Typographical Conventions Used in This Book......Page 17
2D Graphics Fundamentals......Page 18
3D Graphics Fundamentals......Page 20
3D Coordinate Systems and Vectors......Page 21
Perspective Projection......Page 22
Specific Matrix Transformations......Page 23
Other Matrix Properties......Page 24
Sample l3d Program......Page 25
Overview of l3d Classes......Page 36
Linux 3D Modeling......Page 49
Blender Interface and Commands......Page 50
Exporting and Importing Blender Models......Page 53
Summary......Page 54
Vertex Animation and 3D Morphing......Page 56
Sample Program: morph3d......Page 57
Lighting......Page 65
Mathematical Models for Computing Light......Page 66
Rendering Techniques for Drawing Light......Page 77
Texture Mapping......Page 81
Step 1: Define a Texture......Page 82
Step 2: Define a Texture Space......Page 91
Step 3: Map Between Texture Space and World Space......Page 93
Step 4: Reverse Project from Screen Coordinates into Texture Coordinates......Page 106
Step 5: Map Texture Coordinates to Integer Indices and Draw......Page 109
An Optimized Texture Mapping Strategy: u/z, v/z, 1/z......Page 110
Associating Textures with 3D Polygons......Page 113
Rasterization Classes for 3D Polygons......Page 115
Sample Program: textest......Page 146
Light Mapping Revisited......Page 152
Software Light Mapping......Page 153
Hardware Light Mapping......Page 164
Sample Program: lightmap......Page 168
Shadows and Light Maps......Page 176
Summary......Page 177
Tutorial: Creating and Exporting Compatible, Textured 3D Morph Targets......Page 178
The Starting Morph Mesh......Page 179
Inserting Two Morph Targets into Blender......Page 180
Deforming the Mesh......Page 182
Applying a Texture and Assigning Texture Coordinates......Page 184
Exporting the Two Morph Targets......Page 190
Exporting the Texture Information......Page 191
Importing the Morph Targets into a Program......Page 192
Tutorial: Using Inverse Kinematics and Roto-scoping to Model a Walking Human Figure......Page 197
Inverse Kinematics: Definition......Page 198
Working with Ika Chains......Page 200
Creating the Arm Ikas......Page 201
Parenting the Ikas into a Hierarchy......Page 202
Testing the Ika Chains......Page 204
Animating the Ika Chains......Page 205
Connecting Ika Chains and Meshes......Page 206
Texturing and Exporting the Model......Page 207
Importing the Textured Ika Meshes......Page 209
Rotoscoping and Inverse Kinematics......Page 214
Programming IK and FK......Page 217
Summary......Page 218
Visible Surface Determination I: General Techniques......Page 220
The Goals of VSD......Page 221
Back-Face Culling......Page 224
Sample Program: backface......Page 226
Defining a View Frustum......Page 235
Hierarchical View Frustum Culling......Page 240
Sample Program: frustum......Page 250
The Painter’s Algorithm......Page 259
The Z Buffer Algorithm......Page 262
General Observations about the Z Buffer......Page 263
A Software Z Buffer: Class l3d_rasterizer_3d_zbuf_sw_imp......Page 265
Mesa/OpenGL Z Buffering......Page 274
Factory Manager for Z Buffered Rasterizers......Page 278
Sample Program: texzbuf......Page 280
Z Buffer-like Algorithms......Page 281
Summary......Page 283
Binary Space Partitioning Trees, Octrees, and Regular Spatial Partitioning......Page 284
Using a BSP Tree to Partially Pre-sort Polygons......Page 288
Sample Program: bsp......Page 293
Leafy BSP Trees: Automatic Convex Partitioning of Space......Page 310
Axis-aligned BSP Trees and Mini BSP Trees......Page 319
BSP Tree as a Multi-resolution Solid-Modeling Representation......Page 320
Octrees......Page 323
The Main Ideas Behind the Portal Algorithm......Page 325
Rendering a Portal World......Page 327
Observations about the Portal Scheme......Page 330
Classes for Portals and Sectors......Page 339
Sample Program: porlotex......Page 370
Other VSD Algorithms......Page 373
Summary......Page 374
End of Book 3......Page 294
Blender and World Editing......Page 376
No World Editor......Page 377
Write Your Own World Editor......Page 378
Adapt an Existing Editor......Page 379
Using Blender for Portal Worlds......Page 380
Main Ideas of a Blender Portal World Editor......Page 381
Step-by-Step Guide to World Design......Page 384
Data Flow within the World Editing System......Page 385
Creating Sectors and Portals......Page 386
Tutorial: Creating Aligned Portals via Extrusion and Separation......Page 388
Tutorial: Aligning Portals from Separate Meshes......Page 391
Tips for Working with Portals......Page 399
Portalization: Generating Portal Connectivity......Page 402
Perl Scripts......Page 404
Architecture of the Perl Portalization System......Page 406
Embedding Location, Orientation, Texture, Actor, and Other Information into Meshes......Page 447
Basic Ideas of Associating Attributes with Objects......Page 448
Specific Mesh Attributes Used by the Portalization System......Page 454
Program Listings for blend_at......Page 463
Tutorial: Creating a Textured Room with Actors......Page 480
Tips for Working with Attributes......Page 490
Summary of Blender and Portal Worlds......Page 491
Portalized Regular Spatial Partitioning......Page 492
Non-convex Sector-based Partitioning......Page 493
Summary......Page 495
Special Effects......Page 496
Environment Mapping......Page 497
Billboards......Page 501
Lens Flare......Page 503
Particle Systems......Page 504
Natural Phenomena......Page 514
Bump Mapping......Page 516
Multi-pass Techniques......Page 517
Curved Surfaces......Page 518
Level of Detail......Page 522
Landscapes......Page 526
Camera Tracking......Page 529
Summary......Page 530
Sound......Page 532
Basics of Digital Sound......Page 533
The RPlay Server......Page 536
Using TCP/IP Networking to Communicate with the Server......Page 537
Class l3d_sound_client......Page 538
Class l3d_sound_server_rplay......Page 539
The Client......Page 541
The Server......Page 543
Non-Blocking Operations......Page 546
Collision Detection......Page 547
Intersection Testing and Bounding Volumes......Page 548
Tunneling and Sweep Tests......Page 555
Multiple Simultaneous Collisions and Collision Response......Page 558
Class l3d_collidable......Page 560
Class l3d_collidable_sphere......Page 561
Class l3d_polygon_3d_collidable......Page 565
Class l3d_polygon_3d_textured_lightmapped_collidable......Page 568
Class l3d_camera_collidable......Page 569
Class l3d_world_portal_textured_lightmapped_obj_colldet......Page 570
l3d_plugin_videoscape_mesh_seeker......Page 580
Sample Program: collide......Page 591
More Advanced Collision Detection and Response......Page 593
Some Basic Concepts......Page 594
Rigid Body Dynamics......Page 595
Real-Time Update and Numerical Integration......Page 596
Artificial Intelligence......Page 597
Summary......Page 599
Game Blender/Blender 2.0......Page 600
World Foundry......Page 607
What Does This Mean for 3D Programmers?......Page 615
The Future......Page 616
Perspective......Page 617
Contents of the CD-ROM......Page 620
Quick Start Guide......Page 621
Some Comments on the Sample Programs......Page 624
Hardware Acceleration......Page 625
Porting the Code to Microsoft Windows......Page 626
Tools Used to Prepare this Book......Page 627
Resources......Page 628
3D Modeling......Page 629
General Programming......Page 630
References......Page 631
End of Book......Page 634

Linux 3D Graphics Programming
 9781556227233, 155622723X

  • Commentary
  • +OCR
  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers