3D 3D Graphics Orthographic projection

Recommended Posts

Hi, I am currently learning 3D graphics using openGL, and I am trying to grasp the different viewing projections. Currently Orthographic. I think i am understanding it, but I just want to be sure, so hoping someone can let me know if I am wrong or not.

So what I am trying to figure out is:

Does the Orthographic viewing projection matrix get multiplied by each point in the viewing projection box, and that is why z = 0 in the projection matrix, because all the points are being brought to a 2D plane?

Initially I thought that Z = 0 did not make sense since the viewing projection box was -1 to 1 in each dimensions, and I thought the matrix had to do with that.But that is wrong, correct?

Share on other sites

With OpenGL conventions, an orthographic projection matrix will produce z = 0 for positions whose depth is exactly halfway between near and far clipping planes. So if a position has view-space Z of 15 and the near/far clip planes are at 10 and 20, you'll get Z = 0 after applying the projection matrix. Z will be -1 at the near clip plane, and 1 at the far clip plane. In D3D conventions Z will be 0 at the near clip plane, 1 at the far clip plane, and 0.5 halfway through.

Create an account

Register a new account

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 14
• 11
• 29
• 15
• 42
• Forum Statistics

• Total Topics
634846
• Total Posts
3019590
×