Types of light 光源类型

本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://docs.unity3d.com/Manual/Lighting.html

This section details the many different ways of creating light in Unity.
本节详细介绍了在Unity中创建光的许多不同方法。

Point lights 点光源

A point light is located at a point in space and sends light out in all directions equally. The direction of light hitting a surface is the line from the point of contact back to the center of the light object. The intensity diminishes with distance from the light, reaching zero at a specified range. Light intensity is inversely proportional to the square of the distance from the source. This is known as ‘inverse square law’ and is similar to how light behaves in the real world.
点光源位于空间中的一个点上,向各个方向均匀地发射光。光击中表面的方向是从接触点到光物体中心的直线。光强随距离的增加而减小,在一定范围内达到零。光强与光源距离的平方成反比。这就是所谓的“平方反比定律”,类似于光在现实世界中的行为。

Point lights are useful for simulating lamps and other local sources of light in a scene. You can also use them to make a spark or explosion illuminate its surroundings in a convincing way.
点光源对于模拟场景中的灯具和其他局部光源非常有用。你也可以照亮周围来制造火花或爆炸。

Effect of a Point Light in the scene

Spot lights 聚光灯

Like a point light, a spot light has a specified location and range over which the light falls off. However, the spot light is constrained to an angle, resulting in a cone-shaped region of illumination. The center of the cone points in the forward (Z) direction of the light object. Light also diminishes at the edges of the spot light’s cone. Widening the angle increases the width of the cone and with it increases the size of this fade, known as the ‘penumbra’.
就像点光源一样,聚光灯也有一个特定的位置和范围,在这个位置和范围内,光照会洒落下来。然而,聚光灯被限制在一个角度,从而形成一个锥形的照明区域。圆锥的中心指向光物体的前(Z)方向。光在聚光灯锥的边缘也会减弱。扩大角度会增加圆锥体的宽度,同时也会增加消退的大小,这就是所谓的“半影”。

Spot lights are generally used for artificial light sources such as flashlights, car headlights and searchlights. With the direction controlled from a script or animation, a moving spot light will illuminate just a small area of the scene and create dramatic lighting effects.
聚光灯一般用于手电筒、汽车前照灯和探照灯等人工控制光源。在脚本或动画控制方向的情况下,移动的聚光灯只会照亮场景的一小部分,并产生戏剧性的照明效果。

Effect of a Spot Light in the scene

Directional lights 平行光/定向光

Directional lights are very useful for creating effects such as sunlight in your scenes. Behaving in many ways like the sun, directional lights can be thought of as distant light sources which exist infinitely far away. A directional light does not have any identifiable source position and so the light object can be placed anywhere in the scene. All objects in the scene are illuminated as if the light is always from the same direction. The distance of the light from the target object is not defined and so the light does not diminish.
定向光对于在场景中创建诸如阳光之类的效果非常有用。定向性光和太阳有许多相似之处,它们可以被看作是存在于无限远处的遥远光源。定向光源没有任何可识别的光源位置,因此光源对象可以放置在场景中的任何位置。场景中的所有物体都被照亮了,就好像光线总是来自同一个方向。光线与目标物体的距离没有定义,因此光照强度不会减少。

Directional lights represent large, distant sources that come from a position outside the range of the game world. In a realistic scene, they can be used to simulate the sun or moon. In an abstract game world, they can be a useful way to add convincing shading to objects without exactly specifying where the light is coming from.
方向灯代表了来自游戏世界范围之外的巨大而遥远的光源。在现实场景中,它们可以用来模拟太阳或月亮。在一个抽象的游戏世界中,它们是一种很有用的方法,可以给物体添加令人信服的着色,而不需要精确地指定光线来自哪里。

Effect of a Directional Light in the scene

By default, every new Unity scene contains a Directional Light. In Unity 5, this is linked to the procedural sky system defined in the Environment Lighting section of the Lighting Panel (Lighting>Scene>Skybox). You can change this behaviour by deleting the default Directional Light and creating a new light or simply by specifying a different GameObject from the ‘Sun’ parameter (Lighting>Scene>Sun). Rotating the default Directional Light (or ‘Sun’) causes the ‘Skybox’ to update. With the light angled to the side, parallel to the ground, sunset effects can be achieved. Additionally, pointing the light upwards causes the sky to turn black, as if it were nighttime. With the light angled from above, the sky will resemble daylight. If the Skybox is selected as the ambient source, Ambient Lighting will change in relation to these colors.
默认情况下,每个新的Unity场景都包含一个方向光。在Unity 5中,这是与照明面板环境照明部分(照明>场景>Skybox)中定义的程序化天空系统相关联的。你可以通过删除默认的方向光并创建一个新的光来改变这一行为,或者只是通过从“Sun”参数中指定一个不同的GameObject(游戏物体)(光照>场景>Sun)。旋转默认方向灯(或“太阳”)会导致“天空盒”更新。光线向侧面倾斜,与地面平行,可以实现日落效果。此外,向上的光线会使天空变黑,就像夜晚一样。光线从上方角度照射下来,天空就像白天一样。如果选择Skybox作为环境光源,环境照明将根据这些颜色发生变化。

Area lights 区域光

An Area Light is defined by a rectangle in space. Light is emitted in all directions uniformly across their surface area, but only from one side of the rectangle. There is no manual control for the range of an Area Light, however intensity will diminish at inverse square of the distance as it travels away from the source. Since the lighting calculation is quite processor-intensive, area lights are not available at runtime and can only be baked into lightmaps.
区域光由空间中的矩形定义。光从各个方向均匀地通过它们的表面积发射,但只从矩形的一边发射。区域光的范围没有手动控制,但是当它离开光源时,强度会在距离的平方反比处减小。由于照明计算是相当处理器密集型的,区域光在运行时不可用于动态物体,只能烘焙成光照图。

Since an area light illuminates an object from several different directions at once, the shading tends to be more soft and subtle than the other light types. You might use it to create a realistic street light or a bank of lights close to the player. A small area light can simulate smaller sources of light (such as interior house lighting) but with a more realistic effect than a point light.
因为一个区域光从几个不同的方向同时照亮一个物体,阴影往往比其他类型的光更柔和和微妙。你可以使用它来创建一个现实的街灯或靠近玩家的一排灯光。小面积的光线可以模拟较小的光源(如室内照明),但比点光源更逼真。

Light is emitted across the surface of an Area Light producing a diffuse light with soft shadowing.
光照发射从区域光的表面穿过造成一个柔软的漫反射阴影。

Emissive materials 自发光材质

Like area lights, emissive materials emit light across their surface area. They contribute to bounced light in your scene and associated properties such as color and intensity can be changed during gameplay. Whilst area lights are not supported by Precomputed Realtime GI, similar soft lighting effects in realtime are still possible using emissive materials.
像区域光一样,发光材料在其表面区域发射光。它们有助于在你的场景中反射光线,在游戏过程中可以改变颜色和强度等相关属性。虽然区域灯不支持预计算的实时GI,在类似实时光照效果仍然可能使用发光材质。

‘Emission’ is a property of the Standard Shader which allows static objects in our scene to emit light. By default the value of ‘Emission’ is set to zero. This means no light will be emitted by objects assigned materials using the Standard Shader.
“自发光”是标准着色器的一个属性,它允许我们场景中的静态对象自发光。默认情况下,“Emission”的值设置为0。这意味着使用标准材质的物体不会发出光照。

There is no range value for emissive materials but light emitted will again falloff at a quadratic rate. Emission will only be received by objects marked as ‘Static’ or “Lightmap Static’ from the Inspector. Similarly, emissive materials applied to non-static, or dynamic geometry such as characters will not contribute to scene lighting.
自发光材质没有范围值,但发射的光会以二次方速率衰减。只有标记为“静态”或“Lightmap Static”的对象才会接收自发光。同样,应用于非静态或动态几何体(如角色)的自发光材质也不会影响到场景光照。

However, materials with an emission above zero will still appear to glow brightly on-screen even if they are not contributing to scene lighting. This effect can also be produced by selecting ‘None’ from the Standard Shader
’s ‘Global Illumination’ Inspector property. Self-illuminating materials like these are a useful way to create effects such as neons or other visible light sources.
然而,自发光值在零以上的材料仍然会在屏幕上发光,即使它们对场景照明没有贡献。这个效果也可以通过从标准着色器中选择“None”来产生的“GI”检查器属性。像这样的自发光材质是一种有用的方法来创造效果,如霓虹灯或其他可见光源。

Emissive materials only directly affect static geometry in your scene. If you need dynamic, or non-static geometry - such as characters, to pick up light from emissive materials, Light Probes must be used.
自发光材质只直接影响在场景中的静态几何体。如果你需要动态的,或者非静态的几何体,例如角色,从自发光材质中获取光,必须使用光照探头。

Ambient light 环境光

Ambient light is light that is present all around the scene and doesn’t come from any specific source object. It can be an important contributor to the overall look and brightness of a scene.
环境光是在场景周围出现的光,不来自任何特定的源对象。它可以是一个重要的贡献者,在场景上对整体效果和亮度产生影响。

Ambient light can be useful in a number of cases, depending upon your chosen art style. An example would be bright, cartoon-style rendering where dark shadows may be undesirable or where lighting is perhaps hand-painted into textures. Ambient light can also be useful if you need to increase the overall brightness of a scene without adjusting individual lights.
环境光在许多情况下是有用的,这取决于你选择的艺术风格。一个例子:明亮的,卡通风格的渲染,黑暗的阴影可能是不受欢迎的,或者光照可能是手绘成纹理。如果你需要在不调整灯光的情况下增加场景的整体亮度,环境光也很有用。

Ambient light settings can be found in the Lighting window.
环境光设置可以在照明窗口中找到。

Types of light 光照类型 光照系列4相关推荐

  1. 【UE灯光•简介】UE4光照类型和灯光参数

    我们UE4学习接下来这段时间我们了解下灯光. 打开我们ue4来到我们灯光系统 分别是定向光源 点光源 聚光灯 矩形光源 天光 静态光源(Static): 不能动态实时的添加,只能预先烘焙好效果,但是不 ...

  2. OpenGL学习笔记(四)-光照-材质-光照贴图

    参考网址:LearnOpenGL 中文版 哔哩哔哩教程 第二章 光照 2.1 颜色 现实生活中人眼看到某一物体的颜色,是它所反射的颜色.如将白光照在红色的玩具上,玩具会吸收白光中除了红色以外的所有子颜 ...

  3. 【OpenGL学习笔记⑧】——键盘控制正方体+光源【冯氏光照模型 光照原理 环境光照+漫反射光照+镜面光照】

    ✅ 重点参考了 LearnOpenGL CN 的内容,但大部分知识内容,小编已作改写,以方便读者理解. 文章目录 零. 成果预览图 一. 光照原理与投光物的配置 1.1 光照原理 1.2 投光物 二. ...

  4. java.sql.Types,数据库字段类型,java数据类型的对应关系

    原文地址为: java.sql.Types,数据库字段类型,java数据类型的对应关系 以下转自:http://kummy.itpub.net/post/17165/172850 本文在原文基础上有增 ...

  5. opengl光照之光照贴图

    漫反射贴图 我们希望通过某种方式对物体的每个片段单独设置漫反射颜色.有能够让我们根据片段在物体上的位置来获取颜色值得系统吗? 这可能听起来很熟悉,而且事实上这个系统我们已经使用很长时间了.这听起来很像 ...

  6. oracle number对应java什么类型_JVM系列之数据类型

    码神手记--资深攻城狮的私房笔记.微信公众平台/知乎/头条/简书同步发文,关注.转发.收藏. 数据类型.类加载机制.JVM内存模型,很多人在面试中都会遇到这一类的问题.大部分人都是死记硬背,背完就忘. ...

  7. OpenCV读取多幅图片,读取系列图片,读取文件夹中指定图像类型的系列图片

    读取系列图片通常是将文件夹中的所有文件名保存在txt中,再读取,如链接和链接所示.这是通常的操作方法. 之前写过一篇利用OpenCV读取系列图片的例子,参见链接,但是,实际应用中并不能改变文件名,本文 ...

  8. 关于GL中uniform类型sampler系列变量的值的设定

    Uniform类型中sampler系列变量值的设定. 一些反复琢磨后得出的结论,继续下来. 问题来源 在GL官网中学习,发现设置诸如下面的变量 在设置该值大小时,总是设置为零. shader.setI ...

  9. UE4-(光照)光照贴图

    光照贴图是引擎内部自动生成的一种纹理,可以应用到模型表面. 在世界场景设置中: 找到光照贴图分段,就可以看到光照贴图.由引擎生成的光照贴图纹理要比一般光照贴图稍微复杂点,引擎会为这张贴图创建两个不同的 ...

最新文章

  1. 【HDOJ】1196 Lowest Bit
  2. python中模块sys与os的一些常用方法
  3. oracle---函数(trunc,nvl,nvl2)
  4. springboot 整合mybats问题
  5. java并发编程实践(1)intro
  6. Win11未检测到Logitech Unifying接收器的解决方法
  7. 大数据分析平台具备怎样的功能
  8. 两堆草前饿死的驴——选择永远是件痛苦的事
  9. 高德地图经纬度检索校验
  10. MongoDB凭什么跻身数据库排行前五?
  11. 松翰单片机SN8P2711AD实现AD转换的C语言程序例子
  12. java表白小程序_c语言表白小程序代码创意
  13. Python微信远程控制摄像头-拍摄女朋友坐电脑前聊天时表情
  14. 【C语言零基础教学】——入门篇
  15. 全网最全的 Notion 类软件盘点
  16. 火爆全网,495页《看漫画学Python》全彩PDF免费分享,入门编程培养兴趣首选
  17. mt7688 ap-client 模式下连接上级路由
  18. 【学习笔记】严格反馈和纯反馈系统
  19. win10装系统时分区报错解决方法 无法找到新的分区也找不到现有分区
  20. 【FPGA】Quartus导出.qxp格式的网表文件

热门文章

  1. 2018千元内的UGP VR一体机开箱评测:ugp vr一体机怎么样真的好吗?
  2. 三星14纳米EUV DDR5 DRAM量产;Amazfit推出三款智能手表;Whale帷幄获5000万美元融资 | 全球TMT...
  3. 51单片机计算机实物焊接,51单片机实验DIY焊电源--串口详细步骤
  4. 运用gm/id法设计二级运放教程
  5. 微信发朋友圈的测试用例【详细测试用例】
  6. MathType如何编辑商标标志
  7. 101道算法javaScript描述【一】
  8. 阿里巴巴商家使用频率最多的数据接口分享
  9. STM8L051的硬件I2C调试
  10. spark-大表join优化方案