In e.g. qgis, you can use blending modes, which (may) improve the map substantially. From the mentioned link, it is described as: it essentially multiplies the colour values of your layer or feature with those sitting beneath it, then divides it by 250. The impact of this is that darker areas of the basemap appear much darker, whilst lighter areas are less impacted.
Does gmt do any of this blending behind the scenes, and if not, is it possible to do?
In qgis, you can first make a hillshade/slope of a raster and then apply the blending to the shillshade/slope that is then plotted ‘above’ the original raster.
Don’t know. Maybe grdmix can do it. The problem with doing this kind of things with GMT is memory consumption. GMT does all with floats, which multiplies all by a factor of 4. No problem with small images but for big ones it is.
I am not very familiar with the Qgis algorithm. But from this description, I think that you could calculate an slope grid (with grdgradient) and them calculate the shadow grid from it.
If I want to plot a simple map of an elevation raster, gmt, internally, will translate each z-value (each node) to an rgb-triplet - typically looked up via a cpt. So what gmt ends up plotting, is the rgb-triplets, and not the z-values (is this train of thought correct…?). So if I wanted to to blending, I would have to have the ‘rgb-grid’ available to apply some math to it.
grdimage assigns the colors to each cell but the radiances/shadings are computed in grdgradient. The RGB color is converted to HSV where shadings are applied and the result is converted back to RGB. This is a different procedure from gdal_calc.py that blends images … derived from gradients.
@Joaquim I did test vrt and gmt reads it fine (through gdal I assume).
I tried to look at grdgradient-c, but my C skills are not good enough.
If I run a simple grdimage topo.nc -Ishade.nc - is it easy for you to tell me what equation is used to blend in the shade with the RGB’s? Can you refer to one of the blend modes listed here?
Andreas, I know the answer was kind of short, but it was given in my post above. GMT does not use a blending model like those you linked. It computes a brightness between [-1 1] (well, less. gmt.conf has params for it) and adds it to the S channel of colors that have, intermediately, converted to HSV.