Unity3D说明文档翻译-Lighting Overview

Lighting Overview

灯光综述

In order to calculate the shading of a 3D object, Unity needs to know the intensity, direction and color of the light that falls on it.

为了计算3D对象的明暗,Unity需要知道落到它上的光的强度,方向和颜色.

These properties are provided by Light objects in the scene. The base color and intensity are set identically for all lights but the direction depends on which type of light you are using. Also, the light may diminish with distance from the source. The four types of lights available in Unity are described below.

这些属性由场景内的灯光对象提供.基本颜色和强度在所有灯光上都是相同的,但方向取决于你使用的灯光类型.另外,光会随着来源的距离而减弱.下面描述了Unity的四种灯光类型.

Point Lights

点光源

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.

一个点光源位于空间内的一个点上且向所有方向均等的发送光.光命中一个表面的距离是从接触点到光对象中心的直线.光的强度随距离降低,达到指定范围为0.

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 a angle, resulting in a cone-shaped region of illumination. The center of the cone points in the forward (Z) direction of the light object.

和点光源一样,投射光有一个指定位置和光照衰落范围.然而,投射光被限制到一个角度,造成一个锥形光照区域.圆锥顶点的中心在光对象的向前(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 Light does not have any identifiable source position and so the light object can generally 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. When checking an object in the scene view (to see how its mesh, shader and material look, for example) a directional light is often the quickest way to get an impression of how its shading will appear. For such a test, you are generally not interested in where the light is coming from but simply want to see the object look “solid” and look for glitches in the model.

方向光表现为大而遥远的光源,来自游戏世界之外.在一个现实的场景内,它们被用于模拟太阳或月亮.在一个抽象的游戏世界,它们可作为一条给对象添加色差的方法无需指定光从哪里来.当检测一个场景视图内对象时(例如,要看它的网格,着色器和材质如何),一个方向光常常是获取它色差显示印象的最快捷方法.对于这样的测试,你通常对光来自哪里不感兴趣,而仅仅想看对象看起来像固体并在模型中寻找小故障.

Effect of a Directional Light in the scene

方向光在场景内的效果

Area Lights

区域光

An Area Light is defined by a rectangle in space. Light is emitted in all directions, but only from one side of the rectangle. The light falls off over a specified range. 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.

因为一个区域光一次从几个不同方向照明一个对象,所以阴影比其他灯光类型更柔和和精细.你可以用它来创建一个街道灯光或玩家附近的一堆灯光.一小块区域光可模拟较小的光源(诸如室内照明)但比点光源效果更真实.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值