I have a flight simulator style opengl application. This application loads height data from file (imports DTED files). It generates a custom terrain mesh that is rendered as a perspective view based on the aircraft's position and orientation (i.e. a moving viewpoint) and the current field of view.
I am trying to apply ridgeline enhancements to the terrain rendering, such that within the field of view of the aircraft, the ridgelines of the terrain are highlighted. The following pictures should help clarify:
Example: Aircraft View across terrain contours
Example: Ridgeline enhancement
I have tried to find suitable algorithms, but the closest I could find were contour algorithms which simply match height points. I have tried rendering the terrain and then interrogating the depth buffer to find the ridgeline - which works for a basic skyline but not intermediate ridgelines. I have considered performing multiple renders of the terrain at different ranges to get a "set" of range based skylines, but this is computationally expensive and does not actually capture the ridges very well. I have considered performing multiple intervisibility calculations to determine the ridgelines but this is very computationally expensive.
Thus I am looking for suggestions, algorithms or code snippets that will help me to render the ridgelines.