Real-Time Rendering——8.1.4 Rendering with RGB Colors8.1.4用RGB颜色渲染

Strictly speaking, RGB values represent perceptual rather than physical quantities.Using them for physically based rendering is technically a category error. The correct method would be to perform all rendering computations on spectral quantities, represented either via dense sampling or projection onto a suitable basis, and to convert to RGB colors only at the end.

严格来说,RGB值代表的是感知量而不是物理量。使用它们进行基于物理的渲染在技术上是一种错误。正确的方法是对光谱量执行所有渲染计算,通过密集采样或投影到合适的基础上来表示,并仅在最后转换为RGB颜色。

For example, one of the most common rendering operations is calculating the light reflected from an object. The object’s surface typically will reflect light of some wavelengths more than others, as described by its spectral reflectance curve. The strictly correct way to compute the color of the reflected light is to multiply the SPD of the incident light by the spectral reflectance at each wavelength, yielding the SPD of the reflected light that would then be converted to an RGB color. Instead, in an RGB renderer the RGB colors of the lights and surface are multiplied together to give the RGB color of the reflected light. In the general case, this does not give the correct result. To illustrate, we will look at a somewhat extreme example, shown in Figure 8.10.

例如,最常见的渲染操作之一是计算从对象反射的光。物体的表面通常会比其他波长反射更多的光,正如其光谱反射曲线所描述的那样。计算反射光颜色的严格正确方法是将入射光的SPD乘以每个波长的光谱反射率,得到反射光的SPD,然后将其转换为RGB颜色。相反,在RGB渲染器中,灯光和曲面的RGB颜色相乘,得到反射光的RGB颜色。在一般情况下,这不会给出正确的结果。为了说明,我们将看一个有点极端的例子,如图8.10所示。

Figure 8.10. The top plot shows the spectral reflectance of a material designed for use in projection screens. The lower two plots show the spectral power distributions of two illuminants with the same RGB colors: an RGB laser projector in the middle plot and the D65 standard illuminant in the bottom plot. The screen material would reflect about 80% of the light from the laser projector because it has reflectance peaks that line up with the projectors primaries. However, it will reflect less than 20% of the light from the D65 illuminant since most of the illuminant’s energy is outside the screen’s reflectance peaks. An RGB rendering of this scene would predict that the screen would reflect the same intensity for both lights. 

图8.10。顶部曲线显示了设计用于投影屏幕的材料的光谱反射率。下面的两个图显示了具有相同RGB颜色的两种光源的光谱功率分布:中间图中的RGB激光投影仪和底部图中的D65标准光源。屏幕材料将反射来自激光投影仪的大约80%的光,因为它具有与投影仪原色一致的反射峰值。然而,它将反射少于20%的来自D65光源的光,因为大多数光源的能量在屏幕的反射率峰值之外。该场景的RGB渲染将预测屏幕将反射相同强度的两种光。

Our example shows a screen material designed for use with laser projectors. It has high reflectance in narrow bands matching laser projector wavelengths and low reflectance for most other wavelengths. This causes it to reflect most of the light from the projector, but absorb most of the light from other light sources. An RGB renderer will produce gross errors in this case.

我们的示例展示了一种专为激光投影仪设计的屏幕材料。它在匹配激光投影仪波长的窄带中具有高反射率,而在大多数其他波长中具有低反射率。这导致它反射来自投影仪的大部分光,但吸收来自其他光源的大部分光。在这种情况下,RGB渲染器会产生严重错误。

However, the situation shown in Figure 8.10 is far from typical. The spectral reflectance curves for surfaces encountered in practice are much smoother, such as the one in Figure 8.11. Typical illuminant SPDs resemble the D65 illuminant rather than the laser projector in the example. When both the illuminant SPD and surface spectral reflectance are smooth, the errors introduced by RGB rendering are relatively subtle.

然而,图8.10所示的情况并不典型。实际中遇到的表面的光谱反射率曲线要平滑得多,如图8.11所示。典型的光源SPD类似于示例中的D65光源,而不是激光投影仪。当光源SPD和表面光谱反射率都平滑时,RGB渲染引入的误差相对较小。

Figure 8.11. The spectral reflectance of a yellow banana [544]. 

图8.11。黄香蕉的光谱反射率[544]。

In predictive rendering applications, these subtle errors can be important. For example, two spectral reflectance curves may have the same color appearance under one light source, but not another. This problem, called metameric failure or illuminant metamerism, is of serious concern when painting repaired car body parts, for example.RGB rendering would not be appropriate in an application that attempts to predict this type of effect.

在预测渲染应用程序中,这些细微的错误可能很重要。例如,在一个光源下,两条光谱反射率曲线可能具有相同的颜色外观,但在另一个光源下则不同。这个问题被称为同色异谱失效或光源同色异谱,例如,当油漆修理过的汽车车身部件时,这是一个严重的问题。RGB渲染不适用于试图预测这种效果的应用程序。

However, for the majority of rendering systems, especially those for interactive applications, that are not aimed at producing predictive simulations, RGB rendering works surprisingly well [169]. Even feature-film offline rendering has only recently started to employ spectral rendering, and it is as yet far from common [660, 1610].

然而,对于大多数渲染系统,尤其是那些交互式应用,其目的不是产生预测模拟,RGB渲染工作得非常好[169]。甚至故事片离线渲染也只是最近才开始采用光谱渲染,而且还远未普及[660,1610]。

This section has touched on just the basics of color science, primarily to bring an awareness of the relation of spectra to color triplets and to discuss the limitations of devices. A related topic, the transformation of rendered scene colors to display values,will be discussed in the next section.

这一节只涉及了色彩学的基础,主要是让大家了解光谱与三色光的关系,并讨论设备的局限性。一个相关的主题,渲染场景颜色到显示值的转换,将在下一节讨论。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

椰子糖莫莫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值