Jump to content
  • Advertisement
Sign in to follow this  
luke88

Matrices

This topic is 4854 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!