Languages

Menu
Sites
Language
Where is the screen location in the OpenGL perspective coordinates?

Below is OpenGL Perspective Viewing Frustum,

 

My question is, if we draw 3D object based on this perspective viewing frustum, where is the phone screen located at?

Is it just overlaped the near plane?

Responses

3 Replies
Jeongsu Kim

I am not good at OpenGL so this may be wrong.

I think phone screen is at the camera. 3d objects between near and far area are captured by the camera.

Let's think normal camera. Objects are there, you just press shutter button. Now camera show just one layer image that contains objects.

Jean Yang

I think I got anwser from Nate Robin's OpenGL tutors program. Phone screen should just located at the near plane.

Let's go through following pictures to illustrate it.

In the first picture, the cross point of the red x,y,z axies is where eye locate at, it's location is (0.00, 0.00, 2.00). The center point is (0.00, 0.00, 0.00), it is just on the model of the man. ZNear is 1.0.

When I increase the value of ZNear to 1.6, the finger of the man start been cut by the near plane, it shows on the right screen just like the model of the man start to run out of the screen from the finger, you can see this also from the left screen if you look carefully.

I continue increase the value of ZNear to 1.8, the chin and nose of the man was cut by the near plane, it should be deem the man's chin and nose run out of the screen. You can observe it from both left and right side screens.

So I'm sure on the Tizen, the phone screen is just locate at the near plane.

Xaemin Cho

 

As already self-answered, near plane is just matched to phone screen.

Every object must be located between near and far plane, out of this range objects will not be rendered to save rendering cost.

 

One more thing, if you want to make a movement based on 2D pixel coordination in OpenGL, you can convert near plan size in pixel using tangent with fovy and near plane coordinate. That is essential for drawing UI on 3D game.