Graphics Programming with DirectX 9 Module II.pdf

(33296 KB) Pobierz
Chapter One: 3d graphics fundamentals
TeamLRN
243630672.002.png
Graphics Programming with Direct X 9
Module II
(14 Week Lesson Plan)
TeamLRN
243630672.003.png
Lesson 1: Meshes
Textbook: Chapter Eight (pgs. 2 – 77)
Goals:
The course begins by introducing some of the important mesh containers provided by the
D3DX library. Discussion will center on performance issues, including attribute batching
across mesh boundaries and subset rendering, as well as optimization techniques that speed up
rendering on modern hardware. From there we will look at how to import X file geometry into
our applications as well as how to construct and fill the mesh buffers manually. This will lead
into a discussion of cloning (copying) mesh data and some of the features that can be exploited
in the process. The next topic of discussion will be the management of geometric level of detail
using view independent progressive meshes. We will look at how to construct and use
progressive meshes and see how they work algorithmically. This will lead into an examination
of one-off mesh simplification and how it can be done with D3DX support. We will conclude
this lesson with a quick overview of a number of useful mesh utility functions.
Key Topics:
ID3DXMesh Interface
o Vertex/Index/Adjacency Buffers
o Attribute Buffers and Subset Rendering
Mesh Optimization
ID3DXBuffer
Mesh Loading
Manual Mesh Creation
Mesh Cloning
ID3DXPMesh Interface
o View Independent Progressive Meshes (VIPM)
o Data Validation and Cleaning
o Setting LOD
o LOD Trimming
o Vertex History
ID3DXSPMesh Interface
Global Mesh Utility Functions
Projects:
Lab Project 8.1: The CTriMesh Class (Mesh Viewer I)
Exams/Quizzes: NONE
Recommended Study Time (hours): 8 - 10
TeamLRN
243630672.004.png
Lesson 2: Frame Hierarchies
Textbook: Chapter Nine (pgs. 2 – 87)
Goals:
In this lesson we will now look at how to import and manage more complex 3D models and
scenes. We will introduce the concepts of frame of reference and parent-child hierarchical
relationships and see how we can use these ideas to build elaborate scenes consisting of
independent, animation-ready meshes. Early on in the process we will delve into the inner
workings of X file templates to see how scene data is stored. This will set us up for a discussion
of the very important D3DXLoadMeshHierarchyFromX function, which we will use many
times in the coming lessons. Using this function properly will require an examination of the
callback mechanisms and data structures used for application memory management. We will
even talk about how to load custom data chunks. Finally, we will wrap up the lesson with a look
at how to traverse, transform, and render a hierarchy of meshes. A very simple animation
controller will be introduced during the process and in our lab project to setup our discussions
in the next lesson.
Key Topics:
Hierarchies
o Frame of Reference
o Parent/Child Relationships
X File Templates
o Open/Closed/Restricted Templates
o Hierarchical X Files
D3DXLoadMeshHierarchyFromX
ID3DXAllocateHierarchy Interface
o Allocating/De-allocating Frames
ID3DXMeshContainer Interface
o Allocating/De-allocating Mesh Containers
Extending Hierarchy Data Types
ID3DXLoadUserData Interface
o Loading Custom Top-Level Data
o Loading Customer Child Data
Hierarchy Traversal and Rendering
Simple Hierarchy Animation
Projects:
Lab Project 9.1: The CActor Class (Mesh Viewer II)
Exams/Quizzes: NONE
Recommended Study Time (hours): 10 - 12
TeamLRN
243630672.005.png
Lesson 3: Keyframe Animation I
Textbook: Chapter Ten (pgs. 2 – 64)
Goals:
In this lesson our goal will be to learn the fundamentals of animating game scenes. The
primary focus will be on using keyframe data to animate the hierarchies introduced in the
previous lesson. Our initial discussions will take us back into the inner workings of X file
templates, where we will learn about the various ways that animation data can be represented
and how it all translates into D3DX data structures. From there we will begin our exploration
of the powerful animation system available in DirectX. This exploration will involve
understanding how the animation controller interpolates keyframe data and how that process
can be controlled using various subsystems in the controller. Along the way we will examine
the construction of a custom animation set object that can be plugged into the D3DX
animation system.
Key Topics:
Animation Blending
o The Animation Mixer
Setting track weight, speed, priority
Enable/Disable Tracks
o Priority Blending
Animation Controller Cloning
The Animation Sequencer
o Registering Events
o Event Handles
The Animation Callback System
o Callback keys and animation sets
o Executing callback functions
o ID3DXAnimationCallbackHandler Interface
Projects:
Lab Project 10.1: Animated CActor (Mesh Viewer III)
Lab Project 10.2: The Animation Splitter
Exams/Quizzes: NONE
Recommended Study Time (hours): 10 – 12
TeamLRN
243630672.001.png
Zgłoś jeśli naruszono regulamin