Matrices

Started by
6 comments, last by Name_Unknown 18 years, 8 months ago
This is really beginning to bug me. I have read several articles on matrices, yet I still do not understand them. I find it difficult to even get past the first paragraph without some confusion. I was hoping if someone here could point me towards a really good article explaining matrices (regarding Direct3D), clearly and thoroughly, or perhaps even explain it to me here? Thanks, luke
luke88
Advertisement
There are lots of good references, so I can't think of any one in particular to recommend. Perhaps you could give an example of where you are stuck, or tell us what concept is proving to be difficult. Given that, you'll probably get some helpful answers.
you’ve probably seen this on your travels but take a look again because it should tell you everything you need to know.

if not as jyk said please tell use what parts you having trouble with
[happy coding]
Well, I was stuck with, basically, everything about them, but after some more intensive reading, I'm finally starting to understand. Having said that, I'm still finding it extremely difficult to achieve what I'm trying to do.

I'm just trying to get the user to be able to move the camera from a first person perspective (basically, just move around like in an FPS). I'm using DirectX 8 in VB6. Any code in C++ would also be helpful (but preferably VB, naturally).
The keys I'm currently trying to map out are WASD to move back and forth, and the strafe left and right, with the arrow keys to look around.
luke88
i guess you need a book about linear algebra and vector geometry.
Geometric Tools for Computer Graphics is full of what you want,but it is professional and may be hard ( anyway you must have it )

check nehe.gamedev.net for his matrices tutorial.

a simple matrices book is "Matrices" for shaum's series : this is a good and simple book about matrices.

hope this helps.
Quote:Original post by eGamer
i guess you need a book about linear algebra and vector geometry.
Geometric Tools for Computer Graphics is full of what you want,but it is professional and may be hard ( anyway you must have it )


umm... recommending that book to a beginner is not a good idea. That book is really complicated and fails to provide adequate explanation of practical information. That book is fine if you already understand the math and need a reference.

3D Math Primer by Dunn and Parberry

That is a very good book for beginners.
"It's such a useful tool for living in the city!"
From what i'v seen, luke88 doesn't even need to know matrices. Moving a camera in a scene with direct3d is really simple, In C++ it goes like this:

LPDIRECT3DDEVICE8 mydevice;...//when you want to change the camera settings:D3DXMATRIX cam;D3DXVECTOR3 vFromPt = D3DXVECTOR3(fromX, fromY, fromZ);D3DXVECTOR3 vLookatPt = D3DXVECTOR3(atX, atY, atZ);D3DXVECTOR3 vUpVec = D3DXVECTOR3(upX, upY, upZ);D3DXMatrixLookAtLH (&cam, &vFromPt, &vLookatPt, &vUpVec);mydevice->SetTransform (D3DTS_VIEW, &matView);


In 3D, Matrices are usually for doing all kinds of transormations to points and objects, and also the most usefull ones are already prepared for you: D3DXMATRIXROTATIONX/Y/Z, D3DXMATRIXTRANSLATION, D3DXMATRIXSCALATION which are matrices for moving, rotating and scaling objects. The only use of matrices here is to do complicated transformations like: mirroring, perspective and others.
Well, you aren't going to get very far with 3d programming without understanding matrices.
"It's such a useful tool for living in the city!"

This topic is closed to new replies.

Advertisement