Trial using zero-depth model to simulate sea surface

Issue #33 new
Ian Mayo repo owner created an issue

A few weeks ago Patrick said: {{{ #!text

Ian, here is an alternate approach that is simple and may well be enough for your application: don't bother trying to create a sea surface, just flatten out the sea.

This can be done by 'removing' all negative elevation - setting them to zero. Simply use a custom elevation model that overrides the default one and clamp all negative elevations to zero. }}}

There would be merit in trying this. There will be an overlap with our new surface model, but I'm happy for you to implement it as a checkbox in our SwingUI panel. The checkbox will specify whether the depth model should use real depths, or a fake-zero depth.

Comments (3)

  1. Lance Wellspring

    There is a ZeroElevationModel class in existence already, but it clamps all elevations to zero, including positive elevations. I'm using it for now, but later on we can make our own that only clamps the negative elevations.

    I've implemented this, but am finalizing some things. I'll commit it when I'm done tonight.

  2. Ian Mayo reporter

    Hi, had a play with trial.

    There's a strange thing happening with the track depth. They two sample tracks should both be underwater, so I was worried that they would not be visible with a zero depth - but they both seem visible. Are they being plotted in mid-air? Is the zero-depth surface being plotted too deep, so the tracks are still visible?

    I welcome your feedback

  3. Lance Wellspring

    I believe they are still visible because the depth buffer is turned off for the tracks, for the purpose of seeing them when they are behind the ocean surface. Honestly, a new ticket should be made to look into the problem of not being able to see things that are behind a transparent layer.

  4. Log in to comment