GenericMappingTools / gmt

The Generic Mapping Tools
https://www.generic-mapping-tools.org
Other
848 stars 354 forks source link

Revise paper-output limitation on color gamut #4653

Open PaulWessel opened 3 years ago

PaulWessel commented 3 years ago

Description of the desired feature

Way back when plotting color on paper was very important, we (via @WalterHFSmith) limited the range of HSV saturation and value parameters since for values close to 0 no printer could distinguish between blackish red and reddish black... However, when graphics is simply made for viewing digitally then these limitations no longer make sense since monitors are better able to show the full gamut of colors. The parameters in question and their defaults are

COLOR_HSV_MAX_S                = 0.1
COLOR_HSV_MIN_V                = 0.3

In making animations with gmt movie there is guaranteed to be no paper to worry about, and I have learned the hard way (more than once, in fact) I need to override these settings with

COLOR_HSV_MAX_S                = 0
COLOR_HSV_MIN_V                = 0

to allow for continuous color variations across the full gamut, including in stuff like fading in and out from black. This brings up two possible solutions:

  1. I already started to make a movie theme file which sets those parameters; it may change other settings too that may make less sense outside animations, such as setting MAP_ORIGIN_X = MAP_ORIGIN_Y = 0 to simplify composition. However, we took it out of the gmt-theme branch for now. Plus, users would still need to know why they should switch to theme.
  2. We let the movie module quietly override those 0.1/0.3 defaults.

I think we face an uphill battle to educate users on the technical points here but we definitively want to prevent users trying to make movies using color defaults suitable for paper. So, perhaps option 2 is the best one here? Then again, perhaps printer technology has advanced since 1990 and we should simply change those defaults to 0,0 permanently and instead let these settings be available for experts who know what they are doing and have specific ranges of HSV in mind.

Thoughts, @GenericMappingTools/core ?

WalterHFSmith commented 3 years ago

I think you should do anything you want, whatever works.

I am not sure but I think maybe you are right and this was based on problems with color printers (particularly the ones that melted wax crayons?), but on the other hand I think it also could have been motivated by using artificial shaded relief. In that latter application we didn’t want all large gradients to drive the color totally to white or black, but we wanted a little of the hue to show through, so that the data value, as well as the data gradient, might be perceived.

w

On Jan 12, 2021, at 1:55 PM, Paul Wessel notifications@github.com wrote:

Description of the desired feature

Way back when plotting color on paper was very important, we (via @WalterHFSmith) limited the range of HSV saturation and value parameters since for values close to 0 no printer could distinguish between blackish red and reddish black... However, when graphics is simply made for viewing digitally then these limitations no longer make sense since monitors are better able to show the full gamut of colors. The parameters in question and their defaults are

COLOR_HSV_MAX_S = 0.1 COLOR_HSV_MIN_V = 0.3

In making animations with gmt movie there is guaranteed to be no paper to worry about, and I have learned the hard way (more than once, in fact) I need to override these settings with

COLOR_HSV_MAX_S = 0 COLOR_HSV_MIN_V = 0

to allow for continuous color variations across the full gamut, including in stuff like fading in and out from black. This brings up two possible solutions:

• I already started to make a movie theme file which sets those parameters; it may change other settings too that may make less sense outside animations, such as setting MAP_ORIGIN_X = MAP_ORIGIN_Y = 0 to simplify composition. However, we took it out of the gmt-theme branch for now. Plus, users would still need to know why they should switch to theme. • We let the movie module quietly override those 0.1/0.3 defaults. I think we face an uphill battle to educate users on the technical points here but we definitively want to prevent users trying to make movies using color defaults suitable for paper. So, perhaps option 2 is the best one here? Then again, perhaps printer technology has advanced since 1990 and we should simply change those defaults to 0,0 permanently and instead let these settings be available for experts who know what they are doing and have specific ranges of HSV in mind.

Thoughts, @GenericMappingTools/core ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

PaulWessel commented 3 years ago

OK, I think I prefer changing the defaults to 0,0 and then update the gmt.conf man page to explain why these settings are there, what their previous defaults settings were, and udner what circumstances one may wish to change these. I think only true gurus will care or even notice, and it will benefit all those who make raster images as well as movies.

PaulWessel commented 3 years ago

Alas, @WalterHFSmith point above about shading is a good one. I made a comparison of all the grdgradient shading options and applied them on our sombrero (used by several tests in test/grdgradient for this purpose). Here is the default plots we get (there are 6 different intensity algorithms as indicated). Note I use full normalization (unit 1) in -Nt and -Ne, meaning the max intensities will have a magnitude of 1 in the intensity grid. With default COLOR_HSV_MAX_S = 0.1 and COLOR_HSV_MIN_V = 0 3 the pots look like this:

illum

Changing the code to set those settings to 0 gives this plot:

illum_00

Comments:

To return to my original problem, I clearly need 0,0 when I apply fading in/out in animations since we do want to reach true black/white then. However, for plots like these that is not the pressing issue. So perhaps the best solution here is to

  1. Keep the defaults but add some teaching moment stuff based on this set of plots as to what you can do
  2. Have the fading aspects simply change the two defaults while doing those things.
WalterHFSmith commented 3 years ago

Paul,

Thank you for checking this.

Walter

On Jan 12, 2021, at 5:13 PM, Paul Wessel notifications@github.com wrote:

Alas, @WalterHFSmith point above about shading is a good one. I made a comparison of all the grdgradient shading options and applied them on our sombrero (used by several tests in test/grdgradient for this purpose). Here is the default plots we get (there are 6 different intensity algorithms as indicated). Note I use full normalization (unit 1) in -Nt and -Ne, meaning the max intensities will have a magnitude of 1 in the intensity grid. With default COLOR_HSV_MAX_S = 0.1 and COLOR_HSV_MIN_V = 0 3 the pots look like this:

Changing the code to set those settings to 0 gives this plot:

Comments:

• Like Walter said, the restriction on S and V prevents us from getting truly dark and white colors. • Some illumination methods are more affected than others. • The hillshade -Em seems 180 degrees off To return to my original problem, I clearly need 0,0 when I apply fading in/out in animations since we do want to reach true black/white then. However, for plots like these that is not the pressing issue. So perhaps the best solution here is to

• Keep the defaults but add some teaching moment stuff based on this set of plots as to what you can do • Have the fading aspects simply change the two defaults while doing those things. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.