Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ Both compares loading:

Use it to convert `.hdr` and `.exr` files into gain maps. It's free and the whole process happens in your browser.

## Regarding HDR brightness normalisation and color gamuts

### 1. Brightness Normalisation (Nits vs. Relative Luminance values)
* **Relative Linear Scale:** The input `.exr` and `.hdr` pixel values are not interpreted as absolute luminance (nits), but in a relative linear scale where 1.0 is SDR white. This is because gain map HDR JPEGs are displayed with `relative brightness` instead of absolute nits. After the image viewer applies the gain map, 1.0 in linear gamma is tied to the SDR white of the computer. For example, if your SDR white is at 140 nits (middle brightness 8/16 on a Macbook Pro) then `1.0 exr input` will result in 140 nits when you view the output gain map JPEG in Google Chrome, while `2.0 exr input` will result in 280 nits.

* **Content Boost tag:** The `maxContentBoost` parameter specifies the maximum ratio between the HDR peak luminance and the SDR reference white. For example, if your HDR highlights are 4 times brighter than SDR white, `maxContentBoost` should be set to `4.0` (which is encoded in metadata as `log2(4.0) = 2.0`).

### 2. Color Gamuts
* **No Automatic Gamut Remapping:** During encoding, `gainmap-js` does not perform any gamut transformations (e.g., converting BT.709 to Rec.2020).

* It disregards any gamut metadata in the input .exr or .hdr file, and does not tag the output jpeg with any color gamut tag. So Google Chrome will interpret this as a HDR bt709 gamut image.


## Installing
```bash
$ npm install @monogrid/gainmap-js three
Expand Down