Gouraud Shading .......................................61
Phong Shading ........................................63
Light Maps ..........................................63
Texture Mapping ...........................................64
Step 1: Define a Texture .....................................65
Storing Texture Data .....................................66
Classes for Loading Textures from Disk ...........................68
Practical Issues in Dealing with Texture Image Files.....................73
Step 2: Define a Texture Space .................................74
Step 3: Map Between Texture Space and World Space .....................76
Calc: A Symbolic Algebra Package..............................79
Starting and Exiting Calc ...................................79
Stack-Based Computation...................................80
Entering and Editing Mathematical Entities .........................82
Solving Systems of Equations ................................85
Solving the Texture Mapping Equations with Calc......................86
Step 4: Reverse Project from Screen Coordinates into Texture Coordinates ..........89
Step 5: Map Texture Coordinates to Integer Indices and Draw .................92
An Optimized Texture Mapping Strategy: u/z, v/z, 1/z .....................93
The Division Operation and Texture Mapping ........................95
Associating Textures with 3D Polygons .............................96
Rasterization Classes for 3D Polygons .............................98
An Abstract 3D Rasterizer: l3d_rasterizer_3d ........................98
A Software 3D Rasterizer Implementation: l3d_rasterizer_3d_sw_imp ..........101
A Mesa/OpenGL 3D Rasterizer Implementation: l3d_rasterizer_3d_mesa_imp ......115
Sample Program: textest ....................................129
Light Mapping Revisited ......................................135
Software Light Mapping ....................................136
Surfaces ...........................................136
Surface Cache ........................................141
Light Mapped Polygons ...................................142
Software Rasterization of Light Maps ............................147
Hardware Light Mapping ....................................147
Sample Program: lightmap ...................................151
Shadows and Light Maps ....................................159
Summary ..............................................160
Chapter 3 3D Modeling with Blender.....................161
Tutorial: Creating and Exporting Compatible, Textured 3D Morph Targets ...........161
The Starting Morph Mesh....................................162
Inserting Two Morph Targets into Blender...........................163
Deforming the Mesh ......................................165
Applying a Texture and Assigning Texture Coordinates....................167
Testing the Morph in Blender..................................173
Exporting the Two Morph Targets ...............................173
Exporting the Texture Information ...............................174
Importing the Morph Targets into a Program .........................175
Tutorial: Using Inverse Kinematics and Roto- scoping to Model a
Walking Human Figure .......................................180
Inverse Kinematics: Definition .................................181
Creating an Ika Chain in Blender................................183
iv Contents
评论7
最新资源