<p>I asked a version of this question on <a href="https://gis.stackexchange.com/questions/425189/seeking-ways-to-improve-rendering-of-surface-water-in-shaded-relief-images">GIS Stack Exchang</a>e three months ago, but did not receive an answer. So I am posting it here.</p>
<p>I’ve written a simple Java application for rendering high-resolution terrestrial elevation data from the U.S. Geological Survey.  The algorithms, lighting model, and data sources I use are described in <a href="https://gwlucastrig.github.io/GridfourDocs/notes/ElevationGeoTiff1.html" rel="nofollow noreferrer">Elevation from Cloud-Optimized GeoTIFFs (Parts 1 and 2)</a>.</p>
<p>While I have gotten satisfactory results for terrain, I’d like to improve the rendering of surface water (which is comes from a polygon-based dataset).  Can anyone recommend techniques that can be implemented with a reasonable effort?</p>
<p>I’m not looking for a high-level of realism. Unfortunately, the flat surfaces I render don’t harmonize well with the terrain (I’ve attached a picture to show what I’m talking about).  So I am looking for something that will reduce the dissonance between the two kinds of data.</p>
<p>Thank you in advance for your consideration.</p>
<p><a href="https://i.sstatic.net/fjTkf.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fjTkf.jpg" alt="Shaded-relief image in a 2D map" /></a></p>

CC BY-SA 4.0
2022-07-01T16:34:46.497Z
You can use exponential decay for the blending of the water and the terrain below it. Look up Beer-Lambert's law. To measure the distance per pixel between the water and terrain you could render the two separately and then subtract their depth to find the attenuation distance.
lightxbulb
CC BY-SA 4.0
2022-07-01T17:48:24.783Z
Do you have elevation data for the water regions? (I have seen a lot of maps that do have that info is why I ask) Doing a similar rendering using shades of blue for the water could be a nice enhancement, and if the code setup allows, alpha blending the current flat  shaded surface could help visualize the actual surface of the water. (looks good btw)
pmw1234
CC BY-SA 4.0
2022-07-02T18:52:10.317Z
Thank you both for your suggestions.   In this particular case, I do not have bathymetry data.  The surface elevations are derived from airborne lidar sources which generally do not penetrate water. I'll look up the Beer-Lambert law as lightxbulb suggested.  And, finally, thank you pmw1234 s for the compliment on the rendering.
Gary Lucas
<texture><lighting>
How to improve rendering of surface water in shaded-relief images
Gary Lucas
# How to improve rendering of surface water in shaded-relief images

(Asked by: username_0 on 2022-06-30)

I asked a version of this question on [GIS Stack Exchang](https://gis.stackexchange.com/questions/425189/seeking-ways-to-improve-rendering-of-surface-water-in-shaded-relief-images)e three months ago, but did not receive an answer. So I am posting it here.

I’ve written a simple Java application for rendering high-resolution terrestrial elevation data from the U.S. Geological Survey. The algorithms, lighting model, and data sources I use are described in [Elevation from Cloud-Optimized GeoTIFFs (Parts 1 and 2)](https://gwlucastrig.github.io/GridfourDocs/notes/ElevationGeoTiff1.html).

While I have gotten satisfactory results for terrain, I’d like to improve the rendering of surface water (which is comes from a polygon-based dataset). Can anyone recommend techniques that can be implemented with a reasonable effort?

I’m not looking for a high-level of realism. Unfortunately, the flat surfaces I render don’t harmonize well with the terrain (I’ve attached a picture to show what I’m talking about). So I am looking for something that will reduce the dissonance between the two kinds of data.

Thank you in advance for your consideration.

[![Shaded-relief image in a 2D map](https://i.sstatic.net/fjTkf.jpg)](https://i.sstatic.net/fjTkf.jpg)

**Tags:** texture, lighting

> **Comments:**
> **username_1**: You can use exponential decay for the blending of the water and the terrain below it. Look up Beer-Lambert's law. To measure the distance per pixel between the water and terrain you could render the two separately and then subtract their depth to find the attenuation distance.  
> **username_2**: Do you have elevation data for the water regions? (I have seen a lot of maps that do have that info is why I ask) Doing a similar rendering using shades of blue for the water could be a nice enhancement, and if the code setup allows, alpha blending the current flat  shaded surface could help visualize the actual surface of the water. (looks good btw)  
> **username_0**: Thank you both for your suggestions.   In this particular case, I do not have bathymetry data.  The surface elevations are derived from airborne lidar sources which generally do not penetrate water. I'll look up the Beer-Lambert law as username_1 suggested.  And, finally, thank you username_2 s for the compliment on the rendering.  

---

## 0 answers

