Tonight I got Perspective Projection working with some debugging help from Matt. I couldn't figure out why it looked so crazy, as it appeared that I had the correct Matrix for the Perspective Projection Transformation.
It turns out that I did have the right Matrix and everything was correct, except that I did the incorrect Dot products for my uvn coordinates - this is the calculation for the camera position. I had made a mistake there and multiplied by the wrong values, and this caused a really crazy output, check out these pics! Now that I found the error and fixed it, it's all working well and it is looking great!!
I now just have to do 3D and 2D clipping so I am going to get that done soon so I can have the weekend free for hanging out with friends as it's my birthday this weekend!!!!!! Wahoo!!!!!!!
Totally super wrong perspective
Wahoo!!!!!!!
Nice perspective projection lines!
Compare the previous one to this image. This is the orthographic projection. Notice that the perspective projection brings lines closer together to give a perspective view.
No comments:
Post a Comment