• Create Account

### #Actualcaibbor

Posted 18 December 2012 - 12:19 PM

But take a look at how OpenGL's matrices are commonly designed here in appendix F. It lists their inverse also.

I tried implementing my own fucntions to generate a matrix based on those equations, as well as an inverse:

Multiplying a matrix together with it's own inverse should result in an identity matrix. I'm getting mostly identity, except col 3 row 4 is always -5.9, and col 4 row 3 is always -1.2. I've tripple-checked that my matrices match the ones in the image.

I think the problem is in my matrix multiplication. I know how to multiply the 3x3 rotation section of the matrix and then add the translation, but what do I do with the perspective section?

Edit: I've been googling and even looked into a few CG programming books. nobody seems to say how to handle the bottom row of a GL 4x4 when multiplying two matrices together...

### #17caibbor

Posted 18 December 2012 - 12:18 PM

But take a look at how OpenGL's matrices are commonly designed here in appendix F. It lists their inverse also.

I tried implementing my own fucntions to generate a matrix based on those equations, as well as an inverse:

Multiplying a matrix together with it's own inverse should result in an identity matrix. I'm getting mostly identity, except col 3 row 4 is always -5.9, and col 4 row 3 is always -1.2. I've tripple-checked that my matrices match the ones in the image.

I think the problem is in my matrix multiplication. I know how to multiply the 3x3 rotation section of the matrix and then add the translation, but what do I do with the perspective section?

Edit: I've been googling and even looked into a few CG programming books. nobody seems to say how to handle the bottom row of a GL 4x4 when multiplying matrices...

### #16caibbor

Posted 18 December 2012 - 12:18 PM

But take a look at how OpenGL's matrices are commonly designed here in appendix F. It lists their inverse also.

I tried implementing my own fucntions to generate a matrix based on those equations, as well as an inverse:

Multiplying a matrix together with it's own inverse should result in an identity matrix. I'm getting mostly identity, except col 3 row 4 is always -5.9, and col 4 row 3 is always -1.2. I've tripple-checked that my matrices match the ones in the image.

I think the problem is in my matrix multiplication. I know how to multiply the 3x3 rotation section of the matrix and then add the translation, but what do I do with the perspective section?

Edit: I've been googling and even looked into a few CG programming books. nobody seems to say how to handle the bottom row of a GL 4x4 when multiplying matrices, inverting, etc.. anything..

### #15caibbor

Posted 18 December 2012 - 12:18 PM

But take a look at how OpenGL's matrices are commonly designed here in appendix F. It lists their inverse also.

I tried implementing my own fucntions to generate a matrix based on those equations, as well as an inverse:

Multiplying a matrix together with it's own inverse should result in an identity matrix. I'm getting mostly identity, except col 3 row 4 is always -5.9, and col 4 row 3 is always -1.2. I've tripple-checked that my matrices match the ones in the image.

I think the problem is in my matrix multiplication. I know how to multiply the 3x3 rotation section of the matrix and then add the translation, but what do I do with the perspective section?

Edit: I've been googling and even looked into a few CG programming books. nobody seems to say how to handle the bottom row of a GL 4x4.

### #14caibbor

Posted 18 December 2012 - 10:24 AM

But take a look at how OpenGL's matrices are commonly designed here in appendix F. It lists their inverse also.

I tried implementing my own fucntions to generate a matrix based on those equations, as well as an inverse:

Multiplying a matrix together with it's own inverse should result in an identity matrix. I'm getting mostly identity, except col 3 row 4 is always -5.9, and col 4 row 3 is always -1.2. I've tripple-checked that my matrices match the ones in the image.

I think the problem is in my matrix multiplication. I know how to multiply the 3x3 rotation section of the matrix and then add the translation, but what do I do with the perspective section?

### #13caibbor

Posted 18 December 2012 - 10:17 AM

But take a look at how OpenGL's matrices are commonly designed here in appendix F. It lists their inverse also.

I tried implementing my own fucntions to generate a matrix based on those equations, as well as an inverse:

Multiplying a matrix together with it's own inverse should result in an identity matrix. I'm getting mostly identity, except col 3 row 4 is always -5.9, and col 4 row 3 is always -1.2. I've tripple-checked that my matrices match the ones in the image.

I think the problem is in my matrix multiplication. I know how to multiply the 3x3 matrix, but is that how you do the whole 4x4? or is there something else special to do?

PARTNERS