Real-Time Rendering——9.1.3 Surfaces表面

From an optical perspective, an object surface is a two-dimensional interface separating volumes with different index of refraction values. In typical rendering situations, the outer volume contains air, with a refractive index of about 1.003, often assumed to be 1 for simplicity. The refractive index of the inner volume depends on the substance from which the object is made.

从光学角度来看,物体表面是分隔具有不同折射率值的体积的二维界面。在典型的渲染情况下,外部体积包含空气,其折射率约为1.003,为简单起见通常假设为1。内部体积的折射率取决于制造物体的物质。

When a light wave strikes a surface, two aspects of that surface have important effects on the result: the substances on either side, and the surface geometry. We will start by focusing on the substance aspect, assuming the simplest-possible surface geometry, a perfectly flat plane. We denote the index of refraction on the “outside” (the side where the incoming, or incident, wave originates) as n1 and the index of refraction on the “inside” (where the wave will be transmitted after passing through the surface) as n2.

当光波照射到一个表面时,该表面的两个方面对结果有重要影响:两侧的物质和表面的几何形状。我们将从物质方面开始,假设最简单的表面几何形状,一个完美的平面。我们将“外侧”(入射或入射波产生的一侧)的折射率记为n1,将“内侧”(波穿过表面后将在此传播)的折射率记为n2。

We have seen in the previous section that light waves scatter when they encounter a discontinuity in material composition or density, i.e., in the index of refraction. A planar surface separating different indices of refraction is a special type of discontinuity that scatters light in a specific way. The boundary conditions require that the electrical field component parallel to the surface is continuous. In other words, the projection of the electric field vector to the surface plane must match on either side of the surface.This has several implications:

我们在上一节中已经看到,当光波遇到物质成分或密度的不连续性时,即遇到折射率的不连续性时,光波就会发生散射。分隔不同折射率的平面是一种特殊类型的不连续性,它以特定的方式散射光。边界条件要求平行于表面的电场分量是连续的。换句话说,电场矢量到表面平面的投影必须在表面的任一侧匹配。这有几个含义:

1. At the surface, any scattered waves must be either in phase, or 180◦ out of phase, with the incident wave. Thus at the surface, the peaks of the scattered waves must line up either with the peaks or the troughs of the incident wave. This restricts the scattered waves to go in only two possible directions, one continuing forward into the surface and one retreating away from it. The first of these is the transmitted wave, and the second is the reflected wave.

1.在地面上,任何散射波必须与入射波同相,或180°异相。因此,在地表,散射波的波峰必须与入射波的波峰或波谷对齐。这就限制了散射波只能在两个可能的方向上传播,一个是继续向前进入地表,另一个是远离地表。第一种是透射波,第二种是反射波。

2. The scattered waves must have the same frequency as the incident wave. We assume a monochromatic wave here, but the principles we discuss can be applied to any general wave by first decomposing it into monochromatic components.

2.散射波的频率必须与入射波的频率相同。这里我们假设一个单色波,但是我们讨论的原理可以通过首先将它分解成单色分量而应用于任何一般的波。

3. As a light wave moves from one medium to another, the phase velocity—the speed the wave travels through the medium—changes proportionally to the relative index of refraction (n1/n2). Since the frequency is fixed, the wavelength also changes proportionally to (n1/n2).

3.当光波从一种介质移动到另一种介质时,相位速度△波通过介质的速度△与相对折射率(n1/n2)成比例变化。由于频率是固定的,波长也成比例变化为(n1/n2)。 

The final result is shown in Figure 9.9. The reflected and incident wave directions have the same angle θi with the surface normal. The transmitted wave direction is bent (refracted) at an angle θt, which has the following relation to θi:

最终结果如图9.9所示。反射波和入射波的方向与表面法线具有相同的角度θi。透射波方向以角度θt弯曲(折射),其与θi的关系如下:

 This equation for refraction is known as Snell’s law. It is used in global refraction effects, which will be discussed further in Section 14.5.2.

这个折射方程被称为斯内尔定律。它用于全局折射效应,这将在第14.5.2节中进一步讨论。 

Figure 9.9. A light wave striking a planar surface separating indices of refraction n1 and n2. The left side of the figure shows a side view with the incident wave coming in from the upper left. The intensity of the red bands indicate wave phase. The spacing of the waves below the surface is changed proportionally to the ratio (n1/n2), which in this case is 0.5. The phases line up along the surface, so the change in spacing bends (refracts) the transmitted wave direction. The triangle construction shows the derivation of Snell’s law. For clarity, the upper right of the figure shows the reflected wave separately. It has the same wave spacing as the incident wave, and thus its direction has the same angle with the surface normal. The lower right of the figure shows the wave direction vectors. 

图9.9。一种入射到平面上的光波,将折射率n1和n2分开。该图的左侧显示了入射波从左上进入的侧视图。红色条带的强度表示波的相位。表面下的波的间距与比率(n1/n2)成比例地变化,在这种情况下该比率为0.5。相位沿着表面排列,因此间距的变化会弯曲(折射)透射波的方向。三角形结构显示了斯涅尔定律的推导。为了清楚起见,图的右上方单独示出了反射波。它与入射波具有相同的波间距,因此它的方向与表面法线具有相同的角度。图的右下方显示了波浪方向矢量。

Although refraction is often associated with clear materials such as glass and crystal,it happens at the surface of opaque objects as well. When refraction occurs with opaque objects, the light undergoes scattering and absorption in the object’s interior.Light interacts with the object’s medium, just as with the various cups of liquid in Figure 9.8. In the case of metals, the interior contains many free electrons (electrons not bound to molecules) that “soak up” the refracted light energy and redirect it into the reflected wave. This is why metals have high absorption as well as high reflectivity.

虽然折射通常与透明材料如玻璃和水晶有关,但它也发生在不透明物体的表面。当不透明物体发生折射时,光线在物体内部会发生散射和吸收。光与物体的介质相互作用,就像图9.8中的各种杯子一样。就金属而言,内部包含许多自由电子(不束缚于分子的电子),这些电子“吸收”折射的光能,并将其重定向到反射波中。这就是金属具有高吸收率和高反射率的原因。

Figure 9.8. Containers of liquids that exhibit varying combinations of absorption and scattering. 

图9.8。表现出不同吸收和散射组合的液体容器。

The surface refraction phenomena we have discussed—reflection and refraction—require an abrupt change in index of refraction, occurring over a distance of less than a single wavelength. A more gradual change in index of refraction does not split the light, but instead causes its path to curve, in a continuous analog of the discontinuous bend that occurs in refraction. This effect commonly can be seen when air density varies due to temperature, such as mirages and heat distortion. See Figure 9.10.

我们讨论过的表面折射现象——反射和折射——需要折射率发生突然变化,这种变化发生在小于一个波长的距离内。折射率更平缓的变化不会分裂光,而是使其路径弯曲,类似于折射中出现的不连续弯曲。当空气密度因温度而变化时,通常可以看到这种效应,例如海市蜃楼和热变形。参见图9.10。

Figure 9.10. An example of light paths bending due to gradual changes in index of refraction, in this case caused by temperature variations. (“EE Lightnings heat haze,” Paul Lucas, used under the CC BY 2.0 license.) 

图9.10。折射率逐渐变化导致光路弯曲的一个例子,在这种情况下是由温度变化引起的。(“EE Lightnings heat haze”,Paul Lucas,在CC BY 2.0许可下使用。)

Even an object with a well-defined boundary will have no visible surface if it is immersed in a substance with the same index of refraction. In the absence of an index of refraction change, reflection and refraction cannot occur. An example of this is seen in Figure 9.11.

如果把一个物体浸在折射率相同的物质中,即使它有明确的边界,也不会有可见的表面。在没有折射率变化的情况下,反射和折射不可能发生。图9.11就是一个例子。

Figure 9.11. The refractive index of these decorative beads is the same as water. Above the water,they have a visible surface due to the difference between their refractive index and that of air. Below the water, the refractive index is the same on both sides of the bead surfaces, so the surfaces are invisible. The beads themselves are visible only due to their colored absorption. 

图9.11。这些装饰珠的折射率和水一样。在水面上,由于它们的折射率和空气的折射率不同,它们有一个可见的表面。在水下,珠子表面两侧的折射率是相同的,因此表面是不可见的。珠子本身是可见的,只是因为它们吸收了颜色。

Until now we have focused on the effect of the substances on either side of a surface. We will now discuss the other important factor affecting surface appearance: geometry. Strictly speaking, a perfectly flat planar surface is impossible. Every surface has irregularities of some kind, even if only the individual atoms comprising the surface. However, surface irregularities much smaller than a wavelength have no effect on light, and surface irregularities much larger than a wavelength effectively tilt the surface without affecting its local flatness. Only irregularities with a size in the range of 1–100 wavelengths cause the surface to behave differently than a flat plane, via a phenomenon called diffraction that will be discussed further in Section 9.11.

到目前为止,我们一直专注于表面两侧物质的影响。我们现在将讨论影响表面外观的另一个重要因素:几何形状。严格地说,完全平坦的平面是不可能的。每个表面都有某种不规则性,即使只是组成表面的单个原子。然而,比波长小得多的表面不规则性对光没有影响,并且比波长大得多的表面不规则性有效地倾斜表面而不影响其局部平整度。只有大小在1-100个波长范围内的不规则体才会通过一种称为衍射的现象使表面的行为不同于平面,这种现象将在9.11节中进一步讨论。

In rendering, we typically use geometrical optics, which ignores wave effects such as interference and diffraction. This is equivalent to assuming that all surface irregularities are either smaller than a light wavelength or much larger. In geometrical optics light is modeled as rays instead of waves. At the point a light ray intersects with a surface, the surface is treated locally as a flat plane. The diagram on the bottom right of Figure 9.9 can be seen as a geometrical optics picture of reflection and refraction, in contrast with the wave picture presented in the other parts of that figure. We will keep to the realm of geometrical optics from this point until Section 9.11, which is dedicated to the topic of shading models based on wave optics.

在渲染中,我们通常使用几何光学,这忽略了波的影响,如干涉和衍射。这相当于假设所有的表面不规则性要么小于光波长,要么大得多。在几何光学中,光被建模为光线而不是波。在光线与曲面相交的点上,曲面被局部视为平面。图9.9右下角的图可以看作是反射和折射的几何光学图,与图中其他部分的波动图形成对比。从这一点开始,我们将继续讨论几何光学领域,直到9.11节,这一节专门讨论基于波动光学的着色模型。

As we mentioned earlier, surface irregularities much larger than a wavelength change the local orientation of the surface. When these irregularities are too small to be individually rendered—in other words, smaller than a pixel—we refer to them as microgeometry. The directions of reflection and refraction depend on the surface normal. The effect of the microgeometry is to change that normal at different points on the surface, thus changing the reflected and refracted light directions.

如前所述,比波长大得多的表面不规则性会改变表面的局部方向。当这些不规则性太小而无法单独渲染时,换句话说,小于一个像素时,我们称之为微几何反射和折射的方向取决于表面法线。微观几何的作用是改变表面上不同点的法线,从而改变反射和折射光的方向。

Even though each specific point on the surface reflects light in only a single direction,each pixel covers many surface points that reflect light in various directions.The appearance is driven by the aggregate result of all the different reflection directions.Figure 9.12 shows an example of two surfaces that have similar shapes on the macroscopic scale but significantly different microgeometry.

即使表面上的每个特定点仅在单个方向上反射光,每个像素也覆盖许多在不同方向上反射光的表面点。外观由所有不同反射方向的综合结果驱动。图9.12给出了两个表面的例子,这两个表面在宏观尺度上具有相似的形状,但在微观几何上有很大的不同。

Figure 9.12. On the left we see photographs of two surfaces, with diagrams of their microscopic structures on the right. The top surface has slightly rough microgeometry. Incoming light rays hit surface points that are angled somewhat differently and reflect in a narrow cone of directions. The visible effect is a slight blurring of the reflection. The bottom surface has rougher microgeometry.Surface points hit by incoming light rays are angled in significantly different directions and the reflected light spreads out in a wide cone, causing blurrier reflections. 

图9.12。左边是两个表面的照片,右边是它们的微观结构图。顶面具有略微粗糙的微观几何形状。入射光线照射到表面上角度稍有不同的点上,并在一个狭窄的方向锥内反射。可见的效果是反射的轻微模糊。底面具有较粗糙的微观几何形状。被入射光线击中的表面点的角度明显不同,反射光以宽锥形散开,导致反射更加模糊。

For rendering, rather than modeling the microgeometry explicitly, we treat it statistically and view the surface as having a random distribution of microstructure normals. As a result, we model the surface as reflecting (and refracting) light in a continuous spread of directions. The width of this spread, and thus the blurriness of reflected and refracted detail, depends on the statistical variance of the microgeometry normal vectors—in other words, the surface microscale roughness. See Figure 9.13.

对于渲染,我们不是显式地建模微观几何,而是统计地处理它,并将表面视为具有微观结构法线的随机分布。因此,我们将表面建模为在连续的方向上反射(和折射)光。这种扩散的宽度,以及反射和折射细节的模糊程度,取决于微几何法向矢量的统计方差,换句话说,就是表面微尺度粗糙度。参见图9.13。

Figure 9.13. When viewed macroscopically, surfaces can be treated as reflecting and refracting light in multiple directions. 

图9.13。从宏观上看,表面可以被视为反射和折射光 在多个方向。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

椰子糖莫莫

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

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

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

打赏作者

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

抵扣说明:

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

余额充值