0

I am following a tutorial on YouTube which combines 3 matrices: projectionMatrix * viewMatrix * transformationMatrix. These, allow a 3D cube to render along with a camera that controls the scene. My question is, how do these matrices/matrix show the sides of the below cube when the cube is off-centered by the camera movement? camera panned to the left

camera panned to the left

Which matrices are responsible for showing the left side of the cube as the camera moves on the X axis? Is it because the further away the vertices are (on the z axis), the less it is affected by movement and so, the front vertices move revealing those behind; like below? enter image description here

I understand that the projection matrix might have to do with the side of the cube being smaller on the vertices further away. Also, I do not think the cube is rotating since the front quad is not distorted. My theory is that the transformation matrix is making the vertices further away lag behind and thus, being revealed.

reddish
  • 29
  • 7
  • 3
    If you followed a tutorial that showed you to use a perspective matrix, but didn't bother to tell you what perspective means or how it works, find a *better* tutorial. – Nicol Bolas Apr 20 '16 at 02:58
  • @NicolBolas how does this comment help me? This is not a suggestion forum. – reddish Apr 20 '16 at 13:31
  • 1
    "*how does this comment help me?*" By telling you to stop wasting your time with a terrible tutorial. If a tutorial can't even be bothered to explain how perspective works, then it's not worth your time. – Nicol Bolas Apr 20 '16 at 13:52
  • @NicolBolas so do you tell everyone to go back to school, or find another tutorial for every question you see in stackoverflow? – reddish Apr 20 '16 at 14:41
  • No. Just people who've asked a question based on a bad/incomplete tutorial. – Nicol Bolas Apr 20 '16 at 14:55
  • @NicolBolas My apologies. The page hadn't fully refreshed and I didn't see that it had been closed. – Xirema Apr 20 '16 at 15:00
  • I don't wanna be that guy, but you *really* shouldn't need a tutorial to understand how perspective works... – RecursiveExceptionException Apr 21 '16 at 19:19

0 Answers0