USNavalResearchLaboratory / simdissdk

SIMDIS SDK
Other
114 stars 39 forks source link

Ground Clipping #110

Open faculaganymede opened 3 weeks ago

faculaganymede commented 3 weeks ago

When the camera is at low elevation, part of the ground gets clipped and shows up black (as shown in the image below). I believe this has to do with the view frustum clipping. Is there a setting that would adjust the view frustum when the camera is at low elevation and show the ground continuously?

image

emminizer commented 3 weeks ago

Take a look at simVis/View.cpp's SetNearFarCallback. Most of then near/far clip plane management is done in OSG. See also the ClampNearPlaneCallback in simVis/ViewManagerLogDbAdapter, which helps with the Logarithmic Depth Buffer provided by osgEarth. Logarithmic Depth Buffer (LDB) helps tremendously in the overwhelmingly common cases, but it breaks somewhat quickly with surfaces that intersect the near plane. You can opt to disable LDB which can give you more traditional access to OSG's near/far clipping plane values.