Thanks! The blue node network just does what a ramp or gradient would do in other applications. It's the result of much trial and error. There probably are simpler ways to accomplish this, but it seems to work.
The bathymetric data are negative values, so -1000 is lower than -100, for example. We want the color to get darker as the depth increases, so these values need to be (A) converted into positive numbers that (B) get smaller as they go down.
To see how it works just think of a value and follow it. For a given depth of -50:
- The first node, Displacement Shader to Scalar, turns the displacement value into a single number (-50).
- Abs Scalar makes it an absolute value (50). This takes care of (A), above.
- Inverse divides 1 by the value (1/50 or 0.02). This takes care of (B).
- Build Color uses the constant values and multiply nodes to make an RGB color based on red = 0, green = 4 * 0.02, and blue = 30 * 0.02, or red = 0, green = 0.08, and blue = 0.60.
If you plug these numbers into a color picker you'll see they make a dark blue. Everything at a depth of -50 will be this color.
Higher levels produce lighter blue shades, and deeper ones produce dark shades. The Color Adjust node rescales everything to keep the lower depths from going black and the higher ones from being too bright.