Question

Why are the near and far coordinates are interpreted as negative in orthographic projection? Is it just customary or there is really any benefit of this?

Was it helpful?

Solution

I don't really think there's any reason. Using orthographic projection you can set your near/far planes to be anything, it just defines what z values you want to be displayed. I can't think of any particular benefit to this.

OTHER TIPS

The near and far clipping planes can be anything you want and I think the confusion here is because in OpenGL "forward" or into the screen is -Z. So if I want to see things from the origin to 100 units in front of me, the near will be 0 and the far is -100. But I could also have said I want to see things 30 units behind the origin to 50 units in front in which case near would be 30 and far would be -50.

An added confusion to all this is that glOrtho takes near and far clipping planes but reverses the sign on them to "help" you.

Why are the near and far coordinates are interpreted as negative in orthographic projection?

Who says that they are? There's no rule that the near/far values must be negative in orthographic projections. Your question assumes facts not in evidence.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top