Real-Time Rendering——Chapter 10Local Illumination局部照明

“Light makes right.”
—Andrew Glassner

In Chapter 9 we discussed the theory of physically based materials, and how to evaluate them with punctual light sources. With this content we can perform shading computations by simulating how lights interact with surfaces, in order to measure how much radiance is sent in a given direction to our virtual camera. This spectral radiance is the scene-referred pixel color that will be converted (Section 8.2) to the display-referred color a given pixel will have in the final image.

在第九章中,我们讨论了基于物理的材料的理论,以及如何用点光源来评估它们。有了这些内容,我们可以通过模拟光线如何与表面相互作用来执行着色计算,以便测量在给定方向上有多少辐射被发送到我们的虚拟相机。该光谱辐射亮度是场景参考像素颜色,其将被转换(8.2节)为给定像素在最终图像中具有的显示器参考颜色。

In reality, the interactions that we need to consider are never punctual. We have seen in Section 9.13.1 how, in order to correctly evaluate shading, we have to solve the integral of the surface BRDF response over the entire pixel footprint, which is the projection of the pixel area onto the surface. This process of integration can also be thought as an antialiasing solution. Instead of sampling a shading function that does not have a bound on its frequency components, we pre-integrate.

事实上,我们需要考虑的交互从来都不是准时的。我们已经在第9.13.1节中看到,为了正确评估阴影,我们必须求解整个像素覆盖区上的表面BRDF响应的积分,即像素区域在表面上的投影。这个集成过程也可以被认为是一个反走样解决方案。我们预先积分,而不是采样一个对其频率分量没有限制的着色函数。

Up to this point, the effects of only point and directional light sources have been presented, which limits surfaces to receive light from a handful of discrete directions. This description of lighting is incomplete. In reality, surfaces receive light from all incoming directions. Outdoors scenes are not just lit by the sun. If that were true,all surfaces in shadow or facing away from the sun would be black. The sky is an important source of light, caused by sunlight scattering from the atmosphere. The importance of sky light can be seen by looking at a picture of the moon, which lacks sky light because it has no atmosphere. See Figure 10.1.

到目前为止,只呈现了点光源和方向光源的效果,这限制了表面接收来自少数离散方向的光。这种对照明的描述是不完整的。实际上,表面接收来自所有方向的光。户外场景不仅仅是被阳光照亮。如果这是真的,所有在阴影中或背对太阳的表面都将是黑色的。天空是一个重要的光源,由大气散射的太阳光造成。天光的重要性可以通过看一张月球的照片来看,月球缺少天光,因为它没有大气层。参见图10.1。

Figure 10.1. Image taken on the moon, which has no sky light due to the lack of an atmosphere to scatter sunlight. This image shows what a scene looks like when it is lit by only a direct light source. Note the pitch-black shadows and lack of any detail on surfaces facing away from the sun. This photograph shows Astronaut James B. Irwin next to the Lunar Roving Vehicle during the Apollo 15 mission. The shadow in the foreground is from the Lunar Module. Photograph taken by Astronaut David R. Scott, Commander. (Image from NASA’s collection.)

图10.1。在月球上拍摄的图像,由于缺乏大气散射太阳光,月球上没有天光。这张图片展示了一个场景只被直射光源照亮时的样子。请注意背对太阳的表面上漆黑的阴影和缺乏任何细节。这张照片显示在阿波罗15号任务中,宇航员詹姆斯·b·欧文在月球漫游车旁边。前景中的阴影来自登月舱。照片由指挥官宇航员大卫·r·斯科特拍摄。(图片来自NASA的收藏。)

On overcast days, and at dusk or dawn, outdoor lighting is all sky light. Even on a clear day, the sun subtends a cone when seen from the earth, so is not infinitesimally small. Curiously, the sun and the moon both subtend similar angles, around half a degree, despite their enormous size difference—the sun is two orders of magnitude larger in radius than the moon.

在阴天,黄昏或黎明时,室外照明都是天光。即使在晴朗的日子里,从地球上看,太阳对着一个圆锥体,所以不是无限小。奇怪的是,太阳和月亮都对着相似的角度,大约半度,尽管它们的大小相差很大——太阳的半径比月亮大两个数量级。

In reality, lighting is never punctual. Infinitesimal entities are useful in some situations as cheap approximations, or as building blocks for more complete models.In order to form a more realistic lighting model, we need to integrate the BRDF response over the full hemisphere of incident directions on the surface. In real-time rendering we prefer to solve the integrals that the rendering equation (Section 11.1) entails by finding closed-form solutions or approximations of these. We usually avoid averaging multiple samples (rays), as this approach tends to be much slower. See Figure 10.2.

现实中,照明从来都不准时。在某些情况下,无穷小实体作为廉价的近似值或者作为更完整模型的构建块是有用的。为了形成更真实的照明模型,我们需要在表面上入射方向的整个半球上整合BRDF响应。在实时渲染中,我们更喜欢通过寻找闭合解或近似解来求解渲染方程(11.1节)所包含的积分。我们通常避免平均多个样本(光线),因为这种方法往往要慢得多。参见图10.2。

Figure 10.2. On the left, the integrals we have seen in Chapter 9: surface area and punctual light.On the right, the objective of this chapter will be to extend our shading mathematics to account for the integral over the light surface. 

图10.2。左边是我们在第九章看到的积分:表面积和点状光。在右边,这一章的目标将是扩展我们的阴影数学来解释光表面的积分。

This chapter is dedicated to the exploration of such solutions. In particular, we want to extend our shading model by computing the BRDF with a variety of nonpunctual light sources. Often, in order to find inexpensive solutions (or any at all),we will need to approximate the light emitter, the BRDF, or both. It is important to evaluate the final shading results in a perceptual framework, understanding what elements matter most in the final image and so allocate more effort toward these.

本章专门探讨这种解决方案。特别是,我们希望通过计算各种非定时光源的BRDF来扩展我们的着色模型。通常,为了找到便宜的解决方案(或任何解决方案),我们需要近似光发射器、BRDF或两者。在感知框架中评估最终的着色结果是很重要的,理解什么元素在最终的图像中最重要,因此在这些方面投入更多的精力。

We start this chapter with formulae to integrate analytic area light sources. Such emitters are the principal lights in the scene, responsible for most of the direct lighting intensity,so for these we need to retain all of our chosen material properties. Shadows should be computed for such emitters, as light leaks will result in obvious artifacts.We then investigate ways to represent more general lighting environments, ones that consist of arbitrary distributions over the incoming hemisphere. We typically accept more approximated solutions in these cases. Environment lighting is used for large,complex, but also less intense sources of light. Examples include light scattered from the sky and clouds, indirect light bouncing off large objects in the scene, and dimmer direct area light sources. Such emitters are important for the correct balance of the image that would otherwise appear too dark. Even if we consider the effect of indirect light sources, we are still not in the realm of global illumination (Chapter 11), which depends on the explicit knowledge of other surfaces in the scene.

我们从积分解析区域光源的公式开始这一章。这种发射器是场景中的主要灯光,负责大部分的直接照明强度,因此我们需要保留所有我们选择的材质属性。应该为这种发射器计算阴影,因为光泄漏会导致明显的伪像。然后,我们研究表示更一般的照明环境的方法,这些照明环境由入射半球上的任意分布组成。在这些情况下,我们通常接受更近似的解决方案。环境照明用于大型、复杂但强度较低的光源。示例包括从天空和云层散射的光,场景中大型对象反射的间接光,以及较暗的直接区域光源。这种发射器对于图像的正确平衡很重要,否则图像会显得太暗。即使我们考虑间接光源的影响,我们仍然不在全局照明的范围内(第11章),这取决于场景中其他表面的明确知识。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

椰子糖莫莫

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

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

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

打赏作者

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

抵扣说明:

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

余额充值