Understanding the Automatic Gamma Correction

This topic describes how the gamma correction used to work previously and how it works currently.

Previous Method for Gamma Correction

The dialog for loading bitmaps had three options:

Similarly, the dialog for saving bitmaps had two options:

The following table defines these options:

Option Description
Use image’s own gamma Checks whether the file header contains a gamma value to use. If gamma value is not found, the Use system default gamma option is selected automatically.
Use system default gamma Uses the globally defined gamma value (the sRGB gamma of 2.2).
Override Allows a user override.

Limitations

In general, this gamma correction method worked well for loading files when the file type stored actual gamma value in the file header. However, if the file header did not contain a gamma value, the following issues occurred:

  • The globally defined gamma value is always used and the file type is ignored even though 8-bit or 16-bit files are generally stored in sRGB (= gamma 2.2), and floating points are stored linearly (= gamma 1.0).
  • The file dialog automatically selected the Use system default gamma option. However, the next file that you attempt to load also uses this option even if it has a better value in the file header.

For saving files, this method always used the system default gamma value and ignored the file type being saved. For example, EXR files that must be stored linearly (= gamma 1.0) were saved as sRGB (= gamma 2.2). You had to either create an override for such files, or modify the output default.

Current Method of Automatic Gamma Correction

Currently, both saving and loading dialog has the same options as shown in the following figure:

The gamma value in the file header is used when you choose the Automatic option for loading files. When file headers do not contain the gamma value, the file type is considered and 3ds Max checks whether the particular file IO plug-in prefers linear storage or not. For example, the plug-in for JPG files do not prefer linear storage, and is assumed to be sRGB (= gamma 2.2). The plug-in for HDR files prefer linear storage and is assumed to be linear (= gamma 1.0).

Similarly, when saving files, the file type is considered and 3ds Max checks whether the file IO plug-in prefers to be saved linearly. For example, a JPG plug-in is saved in sRGB (= gamma 2.2) by default, whereas an HDR plug-in is saved linearly (= gamma 1.0) by default.

You can override this default behavior using the Override option for loading and saving the files.

Advantages

You rarely have to care about the gamma correction because it is automatically done based on the file type, bit depth, and so on.

It is no longer recommended to change the global file-input and file-output gamma values from their sRGB default value of 2.2 because of the automatic choice for loading and saving. Therefore, these options are removed from the user interface of the Gamma/LUT Setup dialog. However, they can still be changed by editing the .ini files.