Real-Time Rendering——Chapter 8 Light and Color光和颜色

“Unweave a rainbow, as it erewhile made The tender-person’d Lamia melt into a shade.”
—John Keats

“如刚才拆解彩虹那般,让光鲜娇嫩的雷米亚黯然失色。" —约翰·济慈

Many of the RGB color values discussed in previous chapters represent intensities and shades of light. In this chapter we will learn about the various physical light quantities measured by these values, laying the groundwork for subsequent chapters, which discuss rendering from a more physically based perspective. We will also learn more about the often-neglected “second half” of the rendering process: the transformation of colors that represent scene linear light quantities into final display colors.

在前几章中讨论的许多RGB颜色值代表光的强度和阴影。在这一章中,我们将学习由这些值测量的各种物理光量,为后续章节打下基础,这些章节将从一个更基于物理的角度讨论渲染。我们还将了解更多关于渲染过程中经常被忽略的“后半部分”:将代表场景线性光量的颜色转换为最终显示颜色。

8.1 Light Quantities

8.1光量

The first step in any physically based approach to rendering is to quantify light in a precise manner. Radiometry is presented first, as this is the core field concerned with the physical transmission of light. We follow with a discussion of photometry, which deals with light values that are weighted by the sensitivity of the human eye. Our perception of color is a psychophysical phenomenon: the psychological perception of physical stimuli. Color perception is discussed in the section on colorimetry. Finally,we discuss the validity of rendering with RGB color values.

任何基于物理的渲染方法的第一步都是以精确的方式量化光线。首先介绍辐射测量学,因为这是与光的物理传输有关的核心领域。我们接着讨论光度学,它涉及到由人眼的敏感度加权的光值。我们对颜色的感知是一种心理物理现象:对物理刺激的心理感知。色觉在色度学一节中讨论。最后,我们讨论了用RGB颜色值进行渲染的有效性。

8.1.1 Radiometry

辐射测量

Radiometry deals with the measurement of electromagnetic radiation. As will be discussed in more detail in Section 9.1, this radiation propagates as waves. Electromagnetic waves with different wavelengths—the distance between two adjacent points with the same phase, e.g., two adjacent peaks—tend to have different properties. In nature, electromagnetic waves exist across a huge range of wavelengths, from gamma waves less than a hundredth of a nanometer in length to extreme low frequency (ELF) radio waves tens of thousands of kilometers long. The waves that humans can see comprise a tiny subset of that range, extending from about 400 nanometers for violet light to a bit over 700 nanometers for red light. See Figure 8.1.

辐射测量学研究电磁辐射的测量。正如将在9.1节中更详细讨论的那样,这种辐射以波的形式传播。不同波长的电磁波(具有相同相位的两个相邻点之间的距离,例如两个相邻的峰值)往往具有不同的属性。在自然界中,电磁波的波长范围很广,从长度不到百分之一纳米的伽马波到数万公里长的极低频(ELF)无线电波。人类可以看到的波是这个范围的一小部分,从紫光的400纳米到红光的700纳米。参见图8.1。

Figure 8.1. The range of wavelengths for visible light, shown in context within the full electromagnetic spectrum. 

图8.1。可见光的波长范围,显示在整个电磁光谱的上下文中。

Radiometric quantities exist for measuring various aspects of electromagnetic radiation:overall energy, power (energy over time), and power density with respect to area, direction, or both. These quantities are summarized in Table 8.1.

辐射量用于测量电磁辐射的各个方面:总能量、功率(随时间变化的能量)以及与面积、方向或两者相关的功率密度。这些数量总结在表8.1中。

Table 8.1. Radiometric quantities and units. 

表8.1。辐射量和单位。

In radiometry, the basic unit is radiant flux, . Radiant flux is the flow of radiant energy over time—power—measured in watts (W).

在辐射测量学中,基本单位是辐射通量。辐射通量是辐射能量随时间的流动——功率——以瓦特(W)为单位。

Irradiance is the density of radiant flux with respect to area, i.e., d/dA. Irradiance is defined with respect to an area, which may be an imaginary area in space, but is most often the surface of an object. It is measured in watts per square meter.

辐照度是辐射通量相对于面积的密度,即d/dA。辐照度是相对于一个区域来定义的,该区域可以是空间中的一个假想区域,但通常是物体的表面。它是以瓦特每平方米来衡量的。

Before we get to the next quantity, we need to first introduce the concept of a solid angle, which is a three-dimensional extension of the concept of an angle. An angle can be thought of as a measure of the size of a continuous set of directions in a plane, with a value in radians equal to the length of the arc this set of directions intersects on an enclosing circle with radius 1. Similarly, a solid angle measures the size of a continuous set of directions in three-dimensional space, measured in steradians (abbreviated “sr”),which are defined by the area of the intersection patch on an enclosing sphere with radius 1 [544]. Solid angle is represented by the symbol ω.

在进入下一个量之前,我们需要先引入立体角的概念,立体角是角的概念的三维延伸。角度可以被认为是平面上一组连续方向的大小的度量,用弧度表示的值等于这组方向在半径为1的封闭圆上相交的弧的长度。类似地,立体角测量三维空间中一组连续方向的大小,以球面度(缩写为“sr”)来测量,球面度由半径为1的封闭球体上的相交片的面积来定义[544]。立体角用符号ω表示。

In two dimensions, an angle of 2π radians covers the whole unit circle. Extending this to three dimensions, a solid angle of 4π steradians would cover the whole area of the unit sphere. The size of a solid angle of one steradian can be seen in Figure 8.2.

在二维中,2π弧度的角覆盖整个单位圆。将其扩展到三维,4π球面度的立体角将覆盖单位球的整个面积。一个球面度的立体角的大小可以在图8.2中看到。

 

Figure 8.2. A cone with a solid angle of one steradian removed from a cutaway view of a sphere.The shape itself is irrelevant to the measurement. The coverage on the sphere’s surface is the key. 

图8.2。立体角为一球面度的圆锥体,从球体的剖面图中去掉。形状本身与测量无关。球体表面的覆盖范围是关键。

Now we can introduce radiant intensity, I, which is flux density with respect to direction—more precisely, solid angle (d/dω). It is measured in watts per steradian.

现在我们可以引入辐射强度I,它是相对于方向的通量密度,更准确地说是立体角(d/dω)。它的单位是瓦特每球面度。

Finally, radiance, L, is a measure of electromagnetic radiation in a single ray. More precisely, it is defined as the density of radiant flux with respect to both area and solid angle (d平方/dAdω). This area is measured in a plane perpendicular to the ray. If radiance is applied to a surface at some other orientation, then a cosine correction factor must be used. You may encounter definitions of radiance using the term “projected area” in reference to this correction factor.

最后,辐射率L是单一射线中电磁辐射的量度。更准确地说,它被定义为相对于面积和立体角的辐射通量密度(d平方/dAdω)。这个面积是在垂直于光线的平面上测量的。如果将辐射应用于某个其他方向的表面,则必须使用余弦校正因子。你可能会遇到使用术语“投影面积”来定义辐射的情况。

Radiance is what sensors, such as eyes or cameras, measure (see Section 9.2 for more details), so it is of prime importance for rendering. The purpose of evaluating a shading equation is to compute the radiance along a given ray, from the shaded surface point to the camera. The value of L along that ray is the physically based equivalent of the quantity cshaded in Chapter 5. The metric units of radiance are watts per square meter per steradian.

辐射度是传感器(如眼睛或照相机)所测量的(更多细节见9.2节),因此它对渲染至关重要。评估着色方程的目的是计算从着色表面点到相机沿给定光线的辐射。沿着那条射线的L值是第五章中所讨论的物理量的Cshaded等效值。辐射的公制单位是瓦特每平方米每球面度。

The radiance in an environment can be thought of as a function of five variables(or six, including wavelength), called the radiance distribution [400]. Three of the variables specify a location, the other two a direction. This function describes all light traveling anywhere in space. One way to think of the rendering process is that the eye and screen define a point and a set of directions (e.g., a ray going through each pixel),and this function is evaluated at the eye for each direction. Image-based rendering,discussed in Section 13.4, uses a related concept, called the light field.

环境中的辐射可以被认为是五个变量(或者六个,包括波长)的函数,称为辐射分布[400]。三个变量指定一个位置,另外两个指定一个方向。这个函数描述了在空间任何地方传播的所有光。考虑渲染过程的一种方式是眼睛和屏幕定义一个点和一组方向(例如,穿过每个像素的光线),并且在眼睛处针对每个方向评估该函数。在13.4节中讨论的基于图像的渲染使用了一个相关的概念,称为光场。

In shading equations, radiance often appears in the form Lo(x, d) or Li(x, d),which mean radiance going out from the point x or entering into it, respectively. The direction vector d indicates the ray’s direction, which by convention always points away from x. While this convention may be somewhat confusing in the case of Li,since d points in the opposite direction to the light propagation, it is convenient for calculations such as dot products.

在着色方程中,辐射率通常以Lo(x,d)或Li(x,d)的形式出现,这分别意味着辐射率从点x出去或进入点x。方向向量d表示光线的方向,按照惯例,该方向总是指向远离x的方向。虽然这种惯例在Li的情况下可能有些混乱,但是由于d指向与光传播相反的方向,因此对于诸如点积之类的计算是方便的。

An important property of radiance is that it is not affected by distance, ignoring atmospheric effects such as fog. In other words, a surface will have the same radiance regardless of its distance from the viewer. The surface covers fewer pixels when more distant, but the radiance from the surface at each pixel is constant.

辐射率的一个重要性质是不受距离影响,忽略雾等大气影响。换句话说,一个表面将具有相同的亮度,不管它与观察者的距离如何。距离越远,表面覆盖的像素越少,但是每个像素处的表面辐射是恒定的。

Most light waves contain a mixture of many different wavelengths. This is typically visualized as a spectral power distribution (SPD), which is a plot showing how the light’s energy is distributed across different wavelengths. Figure 8.3 shows three examples. Notably, despite the dramatic differences between the middle and bottom SPDs in Figure 8.3, they are perceived as the same color. Clearly, human eyes make for poor spectrometers. We will discuss color vision in detail in Section 8.1.3.

大多数光波包含许多不同波长的混合物。这通常被视为光谱功率分布(SPD),这是一种显示光的能量在不同波长之间如何分布的图表。图8.3显示了三个例子。值得注意的是,尽管图8.3中中间和底部的SPD之间存在显著差异,但它们被视为相同的颜色。很明显,人类的眼睛让光谱仪变得很差。我们将在8.1.3节详细讨论色觉。

Figure 8.3. SPDs (spectral power distributions) for three different light waves. The top SPD is for a green laser, which has an extremely narrow spectral distribution. Its waveform is similar to the simple sine wave in Figure 9.1 on page 294. The middle SPD is for light comprised of the same green laser plus two additional lasers, one red and one blue. The wavelengths and relative intensities of these lasers correspond to an RGB laser projection display showing a neutral white color. The bottom SPD is for the standard D65 illuminant, which is a typical neutral white reference intended to represent outdoor lighting. Such SPDs, with energy continuously spread across the visible spectrum,are typical for natural lighting.

图8.3。三种不同光波的SPD(光谱功率分布)。顶部的SPD用于绿光激光器,其光谱分布非常窄。其波形类似于第294页图9.1中的简单正弦波。中间的SPD用于由相同的绿色激光器加上两个附加激光器(一个红色和一个蓝色)组成的光。这些激光的波长和相对强度对应于显示中性白色的RGB激光投影显示。底部的SPD用于标准D65光源,这是一种典型的中性白色基准,用于代表室外照明。这种SPD的能量在可见光谱范围内连续传播,是典型的自然光。

All radiometric quantities have spectral distributions. Since these distributions are densities over wavelength, their units are those of the original quantity divided by nanometers. For example, the spectral distribution of irradiance has units of watts per square meter per nanometer.

所有辐射量都有光谱分布。因为这些分布是波长上的密度,所以它们的单位是原始量除以纳米。例如,辐照度的光谱分布的单位是瓦特每平方米每纳米。

Since full SPDs are unwieldy to use for rendering, especially at interactive rates,in practice radiometric quantities are represented as RGB triples. In Section 8.1.3 we will explain how these triples relate to spectral distributions.

由于完整的SPD难以用于渲染,特别是在交互速率下,实际上辐射量被表示为RGB三元组。在8.1.3节中,我们将解释这些三元组与光谱分布的关系。

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

椰子糖莫莫

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

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

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

打赏作者

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

抵扣说明:

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

余额充值