Jump to content
  • Advertisement
pedro87

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 this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!