Camera clipping with near and far #1284
-
Hello I have a small problem (for a change) I have an OSG scene with a view matrix and a projection matrix that I get from an Opengl scene, `
And my problem comes from the fact that I have clipping on my OSG scene that I don't have on my Opengl scene:
But if I use the setting for the camera:
I no longer have clipping. This could solve the problem, however certain functions require near and far otherwise I get a black screen. My question is therefore: How could I apply the view of the second image without deactivating the near and far calculation? Thanks in advance Daoudou |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The pnear and far planes, set by the projection matrix, are always part of OSG/OpenGL rendering, the DO_NOT_COMPUTE_NEAR_FAR setting only changes how the OSG sets up the near and far values, adjusting the projection matrix so that the near and far planes encompass the extents of the scene that passes the view frustum test. If switching off the DO_NOT_COMPUTE_NEAR_FAR helps you see more of the scene then it's because the near and far planes (set via the projection matrix) are too far away for the extents of your scene, so you need to set the default values better for your scene. |
Beta Was this translation helpful? Give feedback.
The pnear and far planes, set by the projection matrix, are always part of OSG/OpenGL rendering, the DO_NOT_COMPUTE_NEAR_FAR setting only changes how the OSG sets up the near and far values, adjusting the projection matrix so that the near and far planes encompass the extents of the scene that passes the view frustum test.
If switching off the DO_NOT_COMPUTE_NEAR_FAR helps you see more of the scene then it's because the near and far planes (set via the projection matrix) are too far away for the extents of your scene, so you need to set the default values better for your scene.