SlideShare a Scribd company logo
1 of 42
Beginning Direct3D Game Programming:
6. First Steps to Animation
jintaeks@gmail.com
Division of Digital Contents, DongSeo University.
April 2016
Understanding Transformations
 At the head of the pipeline, a model's vertices are declared
relative to a local coordinate system. This is a local origin
and an orientation.
2
World Transform
 The first stage of the geometry pipeline transforms a model's
vertices from their local coordinate system to a coordinate
system that is used by all the objects in a scene. The process
of reorienting the vertices is called the world transform.
3
View Transform
 In the next stage, the vertices that describe your 3D world are
oriented with respect to a camera. That is, your application
chooses a point-of-view for the scene, and world space
coordinates are relocated and rotated around the camera's
view, turning world space into camera space.
4
Projection Transform
 In this part of the pipeline, objects are usually scaled with
relation to their distance from the viewer in order to give
the illusion of depth to a scene; close objects are made to
appear larger than distant objects, and so on.
5
Clipping
 In the final part of the pipeline, any vertices that will not be
visible on the screen are removed.
6
Transform Pipeline
7
World Transform
 You move an object in a 3D world using a world
transformation.
 Figure 6.1 shows two cubes that are the same size but have
different positions and orientations.
8
 1. The cube is standing with its origin in the origin of the
world coordinate system.
 2. Rotate the cube.
 3. Move the cube to its new position.
9
 1. The cube is standing with its origin in the origin of the
world coordinate system.
 2. Move the cube to its new position.
 3. Rotate the cube.
10
 A 4×4 world matrix contains four vectors, which might
represent the orientation and position of an object.
 The u, v, and w vectors describe the orientation of the
object’s vertices compared to the world coordinate system.
 The t vector describes the position of the object’s vertex
compared to the world coordinate system.
 Every vertex of the cube gets the correct orientation and
position by being multiplied by this matrix.
11
 To describe the position of
the cube in Figure 6.4, you
must multiply the following
matrix by every vertex of the
cube.
12
D3DMATRIX mat;
mat._11 = 1.0f; mat._12 = 0.0f; mat._13 = 0.0f; mat._14 = 0.0f;
mat._21 = 0.0f; mat._22 = 1.0f; mat._23 = 0.0f; mat._24 = 0.0f;
mat._31 = 0.0f; mat._32 = 0.0f; mat._33 = 1.0f; mat._34 = 0.0f;
mat._41 = 2.0f; mat._42 = 2.0f; mat._43 = 2.0f; mat._44 = 1.0f;
D3DXMatrixTranslation()
 D3DXMatrixTranslation() might look like this:
inline VOID D3DXMatrixTranslation (D3DXMATRIX* m, FLOAT tx, FLOAT ty, FLOAT tz )
{
D3DXMatrixIdentity(m );
m._41 = tx; m._42 = ty; m._43 = tz;
}
=
1 0 0 0
0 1 0 0
0 0 1 0
tx ty tz 1
13
D3DXMatrixRotationY()
VOID D3DXMatrixRotationY( D3DXMATRIX* mat, FLOAT fRads )
{
D3DXMatrixIdentity(mat);
mat._11 = cosf( fRads );
mat._13 = -sinf( fRads );
mat._31 = sinf( fRads );
mat._33 = cosf( fRads );
}
=
cosf(fRads) 0 –sinf(fRads) 0
0 0 0 0
sinf(fRads) 0 cosf(fRads) 0
0 0 0 0
14
Concatenating Matrices
 One advantage of using matrices is that you can combine the
effects of two or more matrices by multiplying them.
 Use the D3DXMatrixMultiply function to perform matrix
multiplication.
15
D3DXMatrixMultiply()
D3DXMATRIX* D3DXMatrixMultiply(D3DXMATRIX* pOut
, CONST D3DXMATRIX* pM1
, CONST D3DMATRIX* pM2)
{
FLOAT pM[16];
ZeroMemory( pM, sizeof(D3DXMATRIX) );
for( WORD i=0; i<4; i++ )
for( WORD j=0; j<4; j++ )
for( WORD k=0; k<4; k++ )
pM[4*i+j] += pM1[4*i+k] * pM2[4*k+j];
memcpy( pOut, pM, sizeof(D3DXMATRIX) );
return (pOut);
}
16
IDirect3DDevice9::SetTransform
 After you prepare the world matrix, call the
IDirect3DDevice9::SetTransform method to set it, specifying
the D3DTS_WORLD macro for the first parameter.
// Set up the rotation matrix to generate 1 full rotation (2*PI radians)
// every 1000 ms. To avoid the loss of precision inherent in very high
// floating point numbers, the system time is modulated by the rotation
// period before conversion to a radian angle.
UINT iTime = timeGetTime() % 1000;
FLOAT fAngle = iTime * ( 2.0f * D3DX_PI ) / 1000.0f;
D3DXMatrixRotationY( &matWorld, fAngle );
g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
17
View Transform
 The view transform locates the viewer in world space,
transforming vertices into camera space.
 In this formula, V is the view matrix being created, T is a
translation matrix that repositions objects in the world, and Rx
through Rz are rotation matrices that rotate objects along the
x-, y-, and z-axis.
18
Setting Up a View Matrix
 The following example creates a view matrix for left-handed
coordinates.
D3DXMATRIX mView;
D3DXVECTOR3 eye(2,3,3);
D3DXVECTOR3 at(0,0,0);
D3DXVECTOR3 up(0,1,0);
D3DXMatrixLookAtLH(&mView, &eye, &at, &up);
…
g_pd3dDevice->SetTransform( D3DTS_VIEW, &mView);
19
Projection Transform
 The projection matrix is typically a scale and perspective
projection. The projection transformation converts the
viewing frustum into a cuboid shape.
20
How to Project?
Two triangles are similar.
△ABC ∽ △ A'OC
x:x' = (z+d):d
x'(z+d) = xd
x' = xd / (z+d)
y' = yd / (z+d)
z' = 0
21
22
𝑥′
𝑦′
𝑧′
1
←
𝑥 ∙ 𝑑
𝑦 ∙ 𝑑
0
𝑧 + 𝑑
=
𝑑
0
0
0
0
𝑑
0
0
0
0
0
1
0
0
0
𝑑
𝑥
𝑦
𝑧
1
𝑥′
𝑦′
𝑧′
1
←
( )
(𝑧 + 𝑑)
Setting Up a Projection Matrix in DirectX
 In this matrix, Zn is the z-value of the near clipping plane. The
variables w, h, and Q have the following meanings. Note that
fovw and fovh represent the viewport's horizontal and vertical
fields of view, in radians.
23
Trigonometric Functions
 z’=zQ-QZn
 z’=ZnQ-QZn=0
 z’=ZfQ-QZn=Q(Zf-Zn)=Zf
24
Cot(x) graph
25
D3DXMatrixPerspectiveFovLH()
D3DXMATRIX * D3DXMatrixPerspectiveFovLH(
D3DXMATRIX * pOut,
FLOAT fovy,
FLOAT Aspect,
FLOAT zn,
FLOAT zf
);
// For the projection matrix, we set up a perspective transform (which
// transforms geometry from 3D view space to 2D viewport space, with
// a perspective divide making objects smaller in the distance). To build
// a perpsective transform, we need the field of view (1/4 pi is common),
// the aspect ratio, and the near and far clipping planes (which define at
// what distances geometry should be no longer be rendered).
D3DXMATRIXA16 matProj;
D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI / 4, 1.0f, 1.0f, 100.0f );
g_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj );
26
Working with the Viewport
 Conceptually, a viewport is a two-dimensional (2D) rectangle
into which a 3D scene is projected.
 In Direct3D, the rectangle exists as coordinates within a
Direct3D surface that the system uses as a rendering target.
27
The Viewing Frustum
 A viewing frustum is 3D volume in a scene positioned
relative to the viewport's camera.
 The shape of the volume affects how models are projected
from camera space onto the screen.
28
 The viewing frustum is defined by fov (field of view) and by
the distances of the front and back clipping planes, specified
in z-coordinates.
29
Viewport Rectangle
 You define the viewport rectangle in C++ by using the
D3DVIEWPORT9 structure.
 The D3DVIEWPORT9 structure is used with the following
viewport manipulation methods exposed.
– IDirect3DDevice9::GetViewport
– IDirect3DDevice9::SetViewport
 Use IDirect3DDevice9::Clear to clear the viewport.
30
 You can use the following settings for the members of the
D3DVIEWPORT9 structure to achieve this in C++.
D3DVIEWPORT9 viewData = { 0, 0, width, height, 0.0f, 1.0f };
 After setting values in the D3DVIEWPORT9 structure, apply the
viewport parameters to the device by calling its
IDirect3DDevice9::SetViewport method.
HRESULT hr;
hr = pd3dDevice->SetViewport(&viewData);
if(FAILED(hr))
return hr;
31
Depth Buffering
 A depth buffer, often
called a z-buffer or a
w-buffer, is a property
of the device that
stores depth
information to be used
by Direct3D.
32
Creating a Depth Buffer
 To create a depth buffer that is managed by Direct3D, set the
appropriate members of the D3DPRESENT_PARAMETERS
structure.
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_COPY;
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
 …
if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT
, D3DDEVTYPE_HAL, hWnd
, D3DCREATE_SOFTWARE_VERTEXPROCESSING
, &d3dpp, &d3dDevice ) ) )
return E_FAIL;
33
Quaternion
 Quaternions contain a scalar component and a 3D vector
component.
 With the Direct3D quaternion class, you use the w, x, y, and z
components by adding .x, .y, .z, and .w to the variable names.
34
D3DXQUATERNION * D3DXQuaternionRotationAxis(
D3DXQUATERNION *pOut
, CONST D3DXVECTOR3 *pV
, FLOAT Angle
);
D3DXQUATERNION * D3DXQuaternionRotationMatrix(
D3DXQUATERNION * pOut,
CONST D3DXMATRIX * pM
);
D3DXMATRIX * D3DXMatrixRotationQuaternion(
D3DXMATRIX *pOut,
CONST D3DXQUATERNION *pQ
);
35
Tutorial 03: Using Matrices
 This tutorial introduces the concept of matrices and shows
how to use them.
– Step 1 - Defining the World Transformation Matrix
– Step 2 - Defining the View Transformation Matrix
– Step 3 - Defining the Projection Transformation Matrix
36
Step 1 - Defining the World Transformation Matrix
 The world transformation matrix defines how to translate,
scale, and rotate the geometry in the 3D model space.
D3DXMATRIX matWorld;
D3DXMatrixRotationY( &matWorld, timeGetTime()/150.0f );
g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
37
Step 2 - Defining the View Transformation Matrix
 The view transformation matrix defines the position and
rotation of the view. The view matrix is the camera for the
scene.
D3DXVECTOR3 vEyePt ( 0.0f, 3.0f,-5.0f );
D3DXVECTOR3 vLookatPt( 0.0f, 0.0f, 0.0f );
D3DXVECTOR3 vUpVec ( 0.0f, 1.0f, 0.0f );
D3DXMATRIXA16 matView;
D3DXMatrixLookAtLH( &matView, &vEyePt, &vLookatPt, &vUpVec );
g_pd3dDevice->SetTransform( D3DTS_VIEW, &matView );
38
Step 3 - Defining the Projection Transformation Matrix
 The projection transformation matrix defines how geometry is
transformed from 3D view space to 2D viewport space.
D3DXMATRIX matProj;
D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/4, 1.0f, 1.0f, 100.0f );
g_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj );
39
Practice
 Achieve similar animation by setting View Matrix.
 Rotate the triangle about x-axis.
 Translate the triangle about (5,5,0), then rotate.
 Rotate the triangle, the translate (5,5,0).
– Check differences between two transforms.
 Modify the Fov of Projection matrix and check the visual
differences.
40
References
41
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks

More Related Content

What's hot

CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingMark Kilgard
 
SwiftGirl20170904 - Apple Map
SwiftGirl20170904 - Apple MapSwiftGirl20170904 - Apple Map
SwiftGirl20170904 - Apple MapHsiaoShan Chang
 
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping종빈 오
 
Trident International Graphics Workshop 2014 5/5
Trident International Graphics Workshop 2014 5/5Trident International Graphics Workshop 2014 5/5
Trident International Graphics Workshop 2014 5/5Takao Wada
 
Fingerprint High Level Classification
Fingerprint High Level ClassificationFingerprint High Level Classification
Fingerprint High Level ClassificationReza Rahimi
 
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...홍배 김
 
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps종빈 오
 
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
Getting Started with 3D Game Development on Nokia Series 40 Asha PhonesGetting Started with 3D Game Development on Nokia Series 40 Asha Phones
Getting Started with 3D Game Development on Nokia Series 40 Asha PhonesMicrosoft Mobile Developer
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processingMohammed Kamel
 
Vector Distance Transform Maps for Autonomous Mobile Robot Navigation
Vector Distance Transform Maps for Autonomous Mobile Robot NavigationVector Distance Transform Maps for Autonomous Mobile Robot Navigation
Vector Distance Transform Maps for Autonomous Mobile Robot NavigationJanindu Arukgoda
 
DeepXplore: Automated Whitebox Testing of Deep Learning
DeepXplore: Automated Whitebox Testing of Deep LearningDeepXplore: Automated Whitebox Testing of Deep Learning
DeepXplore: Automated Whitebox Testing of Deep LearningMasahiro Sakai
 
Brief intro : Invariance and Equivariance
Brief intro : Invariance and EquivarianceBrief intro : Invariance and Equivariance
Brief intro : Invariance and Equivariance홍배 김
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration StructuresMark Kilgard
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardwarestefan_b
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Palak Sanghani
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationMark Kilgard
 

What's hot (20)

CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and Culling
 
SwiftGirl20170904 - Apple Map
SwiftGirl20170904 - Apple MapSwiftGirl20170904 - Apple Map
SwiftGirl20170904 - Apple Map
 
SA09 Realtime education
SA09 Realtime educationSA09 Realtime education
SA09 Realtime education
 
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
 
Trident International Graphics Workshop 2014 5/5
Trident International Graphics Workshop 2014 5/5Trident International Graphics Workshop 2014 5/5
Trident International Graphics Workshop 2014 5/5
 
Fingerprint High Level Classification
Fingerprint High Level ClassificationFingerprint High Level Classification
Fingerprint High Level Classification
 
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
ARCHITECTURAL CONDITIONING FOR DISENTANGLEMENT OF OBJECT IDENTITY AND POSTURE...
 
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
 
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
Getting Started with 3D Game Development on Nokia Series 40 Asha PhonesGetting Started with 3D Game Development on Nokia Series 40 Asha Phones
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processing
 
Vector Distance Transform Maps for Autonomous Mobile Robot Navigation
Vector Distance Transform Maps for Autonomous Mobile Robot NavigationVector Distance Transform Maps for Autonomous Mobile Robot Navigation
Vector Distance Transform Maps for Autonomous Mobile Robot Navigation
 
DeepXplore: Automated Whitebox Testing of Deep Learning
DeepXplore: Automated Whitebox Testing of Deep LearningDeepXplore: Automated Whitebox Testing of Deep Learning
DeepXplore: Automated Whitebox Testing of Deep Learning
 
Virtual Trackball
Virtual TrackballVirtual Trackball
Virtual Trackball
 
Brief intro : Invariance and Equivariance
Brief intro : Invariance and EquivarianceBrief intro : Invariance and Equivariance
Brief intro : Invariance and Equivariance
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration Structures
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardware
 
Lifting 1
Lifting 1Lifting 1
Lifting 1
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]
 
Cgm Lab Manual
Cgm Lab ManualCgm Lab Manual
Cgm Lab Manual
 
CS 354 Object Viewing and Representation
CS 354 Object Viewing and RepresentationCS 354 Object Viewing and Representation
CS 354 Object Viewing and Representation
 

Viewers also liked

Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeksBeginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeksBeginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksBeginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming01_20161102_jintaeks
Beginning direct3d gameprogramming01_20161102_jintaeksBeginning direct3d gameprogramming01_20161102_jintaeks
Beginning direct3d gameprogramming01_20161102_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksBeginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeksBeginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeksBeginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksBeginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...JinTaek Seo
 
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeksBeginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeksBeginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingcpp02_20160324_jintaeks
Beginning direct3d gameprogrammingcpp02_20160324_jintaeksBeginning direct3d gameprogrammingcpp02_20160324_jintaeks
Beginning direct3d gameprogrammingcpp02_20160324_jintaeksJinTaek Seo
 
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksBeginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksBeginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksJinTaek Seo
 

Viewers also liked (14)

Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeksBeginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
Beginning direct3d gameprogramming03_programmingconventions_20160414_jintaeks
 
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeksBeginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
Beginning direct3d gameprogramming02_overviewofhalandcom_20160408_jintaeks
 
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeksBeginning direct3d gameprogramming05_thebasics_20160421_jintaeks
Beginning direct3d gameprogramming05_thebasics_20160421_jintaeks
 
Beginning direct3d gameprogramming01_20161102_jintaeks
Beginning direct3d gameprogramming01_20161102_jintaeksBeginning direct3d gameprogramming01_20161102_jintaeks
Beginning direct3d gameprogramming01_20161102_jintaeks
 
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeksBeginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
Beginning direct3d gameprogrammingmath03_vectors_20160328_jintaeks
 
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeksBeginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
Beginning direct3d gameprogrammingmath04_calculus_20160324_jintaeks
 
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeksBeginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
 
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksBeginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
 
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeksBeginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
Beginning direct3d gameprogramming08_usingtextures_20160428_jintaeks
 
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeksBeginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
Beginning direct3d gameprogrammingmath02_logarithm_20160324_jintaeks
 
Beginning direct3d gameprogrammingcpp02_20160324_jintaeks
Beginning direct3d gameprogrammingcpp02_20160324_jintaeksBeginning direct3d gameprogrammingcpp02_20160324_jintaeks
Beginning direct3d gameprogrammingcpp02_20160324_jintaeks
 
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksBeginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
 
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeksBeginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
Beginning direct3d gameprogrammingmath05_matrices_20160515_jintaeks
 

Similar to Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks

3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2Sardar Alam
 
Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Takao Wada
 
ShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objectsShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objectsRonny Burkersroda
 
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Takao Wada
 
R getting spatial
R getting spatialR getting spatial
R getting spatialFAO
 
Opensource gis development - part 4
Opensource gis development - part 4Opensource gis development - part 4
Opensource gis development - part 4Andrea Antonello
 
computer graphics slides by Talha shah
computer graphics slides by Talha shahcomputer graphics slides by Talha shah
computer graphics slides by Talha shahSyed Talha
 
Im looking for coding help I dont really need this to be explained.pdf
Im looking for coding help I dont really need this to be explained.pdfIm looking for coding help I dont really need this to be explained.pdf
Im looking for coding help I dont really need this to be explained.pdfcontact41
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfRajJain516913
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APITomi Aarnio
 
Math426_Project3-1
Math426_Project3-1Math426_Project3-1
Math426_Project3-1Yijun Zhou
 
Unit 3
Unit 3Unit 3
Unit 3ypnrao
 
Trident International Graphics Workshop2014 3/5
Trident International Graphics Workshop2014 3/5Trident International Graphics Workshop2014 3/5
Trident International Graphics Workshop2014 3/5Takao Wada
 

Similar to Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks (20)

Games 3 dl4-example
Games 3 dl4-exampleGames 3 dl4-example
Games 3 dl4-example
 
3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2
 
Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5
 
ShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objectsShaderX³: Geometry Manipulation - Morphing between two different objects
ShaderX³: Geometry Manipulation - Morphing between two different objects
 
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5
 
R getting spatial
R getting spatialR getting spatial
R getting spatial
 
Maps
MapsMaps
Maps
 
Opensource gis development - part 4
Opensource gis development - part 4Opensource gis development - part 4
Opensource gis development - part 4
 
10. R getting spatial
10.  R getting spatial10.  R getting spatial
10. R getting spatial
 
computer graphics slides by Talha shah
computer graphics slides by Talha shahcomputer graphics slides by Talha shah
computer graphics slides by Talha shah
 
Im looking for coding help I dont really need this to be explained.pdf
Im looking for coding help I dont really need this to be explained.pdfIm looking for coding help I dont really need this to be explained.pdf
Im looking for coding help I dont really need this to be explained.pdf
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
 
Coding matlab
Coding matlabCoding matlab
Coding matlab
 
Coding matlab
Coding matlabCoding matlab
Coding matlab
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics API
 
998-isvc16
998-isvc16998-isvc16
998-isvc16
 
Math426_Project3-1
Math426_Project3-1Math426_Project3-1
Math426_Project3-1
 
Unit 3
Unit 3Unit 3
Unit 3
 
Trident International Graphics Workshop2014 3/5
Trident International Graphics Workshop2014 3/5Trident International Graphics Workshop2014 3/5
Trident International Graphics Workshop2014 3/5
 
Darkonoid
DarkonoidDarkonoid
Darkonoid
 

More from JinTaek Seo

Neural network 20161210_jintaekseo
Neural network 20161210_jintaekseoNeural network 20161210_jintaekseo
Neural network 20161210_jintaekseoJinTaek Seo
 
05 heap 20161110_jintaeks
05 heap 20161110_jintaeks05 heap 20161110_jintaeks
05 heap 20161110_jintaeksJinTaek Seo
 
02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseoJinTaek Seo
 
Hermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksHermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksJinTaek Seo
 
01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seoJinTaek Seo
 
03 fsm how_toimplementai_state_20161006_jintaeks
03 fsm how_toimplementai_state_20161006_jintaeks03 fsm how_toimplementai_state_20161006_jintaeks
03 fsm how_toimplementai_state_20161006_jintaeksJinTaek Seo
 
Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeks
Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeksBeginning direct3d gameprogrammingmath01_primer_20160324_jintaeks
Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeksJinTaek Seo
 
Boost pp 20091102_서진택
Boost pp 20091102_서진택Boost pp 20091102_서진택
Boost pp 20091102_서진택JinTaek Seo
 
아직도가야할길 훈련 20090722_서진택
아직도가야할길 훈련 20090722_서진택아직도가야할길 훈련 20090722_서진택
아직도가야할길 훈련 20090722_서진택JinTaek Seo
 
3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택JinTaek Seo
 
Multithread programming 20151206_서진택
Multithread programming 20151206_서진택Multithread programming 20151206_서진택
Multithread programming 20151206_서진택JinTaek Seo
 
03동물 로봇그리고사람 public_20151125_서진택
03동물 로봇그리고사람 public_20151125_서진택03동물 로봇그리고사람 public_20151125_서진택
03동물 로봇그리고사람 public_20151125_서진택JinTaek Seo
 
20150605 홀트입양예비부모모임 서진택
20150605 홀트입양예비부모모임 서진택20150605 홀트입양예비부모모임 서진택
20150605 홀트입양예비부모모임 서진택JinTaek Seo
 
Boost라이브러리의내부구조 20151111 서진택
Boost라이브러리의내부구조 20151111 서진택Boost라이브러리의내부구조 20151111 서진택
Boost라이브러리의내부구조 20151111 서진택JinTaek Seo
 

More from JinTaek Seo (14)

Neural network 20161210_jintaekseo
Neural network 20161210_jintaekseoNeural network 20161210_jintaekseo
Neural network 20161210_jintaekseo
 
05 heap 20161110_jintaeks
05 heap 20161110_jintaeks05 heap 20161110_jintaeks
05 heap 20161110_jintaeks
 
02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo
 
Hermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeksHermite spline english_20161201_jintaeks
Hermite spline english_20161201_jintaeks
 
01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo01 stack 20160908_jintaek_seo
01 stack 20160908_jintaek_seo
 
03 fsm how_toimplementai_state_20161006_jintaeks
03 fsm how_toimplementai_state_20161006_jintaeks03 fsm how_toimplementai_state_20161006_jintaeks
03 fsm how_toimplementai_state_20161006_jintaeks
 
Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeks
Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeksBeginning direct3d gameprogrammingmath01_primer_20160324_jintaeks
Beginning direct3d gameprogrammingmath01_primer_20160324_jintaeks
 
Boost pp 20091102_서진택
Boost pp 20091102_서진택Boost pp 20091102_서진택
Boost pp 20091102_서진택
 
아직도가야할길 훈련 20090722_서진택
아직도가야할길 훈련 20090722_서진택아직도가야할길 훈련 20090722_서진택
아직도가야할길 훈련 20090722_서진택
 
3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택3ds maxscript 튜토리얼_20151206_서진택
3ds maxscript 튜토리얼_20151206_서진택
 
Multithread programming 20151206_서진택
Multithread programming 20151206_서진택Multithread programming 20151206_서진택
Multithread programming 20151206_서진택
 
03동물 로봇그리고사람 public_20151125_서진택
03동물 로봇그리고사람 public_20151125_서진택03동물 로봇그리고사람 public_20151125_서진택
03동물 로봇그리고사람 public_20151125_서진택
 
20150605 홀트입양예비부모모임 서진택
20150605 홀트입양예비부모모임 서진택20150605 홀트입양예비부모모임 서진택
20150605 홀트입양예비부모모임 서진택
 
Boost라이브러리의내부구조 20151111 서진택
Boost라이브러리의내부구조 20151111 서진택Boost라이브러리의내부구조 20151111 서진택
Boost라이브러리의내부구조 20151111 서진택
 

Recently uploaded

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 

Recently uploaded (20)

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks

  • 1. Beginning Direct3D Game Programming: 6. First Steps to Animation jintaeks@gmail.com Division of Digital Contents, DongSeo University. April 2016
  • 2. Understanding Transformations  At the head of the pipeline, a model's vertices are declared relative to a local coordinate system. This is a local origin and an orientation. 2
  • 3. World Transform  The first stage of the geometry pipeline transforms a model's vertices from their local coordinate system to a coordinate system that is used by all the objects in a scene. The process of reorienting the vertices is called the world transform. 3
  • 4. View Transform  In the next stage, the vertices that describe your 3D world are oriented with respect to a camera. That is, your application chooses a point-of-view for the scene, and world space coordinates are relocated and rotated around the camera's view, turning world space into camera space. 4
  • 5. Projection Transform  In this part of the pipeline, objects are usually scaled with relation to their distance from the viewer in order to give the illusion of depth to a scene; close objects are made to appear larger than distant objects, and so on. 5
  • 6. Clipping  In the final part of the pipeline, any vertices that will not be visible on the screen are removed. 6
  • 8. World Transform  You move an object in a 3D world using a world transformation.  Figure 6.1 shows two cubes that are the same size but have different positions and orientations. 8
  • 9.  1. The cube is standing with its origin in the origin of the world coordinate system.  2. Rotate the cube.  3. Move the cube to its new position. 9
  • 10.  1. The cube is standing with its origin in the origin of the world coordinate system.  2. Move the cube to its new position.  3. Rotate the cube. 10
  • 11.  A 4×4 world matrix contains four vectors, which might represent the orientation and position of an object.  The u, v, and w vectors describe the orientation of the object’s vertices compared to the world coordinate system.  The t vector describes the position of the object’s vertex compared to the world coordinate system.  Every vertex of the cube gets the correct orientation and position by being multiplied by this matrix. 11
  • 12.  To describe the position of the cube in Figure 6.4, you must multiply the following matrix by every vertex of the cube. 12 D3DMATRIX mat; mat._11 = 1.0f; mat._12 = 0.0f; mat._13 = 0.0f; mat._14 = 0.0f; mat._21 = 0.0f; mat._22 = 1.0f; mat._23 = 0.0f; mat._24 = 0.0f; mat._31 = 0.0f; mat._32 = 0.0f; mat._33 = 1.0f; mat._34 = 0.0f; mat._41 = 2.0f; mat._42 = 2.0f; mat._43 = 2.0f; mat._44 = 1.0f;
  • 13. D3DXMatrixTranslation()  D3DXMatrixTranslation() might look like this: inline VOID D3DXMatrixTranslation (D3DXMATRIX* m, FLOAT tx, FLOAT ty, FLOAT tz ) { D3DXMatrixIdentity(m ); m._41 = tx; m._42 = ty; m._43 = tz; } = 1 0 0 0 0 1 0 0 0 0 1 0 tx ty tz 1 13
  • 14. D3DXMatrixRotationY() VOID D3DXMatrixRotationY( D3DXMATRIX* mat, FLOAT fRads ) { D3DXMatrixIdentity(mat); mat._11 = cosf( fRads ); mat._13 = -sinf( fRads ); mat._31 = sinf( fRads ); mat._33 = cosf( fRads ); } = cosf(fRads) 0 –sinf(fRads) 0 0 0 0 0 sinf(fRads) 0 cosf(fRads) 0 0 0 0 0 14
  • 15. Concatenating Matrices  One advantage of using matrices is that you can combine the effects of two or more matrices by multiplying them.  Use the D3DXMatrixMultiply function to perform matrix multiplication. 15
  • 16. D3DXMatrixMultiply() D3DXMATRIX* D3DXMatrixMultiply(D3DXMATRIX* pOut , CONST D3DXMATRIX* pM1 , CONST D3DMATRIX* pM2) { FLOAT pM[16]; ZeroMemory( pM, sizeof(D3DXMATRIX) ); for( WORD i=0; i<4; i++ ) for( WORD j=0; j<4; j++ ) for( WORD k=0; k<4; k++ ) pM[4*i+j] += pM1[4*i+k] * pM2[4*k+j]; memcpy( pOut, pM, sizeof(D3DXMATRIX) ); return (pOut); } 16
  • 17. IDirect3DDevice9::SetTransform  After you prepare the world matrix, call the IDirect3DDevice9::SetTransform method to set it, specifying the D3DTS_WORLD macro for the first parameter. // Set up the rotation matrix to generate 1 full rotation (2*PI radians) // every 1000 ms. To avoid the loss of precision inherent in very high // floating point numbers, the system time is modulated by the rotation // period before conversion to a radian angle. UINT iTime = timeGetTime() % 1000; FLOAT fAngle = iTime * ( 2.0f * D3DX_PI ) / 1000.0f; D3DXMatrixRotationY( &matWorld, fAngle ); g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld ); 17
  • 18. View Transform  The view transform locates the viewer in world space, transforming vertices into camera space.  In this formula, V is the view matrix being created, T is a translation matrix that repositions objects in the world, and Rx through Rz are rotation matrices that rotate objects along the x-, y-, and z-axis. 18
  • 19. Setting Up a View Matrix  The following example creates a view matrix for left-handed coordinates. D3DXMATRIX mView; D3DXVECTOR3 eye(2,3,3); D3DXVECTOR3 at(0,0,0); D3DXVECTOR3 up(0,1,0); D3DXMatrixLookAtLH(&mView, &eye, &at, &up); … g_pd3dDevice->SetTransform( D3DTS_VIEW, &mView); 19
  • 20. Projection Transform  The projection matrix is typically a scale and perspective projection. The projection transformation converts the viewing frustum into a cuboid shape. 20
  • 21. How to Project? Two triangles are similar. △ABC ∽ △ A'OC x:x' = (z+d):d x'(z+d) = xd x' = xd / (z+d) y' = yd / (z+d) z' = 0 21
  • 22. 22 𝑥′ 𝑦′ 𝑧′ 1 ← 𝑥 ∙ 𝑑 𝑦 ∙ 𝑑 0 𝑧 + 𝑑 = 𝑑 0 0 0 0 𝑑 0 0 0 0 0 1 0 0 0 𝑑 𝑥 𝑦 𝑧 1 𝑥′ 𝑦′ 𝑧′ 1 ← ( ) (𝑧 + 𝑑)
  • 23. Setting Up a Projection Matrix in DirectX  In this matrix, Zn is the z-value of the near clipping plane. The variables w, h, and Q have the following meanings. Note that fovw and fovh represent the viewport's horizontal and vertical fields of view, in radians. 23
  • 24. Trigonometric Functions  z’=zQ-QZn  z’=ZnQ-QZn=0  z’=ZfQ-QZn=Q(Zf-Zn)=Zf 24
  • 26. D3DXMatrixPerspectiveFovLH() D3DXMATRIX * D3DXMatrixPerspectiveFovLH( D3DXMATRIX * pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf ); // For the projection matrix, we set up a perspective transform (which // transforms geometry from 3D view space to 2D viewport space, with // a perspective divide making objects smaller in the distance). To build // a perpsective transform, we need the field of view (1/4 pi is common), // the aspect ratio, and the near and far clipping planes (which define at // what distances geometry should be no longer be rendered). D3DXMATRIXA16 matProj; D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI / 4, 1.0f, 1.0f, 100.0f ); g_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj ); 26
  • 27. Working with the Viewport  Conceptually, a viewport is a two-dimensional (2D) rectangle into which a 3D scene is projected.  In Direct3D, the rectangle exists as coordinates within a Direct3D surface that the system uses as a rendering target. 27
  • 28. The Viewing Frustum  A viewing frustum is 3D volume in a scene positioned relative to the viewport's camera.  The shape of the volume affects how models are projected from camera space onto the screen. 28
  • 29.  The viewing frustum is defined by fov (field of view) and by the distances of the front and back clipping planes, specified in z-coordinates. 29
  • 30. Viewport Rectangle  You define the viewport rectangle in C++ by using the D3DVIEWPORT9 structure.  The D3DVIEWPORT9 structure is used with the following viewport manipulation methods exposed. – IDirect3DDevice9::GetViewport – IDirect3DDevice9::SetViewport  Use IDirect3DDevice9::Clear to clear the viewport. 30
  • 31.  You can use the following settings for the members of the D3DVIEWPORT9 structure to achieve this in C++. D3DVIEWPORT9 viewData = { 0, 0, width, height, 0.0f, 1.0f };  After setting values in the D3DVIEWPORT9 structure, apply the viewport parameters to the device by calling its IDirect3DDevice9::SetViewport method. HRESULT hr; hr = pd3dDevice->SetViewport(&viewData); if(FAILED(hr)) return hr; 31
  • 32. Depth Buffering  A depth buffer, often called a z-buffer or a w-buffer, is a property of the device that stores depth information to be used by Direct3D. 32
  • 33. Creating a Depth Buffer  To create a depth buffer that is managed by Direct3D, set the appropriate members of the D3DPRESENT_PARAMETERS structure. D3DPRESENT_PARAMETERS d3dpp; ZeroMemory( &d3dpp, sizeof(d3dpp) ); d3dpp.Windowed = TRUE; d3dpp.SwapEffect = D3DSWAPEFFECT_COPY; d3dpp.EnableAutoDepthStencil = TRUE; d3dpp.AutoDepthStencilFormat = D3DFMT_D16;  … if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT , D3DDEVTYPE_HAL, hWnd , D3DCREATE_SOFTWARE_VERTEXPROCESSING , &d3dpp, &d3dDevice ) ) ) return E_FAIL; 33
  • 34. Quaternion  Quaternions contain a scalar component and a 3D vector component.  With the Direct3D quaternion class, you use the w, x, y, and z components by adding .x, .y, .z, and .w to the variable names. 34
  • 35. D3DXQUATERNION * D3DXQuaternionRotationAxis( D3DXQUATERNION *pOut , CONST D3DXVECTOR3 *pV , FLOAT Angle ); D3DXQUATERNION * D3DXQuaternionRotationMatrix( D3DXQUATERNION * pOut, CONST D3DXMATRIX * pM ); D3DXMATRIX * D3DXMatrixRotationQuaternion( D3DXMATRIX *pOut, CONST D3DXQUATERNION *pQ ); 35
  • 36. Tutorial 03: Using Matrices  This tutorial introduces the concept of matrices and shows how to use them. – Step 1 - Defining the World Transformation Matrix – Step 2 - Defining the View Transformation Matrix – Step 3 - Defining the Projection Transformation Matrix 36
  • 37. Step 1 - Defining the World Transformation Matrix  The world transformation matrix defines how to translate, scale, and rotate the geometry in the 3D model space. D3DXMATRIX matWorld; D3DXMatrixRotationY( &matWorld, timeGetTime()/150.0f ); g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld ); 37
  • 38. Step 2 - Defining the View Transformation Matrix  The view transformation matrix defines the position and rotation of the view. The view matrix is the camera for the scene. D3DXVECTOR3 vEyePt ( 0.0f, 3.0f,-5.0f ); D3DXVECTOR3 vLookatPt( 0.0f, 0.0f, 0.0f ); D3DXVECTOR3 vUpVec ( 0.0f, 1.0f, 0.0f ); D3DXMATRIXA16 matView; D3DXMatrixLookAtLH( &matView, &vEyePt, &vLookatPt, &vUpVec ); g_pd3dDevice->SetTransform( D3DTS_VIEW, &matView ); 38
  • 39. Step 3 - Defining the Projection Transformation Matrix  The projection transformation matrix defines how geometry is transformed from 3D view space to 2D viewport space. D3DXMATRIX matProj; D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI/4, 1.0f, 1.0f, 100.0f ); g_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj ); 39
  • 40. Practice  Achieve similar animation by setting View Matrix.  Rotate the triangle about x-axis.  Translate the triangle about (5,5,0), then rotate.  Rotate the triangle, the translate (5,5,0). – Check differences between two transforms.  Modify the Fov of Projection matrix and check the visual differences. 40

Editor's Notes

  1. The translation and rotation matrices are based on the camera's logical position and orientation in world space.
  2. Because the near end of the viewing frustum is smaller than the far end, this has the effect of expanding objects that are near to the camera.