LDR and HDR

1. Basic concepts of LDR and HDR 1. Basic concepts of HDR, LDR, dynamic range, and ToneMapping

  • Dynamic Range (dynamic range) = maximum brightness / minimum brightness
  • HDR= High Dynamic Range
  • LDR = Low Dynamic Range
  • ToneMapping : the process of converting the ultra-high dynamic range to the low dynamic range on the screens we display every day
  • Some small cheeses:
    • Because the screen brightness (physical) produced by different manufacturers is actually not uniform, then when we talk about LDR, it is a value in the range of 0 to 1, corresponding to different screens is to match the lowest brightness of the current screen (0 ) and maximum brightness (1)
    • The difference in brightness in nature is very large. For example, the light intensity of a candle is about 15, while the intensity of sunlight is about 10w. The difference between this is very large, with a super high dynamic range.
    • The highest brightness of the screens we use every day is accumulated through a series of experiences, so it will not harm the eyes when used; but in nature, for example, when we look directly at the sun, it will actually cause damage to the eyes .

2. LDR and HDR

LDR

  • 8-bit precision
    • Supplement for 8-bit precision: 8 bits = 28
  • single channel 0-1
  • Commonly used LDR image storage formats are jpg/png, etc.
  • The color picker, general pictures, and computer screens in common DCC tools are all LDR
    • For example, 0-255 (256) in the color picker

HDR

  • Much better than 8-bit precision
  • Single channel can exceed 1
  • Common HDR image storage formats include hdr/tif/exr/raw, etc. (many of which are commonly used by cameras)
  • HDRI, real world

Added: How the camera maps HDR to LDR

  • First, calculate the exposure value and map it to the range that the camera can sense
  • Then input this value as a linear value and store it in the picture (usually in raw format)
  • After that, there will be a change (LUT), through the process of white balance, color correction, tone mapping, and gamma correction, and the final result is baked into a LUT (the image of the LUT in pbr is the result of this process)
  • The LUT format of each camera manufacturer is different.

3. Why HDR is needed

  • LDR can only compress and present the colors in reality
    • HDR can result in better colors, higher dynamic range and richer details.
    • It can effectively prevent the picture from being overexposed, and the color with a brightness value exceeding 1 can also be well represented. The brightness of the pixel becomes normal, and the visual communication is more realistic.

 

  • HDR only has a value exceeding 1, and there will be a bloom effect, and a high-quality bloom effect can reflect the rendering quality of the picture

 

4. Some URLs that can directly download HDR images

2. HDR settings in HDR1.Camera in Unity

  • If enabled, the scene will be rendered as an HDR image buffer
  • Next step for post-screen processing: Bloom and ToneMapping
  • During the ToneMapping process, HDR will be converted to LDR
  • The image of the LDR will be sent to the display

2. HDR settings of Lightmap

  • Selecting High Quality will enable HDR lightmap support, and selecting Normal Quality will switch to using RGBM encoding
  • RGBM encoding: stores the color in the RGB channel and the multiplier (M) in the Alpha channel

3. HDR settings for color picker

  • If the color is set to HDR, an Intensity slider will appear in the color picker to adjust the intensity
  • Every 1 increase in the slider doubles the intensity of the provided light.

 

4. Advantages and disadvantages of HDR

  • advantage
    • The part of the picture whose brightness exceeds 1 will not be cut off, which increases the details of the bright part and reduces the exposure
    • Reduce the sense of gradation in the dark part of the screen
    • Better support for bloom effect
  • shortcoming
    • Rendering is slow and requires more video memory
    • Does not support hardware anti-aliasing
    • Some phones do not support

3. The realization process of HDR and Bloom1.Bloom

  • Bloom is used to express the effect of halo
  • Bloom implementation process
    • Render the original image
    • Compute highlight pixels above a certain threshold
    • Gaussian blur the highlighted pixels
    • Then superimpose the halo and form a picture

 

  • Briefly describe the Bloom process in Unity
    • Later courses will introduce in detail
    • In the first step, calculate the high-light pixels at the down sample, and then keep doing down samples and store them in rt. After reaching a certain number of times (controlled by parameters), then step by step up scale back. In this process, the previous rt Join, step by step up sample back to the original.

 

4. HDR and ToneMapping1.ToneMapping concept

  • Previous review: LDR ranges from 0 to 1, and HDR can exceed 1;
  • To express colors with a higher dynamic range on the display, it is necessary to convert HDR to LDR (this process is ToneMapping), and this mapping relationship is tone mapping.
  • The example below is a linear luminance map

  • But this does not conform to our understanding of the real world, so basically all mapping is finally achieved through an s-curve.

2. ACES curve

  • Academy Color Encording System Academy Color Encoding System
  • It is the most popular and widely used ToneMapping mapping curve
  • Effect: The contrast is improved, and the details of the dark and bright parts can be well preserved
  • Then color based on this

 

3. Other types of ToneMapping curves

4.LUT(Lookup Table)

  • Simple understanding : it is a filter. Through LUT, you can output one set of RGB values ​​into another set of RGB values, thereby changing the exposure and color of the picture.
  • Unlike ToneMapping, LUT changes between LDRs. And ToneMapping transforms HDR.
  • The LUT that adjusts the three channels of RGB is called 3D LUT
    • The formats are as follows

 

  • a little trick
    • You can adjust the LUT in PS, and the exported LUT can be used as a filter to adjust the picture

  • Supplement: You can also have the corresponding position of LUT in the post-processing filter part of UE4

 

5. References

Guess you like

Origin blog.csdn.net/Kaitiren/article/details/122918543