Real-Time Rendering——9.4 Illumination照明

The Li(l) (incoming radiance) term in the reflectance equation (Equation 9.4) represents light impinging upon the shaded surface point from other parts of the scene.Global illumination algorithms calculate Li(l) by simulating how light propagates and is reflected throughout the scene. These algorithms use the rendering equation [846],of which the reflectance equation is a special case. Global illumination is discussed in Chapter 11. In this chapter and the next, we focus on local illumination, which uses the reflectance equation to compute shading locally at each surface point. In local illumination algorithms Li(l) is given and does not need to be computed.

反射率方程(方程9.4)中的Li(l)(入射辐射)项表示从场景的其他部分照射到阴影表面点上的光。全局照明算法通过模拟光线如何在整个场景中传播和反射来计算Li(l)。这些算法使用渲染方程[846],其中反射率方程是一个特例。全局照明将在第11章中讨论。在这一章和下一章中,我们将关注局部照明,它使用反射率方程来计算每个表面点的局部明暗度。在局部照明算法中,Li(l)是给定的,不需要计算。

In realistic scenes, Li(l) includes nonzero radiance from all directions, whether emitted directly from light sources or reflected from other surfaces. Unlike the directional and punctual lights discussed in Section 5.2, real-world light sources are area lights that cover a nonzero solid angle. In this chapter, we use a restricted form of Li(l) comprised of only directional and punctual lights, leaving more general lighting environments to Chapter 10. This restriction allows for a more focused discussion.

在真实场景中,Li(l)包括来自所有方向的非零辐射,无论是直接从光源发出还是从其他表面反射。与第5.2节中讨论的平行光和点光源不同,真实世界的光源是覆盖非零立体角的区域光。在这一章中,我们使用一个限制形式的Li(l ),只包括方向灯和点状灯,将更多的一般照明环境留到第10章。这种限制使得讨论更加集中。

Although punctual and directional lights are non-physical abstractions, they can be derived as approximations of physical light sources. Such a derivation is important,because it enables us to incorporate these lights in a physically based rendering framework with confidence that we understand the error involved.

虽然点光源和平行光是非物理的抽象,但是它们可以作为物理光源的近似。这种推导是很重要的,因为它使我们能够将这些灯光合并到一个基于物理的渲染框架中,并且确信我们理解所涉及的误差。

We take a small, distant area light and define lc as the vector pointing to its center. We also define the light’s color clight as the reflected radiance from a white Lambertian surface facing toward the light (n = lc). This is an intuitive definition for authoring, since the color of the light corresponds directly to its visual effect.

我们取一个小的,远处的区域光源,定义lc为指向其中心的向量。我们还将光的色光定义为从面向光的白色朗伯表面反射的辐射(n = lc)。这是创作的直观定义,因为灯光的颜色与其视觉效果直接对应。

With these definitions, a directional light can be derived as the limit case of shrinking the size of the area light down to zero while maintaining the value of clight [758].In this case the integral in the reflectance equation (Equation 9.4) simplifies down to a single BRDF evaluation, which is significantly less expensive to compute:

有了这些定义,一个平行光可以被导出为在保持clight [758]值的同时将区域光的大小缩小到零的极限情况。在这种情况下,反射率方程(方程9.4)中的积分简化为一次BRDF评估,计算成本显著降低:

The dot product (n·l) is often clamped to zero, as a convenient method of skipping contributions from lights under the surface:  

点积(n l)通常固定为零,这是跳过表面下灯光贡献的一种便捷方法:

Note the x+ notation introduced in Section 1.2, which indicates that negative values are clamped to zero. 

请注意1.2节中引入的x+符号,它表示负值 被钳制为零。

Punctual lights can be treated similarly. The only differences are that the area light is not required to be distant, and clight falls off as the inverse square of the distance to the light, as in Equation 5.11 (page 111). In the case of more than one light source, Equation 9.12 is computed multiple times and the results are summed:

点状灯也可以类似处理。唯一的区别是区域光不需要很远,并且clight随着到光的距离的平方的倒数而下降,如等式5.11(第111页)。在一个以上光源的情况下,多次计算等式9.12,并将结果相加:

where lci and clighti are the direction and color, respectively, of the ith light. Note the similarities to Equation 5.6 (page 109). 

其中lci和clighti分别是第I个光的方向和颜色。注意与等式5.6(第109页)的相似之处。

The π factor in Equation 9.14 cancels out the 1/π factor that often appears in BRDFs (e.g., Equation 9.11). This cancellation moves the divide operation out of the shader and makes the shading equation simpler to read. However, care must be taken when adapting BRDFs from academic papers for use in real-time shading equations.Typically, the BRDF will need to be multiplied by π before use.

方程9.14中的π因子抵消了BRDFs中经常出现的1/π因子(如方程9.11)。这种取消将除法运算移出着色器,并使着色方程更容易阅读。但是,在将学术论文中的BRDFs用于实时着色方程时,必须小心谨慎。通常,BRDF在使用前需要乘以π。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
资源包主要包含以下内容: ASP目源码:每个资源包都包含完整的ASP目源码,这些源码采用了经典的ASP技术开发,结构清晰、注释详细,帮助用户轻松理解整个目的逻辑和实现方式。通过这些源码,用户可以学习到ASP的基本语法、服务器端脚本编写方法、数据库操作、用户权限管理等关键技术。 数据库设计文件:为了方便用户更好地理解系统的后台逻辑,每个都附带了完整的数据库设计文件。这些文件通常包括数据库结构图、数据表设计文档,以及示例数据SQL脚本。用户可以通过这些文件快速搭建目所需的数据库环境,并了解各个数据表之间的关系和作用。 详细的开发文档:每个资源包都附有详细的开发文档,文档内容包括目背景介绍、功能模块说明、系统流程图、用户界面设计以及关键代码解析等。这些文档为用户提供了深入的学习材料,使得即便是从零开始的开发者也能逐步掌握目开发的全过程。 目演示与使用指南:为帮助用户更好地理解和使用这些ASP目,每个资源包都包含目的演示文件和使用指南。演示文件通常以视频或图文形式展示目的主要功能和操作流程,使用指南则详细说明了如何配置开发环境、部署目以及常见问题的解决方法。 毕业设计参考:对于正在准备毕业设计的学生来说,这些资源包是绝佳的参考材料。每个目不仅功能完善、结构清晰,还符合常见的毕业设计要求和标准。通过这些目,学生可以学习到如何从零开始构建一个完整的Web系统,并积累丰富的目经验。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

椰子糖莫莫

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

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

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

打赏作者

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

抵扣说明:

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

余额充值