   Need help with matrices
  Hey, I'm new to this forum as well as DirectX, although I've been doing C++ for a few years now.I've gone through quite a lot of tutorials and stuff, and I'm ok with all the basic stuff with DirectX, except matrices. I have no idea how to use them.From what I've done in tutorials so far, you use matrices to position the objects in the 3D world like this:(pseudocode)device->SetTransform(D3DTS_WORLD,matrix)drawobjectDoes this mean, if i have lots of objects in my 3D world, I will have to set the world matrix to each of the objects' positions before i draw it?And if so, how do i set the matrix to these positions? assuming each object has members x,y,z?This aspect is something that doesnt seem to be covered very well in beginner tutorials, instead, there is loads of Matrix Math theory -_-). Any help appreciated thanks.    
  You don't really need to know how matrices work to use them. The D3DX library provides functions for creating matrices corresponding to given translations, rotations, scaling, and can also multiply them together. So create the correct translation matrix based on the x,y,z coordinates of your object, and set the world matrix to this value. Additional matrices (such as rotation) could also come in handy at certain times.   ;  ok kool.So... I have to set the world matrix before drawing every object in the scene? wouldnt that be really slow if i had lots of objects?   ;  It is costly, but not as much as you'd think. Changing textures, for instance, is much worse than changing the world matrix.   ;  Matrices and linear algebra are very important to understand most concepts with 3D games. I suggest you get a DirectX book with a nice math primmer at the beginning of the book. Introduction to 3D Game Programming with DirectX 9.0http://www.amazon.com/gp/product/1556229135/sr=8-1/qid=1152543108/ref=pd_bbs_1/103-6388446-5014205?ie=UTF8Hope that helps;  @Dean JohnsonI already have this book, but I get lost in the Matrix math, and would rather that the book focus on practical use, rather than explaining unnecessary technical stuff. Thanks for your help anyways. Can anyone give a link to a good tutorial of the practical/common uses of Matrices in DirectX?   ;Quote:Matrices and linear algebra are very important to understand most concepts with 3D games.Quoted and bolded for emphasis. This is very important stuff, even (and especially) that "unneccessary technical stuff." I strongly suggest that you re-read the books you have on the subject and try your best to understand, or perhaps go in search of a a different book (or this one, or this one).A tutorial that just shows you the minimum you need to know in terms that jive with DirectX terminology is most likely only going to get you a few more steps down the road. Then you'll stumble again because the tutorial didn't teach you the fundamental ("unneccessary technical") concepts involved and you won't be able to figure out a slightly different application of linear algebra.   ;Quote:Original post by i-love-lampI already have this book, but I get lost in the Matrix math, and would rather that the book focus on practical use, rather than explaining unnecessary technical stuff. To quote Barbie - "Math is hard."I can understand your initial reluctance to dive into the practicalities of how Matrix math works, as it can initially seem fairly counter-intuitive. It is possible to just use the pre-packaged DirectX math functions to make use of matricies, without understanding them.If you decide to skip over the details now (which I wouldn't recommend), make sure you come back to them as soon as you understand the "how to use matricies" part of things. If you don't, you run the nasty risk of getting into the habit of skipping the hard stuff, which leads to long term ignorance.   