This topic is now archived and is closed to further replies.


Direct3D and matricies.

Recommended Posts

I understand perfectly what each of the important matricies(projection, world, veiw) do, but I dont know exactly how they are stored in the matrix itself. If someone would plase be so kind and tell me what exactly is put into these matricies by row. I need something like "In a 4*4 world matrix the elements in the fist row and so.". If anyone answers this it would be greatly appreciated. I also have a feeling a lot of people are in my position. They know what the matricies do and know how to use them in code(limited) but dont know what the heck the numbers in the cells actually mean. "Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.

Share this post

Link to post
Share on other sites
hmmm where should i start.. probably you should check out dx8sdk
anyway, here goes

4x4 matrix can contains 4 equations. (if you know how to multiply matrices it will help you visualize alot) (im not expert in this, somebody might explain better than i am)

think about when you multiply a vector and a 4x4 matrix

|x,y,z,w| |11,12,13,14|

so when you multiply using dot product u get:

x'' = x*11+y*21+x*31+w*41
y'' = x*12+y*22+x*32+w*42
z'' = x*13+y*23+x*33+w*43
w'' = x*14+y*24+x*34+w*44

x'',y''... are the new coordinates after multiplication

eg translation matrix for instance..

and u know that the transformation formula is :
x'' = x+dx
y'' = y+dy
z'' = z+dz

if you convert into matrix form u will get:

so basicly
u can visualize matrix like tHis:

each equation is packed in column..

hope this help u abit

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Most of the elements in translation matrix isn''t used becoz e.g. we want only x''=x+dx so we ignore y and z element by putting zero
you can see that in m11 is 1 because we want x.

in View matrix all rows and columns are it depends..

Share this post

Link to post
Share on other sites