• Advertisement
Sign in to follow this  

Projection Matrix

This topic is 3388 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

Does anybody know of a good book or tutorial that explains the how the projection matrix is derived? Im reading about it in frank lunas book, but im having some trouble understanding some parts of it. I understand the X and Y projection fine, but the Z calculation is confusing me. He comes up with the formula, Uz + V, to normalize the z values Un + V = 0 //near Uf + V = 1 //far but where does that Uz + V, formula come from? He then says that he will use U + v/z instead because of the divide by w after the matrix multiplication, how does he come to this formula? is it becuase: 1/w * Uz + V = Uz/w + V/w = Uz/z + V/z = U + V/z Thus you just use that instead? I also niticed that with Uz + V, you can map negative near planes and positive far planes to 0-1, but with U + v/z, you cant, it doesnt work, why is this? Not that you would ever have a negative near plane. And finally, how did they determine where to place the z normalisation components in the matrix? Was the goal to just find a place so that the final outcome was

 f           fn
---   -    -------
f-n        z(f - n)

for the z compoent of the vector?




 

 zf          fn
---   -    -------
f-n        (f - n)

after the matrix multiplication





 zf           fn                         f           fn
---   -    -------         ------->      ---   -    ------- 
zf-n        z(f - n)                     f-n        z(f - n)

after the divide by w
which was the formula for U + v/z


Share this post


Link to post
Share on other sites
Advertisement
You do indeed sound a bit confused :) But then again the perspective projection matrix can be quiet confusing at times - Especially if you fully understand the reasons for it being as it is. You'll have to factor in that there doesn't exist one projection matrix, but a number of different ones which solve different problems. Don't have to much time atm so can't really get into the details now but whenever I'm in doubt I tend to read Projection matrices which gives a good oversight on the different projection matrices.

Share this post


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

  • Advertisement