I figured that I'd be using other files anyways since I can't imagine this format being very helpful for artists.
No use in trying to solve problems that have already been solved numerous times. After all, I want to do do graphics programming, not graphics file programming.
Search found 240 matches
- Fri Aug 05, 2016 12:12 am
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
- Sat Jul 30, 2016 8:46 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
Well the matrices are working much better now, but I am absolutely sick of working on this obj file reading. It is just a pain needing to put everything in order, and making sure I set the right normal for each vertex and everything. Maybe I should just use a library. The thing I don't like about us...
- Thu Jul 07, 2016 8:46 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
BOTH my translation and projection matrices are written in arrays. Those arrays are made in such a way that they would create row major matrices. They both should need to be transposed to make the column major matrices that the arrays look like. If I transpose the translation matrix, it works. If I ...
- Thu Jul 07, 2016 8:38 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
But I didn't put it in column major order. I put it in an array, which should transpose it. Then it would need transposed again to put it back in column major order.
- Thu Jul 07, 2016 2:54 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
GLfloat projectionMatrix[]={(1/0.414), 0.0, 0.0, 0.0, 0.0, (1/0.414), 0.0, 0.0, 0.0, 0.0, (101/-99), (-200/-99), 0.0, 0.0, -1.0, 0.0}; To be in the correct form in the shader, this SHOULD need to be transposed ALSO. But it only works if I DON'T transpose it.
- Thu Jul 07, 2016 2:50 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
I did transpose the translation matrix. The thing is, the projection matrix I wrote in the array, to look like the matrix you gave earlier, (which as you showed would actually make the transpose of the matrix.) But when I transpose THAT matrix it doesn't work. That is to say, the final matrix sent t...
- Thu Jul 07, 2016 1:54 am
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
Well, I figured it out. A.) I used an equation involving field of view that I found in my book. B) I needed to transpose the model matrix, and yet not transpose the projection matrix... Even though both were made using arrays in what looks to me like the same form. Does that even sort of make sense?...
- Wed Jul 06, 2016 10:36 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
I'm just going to spend some more time fooling around with it on my own. I CAN say that if I just use a translation matrix to place the triangle, it shears instead of translating, and yet setting the transpose to true makes it show nothing at all. I'll spend some time tonight working on this, and if...
- Wed Jul 06, 2016 9:44 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
All right, thank you.
- Wed Jul 06, 2016 4:31 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
So if the near and far are positive with this projection matrix, I presume I should place my triangle on a positive location on the z axis? (which is odd because the camera SHOULD be looking in the negative direction. This is a bit odd.) But when I do this and I run through it on paper, I end up div...
- Tue Jul 05, 2016 8:17 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
Still NOTHING with the projection matrix. Fine if I just put the triangle on the screen, but the moment I add that matrix nothing is there. Not out of proportion, just not there.
- Tue Jul 05, 2016 8:06 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
OK, that's what I was thinking after I read the page he linked to.
Initially I had thought the near and far values would be negative because of the negative z axis into the distance.
Initially I had thought the near and far values would be negative because of the negative z axis into the distance.
- Tue Jul 05, 2016 3:52 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
I've tried multiple projection matrices. For example, what is wrong with this matrix, near=-0.1 far=-1; GLfloat projectionMatrix[]={-0.1/250.0, 0.0, 0.0, 0.0, 0.0, -0.1/250.0, 0.0, 0.0, 0.0, 0.0, 1.1/-0.9, -0.2/-0.9, 0.0, 0.0, -1.0, 0.0}; I've typed out the division just to make sure I don't make an...
- Tue Jul 05, 2016 3:38 pm
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
I've multiplied by each matrix separately to ensure that the order of multiplication is correct. I've tried transposing them and still it seems the perspective matrix is not working. Does it work with any near and far value?
- Tue Jul 05, 2016 3:18 am
- Forum: Programming Discussion
- Topic: Perspective Projection
- Replies: 38
- Views: 59195
Re: Perspective Projection
Well now I'm completely confused. Been trying to make it work, but ever since I changed one number around it has been acting odd.
If I decide it does need to be in a different order, should I also transpose with the uniform function?
If I decide it does need to be in a different order, should I also transpose with the uniform function?