The next few chapters in this book are focused on the problem of physically based rendering. Given a virtual scene, the goal of physically based rendering is to compute the radiance that would be present in the scene if it were real. However, at that point the work is far from done. The final result—pixel values in the display’s framebuffer—still needs to be determined. In this section we will go over some of the considerations involved in this determination.
本书接下来的几章将重点讨论基于物理的渲染问题。给定一个虚拟场景,基于物理的渲染的目标是计算如果它是真实的场景中存在的辐射。然而,到那时,工作还远远没有完成。最终结果——显示器帧缓冲区中的像素值——仍然需要确定。在这一节中,我们将讨论这一决定中涉及的一些考虑因素。
8.2.1 High Dynamic Range Display Encoding
8.2.1高动态范围显示编码
The material in this section builds upon Section 5.6, which covers display encoding.We decided to defer coverage of high dynamic range (HDR) displays to this section,since it requires background on topics, such as color gamuts, that had not yet been discussed in that part of the book.
本节中的材料建立在5.6节的基础上,5.6节讨论了显示编码。我们决定将高动态范围(HDR)显示器的讨论推迟到本节,因为它需要一些主题的背景知识,如色域,这在本书的这一部分还没有讨论过。
Section 5.6 discussed display encoding for standard dynamic range (SDR) monitors,which typically use the sRGB display standard, and SDR televisions, which use the Rec. 709 and Rec. 1886 standards. Both sets of standards have the same RGB gamut and white point (D65), and somewhat similar (but not identical) nonlinear display encoding curves. They also have roughly similar reference white luminance levels (80 cd/m平方 for sRGB, 100 cd/m平方 for Rec. 709/1886). These luminance specifications have not been closely adhered to by monitor and television manufacturers, who in practice tend to manufacture displays with brighter white levels [1081].
第5.6节讨论了标准动态范围(SDR)显示器的显示编码,通常使用sRGB显示标准,以及SDR电视,使用Rec.709和Rec.1886标准。两组标准具有相同的RGB色域和白点(D65),以及有些相似(但不相同)的非线性显示编码曲线。它们也具有大致相似的参考白色亮度水平(sRGB为80 cd/m平方,Rec.709/1886为100 cd/m平方).监视器和电视制造商并没有严格遵守这些亮度规格,他们实际上倾向于制造具有更亮白色水平的显示器[1081]。
HDR displays use the Rec. 2020 and Rec. 2100 standards. Rec. 2020 defines a color space with a significantly wider color gamut, as shown in Figure 8.12, and the same white point (D65) as the Rec. 709 and sRGB color spaces. Rec. 2100 defines two nonlinear display encodings: perceptual quantizer (PQ) [1213] and hybrid log-gamma (HLG). The HLG encoding is not used much in rendering situations, so we will focus here on PQ, which defines a peak luminance value of 10, 000 cd/m平方.
HDR显示器使用Rec.2020年和Rec.2100标准.Rec.2020定义了一个色域明显更宽的色彩空间,如图8.12所示,白点(D65)与Rec.709和sRGB颜色空间相同。Rec.2100定义了两种非线性显示编码:感知量化器(PQ) [1213]和混合对数伽马(HLG)。HLG编码在渲染情况下不常用,所以我们在这里将重点放在PQ上,它定义了10000 cd/m平方的峰值亮度值。
Figure 8.12. A CIE 1976 UCS diagram showing the gamuts and white point (D65) of the Rec. 2020 and sRGB/Rec. 709 color spaces. The gamut of the DCI-P3 color space is also shown for comparison.
图8.12。显示Rec色域和白点(D65)的CIE 1976 UCS图。2020年和sRGB/Rec.709个颜色空间。为了比较,还示出了DCI-P3色彩空间的色域。
Although the peak luminance and gamut specifications are important for encoding purposes, they are somewhat aspirational as far as actual displays are concerned. At the time of writing, few consumer-level HDR displays have peak luminance levels that exceed even 1500 cd/m2. In practice, display gamuts are much closer to that of DCI-P3 (also shown in Figure 8.12) than Rec. 2020. For this reason, HDR displays perform internal tone and gamut mapping from the standard specifications down to the actual display capabilities. This mapping can be affected by metadata passed by the application to indicate the actual dynamic range and gamut of the content [672, 1082].
虽然峰值亮度和色域规格对于编码目的很重要,但就实际显示器而言,它们有些令人向往。在撰写本文时,很少有消费级HDR显示器的峰值亮度水平超过1500 cd/m2。实际上,显示色域比Rec.2020更接近DCI-P3(也如图8.12所示).因此,HDR显示器执行从标准规格到实际显示能力的内部色调和色域映射。这种映射会受到应用程序传递的元数据的影响,以指示内容的实际动态范围和色域[672,1082]。
From the application side, there are three paths for transferring images to an HDR display, though not all three may be available depending on the display and operating system:
从应用程序的角度来看,有三种方法可以将图像传输到HDR显示器,但根据显示器和操作系统的不同,这三种方法可能都不可用:
1. HDR10—Widely supported on HDR displays as well as PC and console operating systems. The framebuffer format is 32 bits per pixel with 10 unsigned integer bits for each RGB channel and 2 for alpha. It uses PQ nonlinear encoding and Rec. 2020 color space. Each HDR10 display model performs its own tone mapping, one that is not standardized or documented.
1.HDR 10—广泛支持HDR显示器以及PC和控制台操作系统。帧缓冲区格式是每像素32位,每个RGB通道10个无符号整数位,alpha通道2个无符号整数位。它使用PQ非线性编码和Rec.2020色彩空间。每个HDR10显示器型号都执行自己的色调映射,这种映射没有标准化或文档化。
2. scRGB (linear variant)—Only supported on Windows operating systems. Nominally it uses sRGB primaries and white level, though both can be exceeded since the standard supports RGB values less than 0 and greater than 1. The framebuffer format is 16-bit per channel, and stores linear RGB values. It can work with any HDR10 display since the driver converts to HDR10. It is useful primarily for convenience and backward compatibility with sRGB.
2.scRGB(线性变量)—仅在Windows操作系统上受支持。名义上,它使用sRGB原色和白色水平,虽然两者都可以超过,因为该标准支持小于0和大于1的RGB值。帧缓冲区格式是每通道16位,存储线性RGB值。它可以与任何HDR10显示器一起工作,因为驱动器转换为HDR10。它主要是为了方便和向后兼容sRGB。
3. Dolby Vision—Proprietary format, not yet widely supported in displays or on any consoles (at the time of writing). It uses a custom 12-bit per channel framebuffer format, and uses PQ nonlinear encoding and Rec. 2020 color space. The display internal tone mapping is standardized across models (but not documented).
3.杜比视界—专有格式,尚未在显示器或任何控制台上得到广泛支持(在撰写本文时)。它使用自定义的每通道12位帧缓冲格式,并使用PQ非线性编码和Rec.2020色彩空间。显示器内部色调映射在不同型号之间是标准化的(但没有记录)。
Lottes [1083] points out that there is actually a fourth option. If the exposure and color are adjusted carefully, then an HDR display can be driven through the regular SDR signal path with good results.
Lottes [1083]指出,实际上还有第四种选择。如果仔细调整曝光和颜色,则可以通过常规SDR信号路径驱动HDR显示器,并获得良好的效果。
With any option other than scRGB, as part of the display-encoding step the application needs to convert the pixel RGB values from the rendering working space to Rec. 2020—which requires a 3 × 3 matrix transform—and to apply the PQ encoding,which is somewhat more expensive than the Rec. 709 or sRGB encoding functions[497]. Patry [1360] gives an inexpensive approximation to the PQ curve. Special care is needed when compositing user interface (UI) elements on HDR displays to ensure that the user interface is legible and at a comfortable luminance level [672].
使用scRGB之外的任何选项,作为显示编码步骤的一部分,应用程序需要将像素RGB值从渲染工作空间转换到Rec。2020——需要3 × 3矩阵变换——并应用PQ编码,这比Rec贵一些。709或sRGB编码函数[497]。Patry [1360]给出了PQ曲线的一个便宜的近似值。在HDR显示器上合成用户界面(UI)元素时,需要特别小心,以确保用户界面清晰易读,亮度适中[672]。