"3D Graphics for Game Programming" By JungHyun Han, Jubok Kim
?h??m?n & ??ll/?R?, ??yl?r and Fr?n?is | 2011 | ISBN: 1439827370 9781439827376 9781439827383 | 326 pages | PDF | 30 MB
Designed for advanced undergraduate and beginning graduate courses, this book presents must-know information for success in interactive graphics. Assuming a minimal prerequisite understanding of vectors and matrices, it also provides sufficient mathematical background for game developers to combine their previous experience in graphics API and shader programming with the background theory of computer graphics.Well organized and logically presented, this book takes its organizational format from GPU programming and presents a variety of algorithms for programmable stages along with the knowledge required to configure hard-wired stages. Easily accessible, it offers a wealth of elaborate 3D visual presentations and includes additional theoretical and technical details in separate shaded boxes and optional sections. Maintaining API neutrality throughout to maximize applicability, the book gives sample programs to assist in understanding. ContentsPreface1 Modeling in Game Production1.1 Game Production Pipeline 1.2 Polygon Mesh 1.2.1 Polygon Mesh Creation1.2.2 Polygon Mesh Representation 1.2.3 Surface Normal 1.3 Model Export and Import 1.4 Coordinate Systems 2 Vertex Processing2.1 World Transform 2.1.1 Affine Transforms and Homogeneous Coordinates 2.1.2 World Matrix 2.1.3 Euler Transform 2.1.4 Transform of Surface Normals 2.2 View Transform 2.2.1 Camera Space 2.2.2 Space Change and View Matrix 2.3 Per-vertex Lighting 2.4 Projection Transform 2.4.1 View Frustum 2.4.2 Projection Matrix 2.4.3 Derivation of Projection Matrix3 Rasterization3.1 Clipping 3.2 Perspective Division 3.3 Back-face Culling 3.4 Coordinate Systems - Revisited3.4.1 3ds Max to OpenGL - Axis Flipping 3.4.2 OpenGL to Direct3D - Reflection 3.4.3 OpenGL to Direct3D - Vertex Reordering 3.5 Viewport Transform 3.6 Scan Conversion 3.7 Application: Object Picking3.7.1 Computing World-space Ray 3.7.2 Ray-object Intersection Test 4 Fragment Processing and Output Merging4.1 Texturing 4.1.1 Texture Coordinates 4.1.2 Surface Parameterization 4.1.3 Texture Coordinates to Texel Address 4.2 Output Merging 4.2.1 Z-buffering 4.2.2 Alpha Blending 4.3 Z-culling 4.3.1 Tile-based Culling 4.3.2 Application: Pre-Z Pass 5 Illumination and Shaders5.1 Phong Lighting Model 5.1.1 Diffuse Reflection 5.1.2 Specular Reflection 5.1.3 Ambient Reflection 5.1.4 Emissive Light 5.2 Shaders and Shading Languages 5.2.1 Vertex and Fragment Shaders 5.2.2 High-Level Shading Language 5.3 Lighting in the Pipeline 5.3.1 Per-vertex Lighting in HLSL5.3.2 Per-vertex Lighting vs. Per-fragment Lighting 5.3.3 Per-fragment Lighting in HLSL 5.4 Global Illumination 5.4.1 Ray TVacing 5.4.2 Radiosity 6 Parametric Curves and Surfaces6.1 Parametric Curves 6.1.1 Bezier Curves 6.1.2 Hermite Curve and Catmull-Rom Spline 6.2 Application: Camera Path 6.3 Bezier Surfaces 6.3.1 Bilinear Patch 6.3.2 Biquadratic Bezier Patch 6.3.3 Bicubic Bezier Patch 6.3.4 Bezier Triangle 7 Shader Models7.1 Shader Model 4 and Geometry Shader 7.2 Application: Dynamic Particle System 7.2.1 Physics-based Simulation of Particles 7.2.2 Fireworks Simulation 7.2.3 Fireworks Rendering 7.3 Shader Model 5 and Tessellation 7.4 Application: PN-triangles 7.4.1 Computing Control Points 7.4.2 Computing Control Normals 7.4.3 PN-triangle Tessellation 8 Image Texturing8.1 Texture Addressing Mode 8.2 Texture Filtering 8.2.1 Magnification 8.2.2 Minification 8.3 Mipmapping 8.3.1 Mipmap Construction 8.3.2 Mipmap Filtering 8.3.3 Options for Mipmap Filtering 8.4 Anisotropic Filtering 9 Bump Mapping9.1 Height Field 9.2 Normal Mapping 9.2.1 Normal Map 9.2.2 Algorithm for Normal Mapping 9.3 Tangent-space Normal Mapping 9.3.1 Algorithm for Tangent-space Normal Mapping 9.3.2 Tangent Space Computation9.4 Authoring of Normal Map 9.5 Parallax Mapping 9.6 Displacement Mapping 10 Advanced Texturing10.1 Environment Mapping 10.1.1 Cube Mapping 10.1.2 Cube Map Access10.1.3 Dynamic Cube Mapping 10.2 Light Mapping 10.2.1 Diffuse Light Mapping 10.2.2 Radiosity Normal Mapping10.3 Shadow Mapping 10.3.1 Algorithm for Shadow Mapping 10.3.2 Shader Codes for Shadow Mapping10.3.3 Shadow Map Filtering 10.4 Ambient Occlusion 10.5 Deferred Shading 11 Character Animation11.1 Keyframe Animation 11.2 Rotation 11.2.1 Interpolation of Euler Angles 11.2.2 Quaternion Representation 11.2.3 Rotation Using Quaternion 11.2.4 Interpolation of Quaternions 11.3 Hierarchical Modeling and Space Change 11.3.1 Hierarchical Model 11.3.2 Space Change between Bones 11.3.3 World Space to Bone Space 11.4 Forward Kinematics 11.5 Skinning and Keyframe Animation 11.5.1 Skinning 11.5.2 Skinning in Keyframe Animation 11.6 Inverse Kinematics 11.6.1 Analytic Solution 11.6.2 Cyclic Coordinate Descent 12 Physics-based Simulation12.1 Penalty Method 12.2 Impulse Method 12.2.1 Impulse 12.2.2 Impulse-based Collision Resolution 12.3 Collision Detection 12.3.1 Bounding Volumes and Their Hierarchy12.3.2 TViangle-triangle Intersection ReferencesErrata