Manual/PartVI/Ambient Occlusion

Wikipedia,自由的百科全书

User Manual: Contents | Guidelines | Blender Version 2.31

Ambient Occlusion

环境光吸收

Ambient Occlusion Panel.
Ambient Occlusion Panel.

Ambient Occlusion is a sophisticated ambient trick which simulates soft global illumination by taking into account the amount of sky (which is assumed to be the lightsource) seen by a given point.

环境光吸收是计算天空的数量利用软件模拟出一个诡异的全局照明效果(假设光源).

This is actually done by casting rays from each visible point, and by counting how many of them actually reach the sky, and how many, on the other hand, are obstructed by objects. The amount of light on the point is then proportional to the number of rays which have 'escaped' and have reached the sky.

这是由没一个可见光源组成,有多少环境光,有多少其他光源,都会被物体阻隔.

This is done by firing a hemisphere of shadow-rays around. If a ray hits another face (it is occluded) then that ray is considered 'shadow', otherwise it is considered 'light'. The ratio between 'shadow' and 'light' rays defines how bright a given pixel is.

这是通过点亮一个围绕着影子射线(shadow - rays)的半球实现的. 如果一个射线照射到另一个面(闭合的面)之后,那个射线被认为是'影子', 否则它被认为是'光'. 在'影子'和'光'射线之间的比率定义了如何照亮一个指定的象素.

Ambient Occlusion (AO) settings are in the Shading Context, World Buttons Sub-context, in the Amb Occ Tab. AO is Off by default, if it is turned On, the Tab is populated by many buttons (Ambient Occlusion Panel.).

环境光吸收(简称AO)设置在Shading Context, World Buttons Sub-context,下的Amb Occ标签里. AO默认是关闭的,如果打开它,标签会弹出很多按钮(环境光吸收面板.).

Rays are shot at the hemisphere according to a random pattern, this causes sensible differences in the occlusion pattern of neighbouring pixels unless the number of shot rays is big enough to produce good statistical data. This is why AO produces a granular pattern, which looks like dirt, if there are not enough rays. The number of shot rays is controlled via the Samples NumButton. The default value of 5 is usually good for previews. The actual amount of shot rays is the square of this number. (i.e. Samples=5 means 25 rays). Effect of the different number of samples. shows a simple scene, with increasing number of samples. Of course rendering time increases as the number of samples increases!

射线被根据一个随机的式样(pattern)照在半球上,这会引起在临近像素的吸收式样(pattern)上产生可以感觉到的差别, 除非照射线的数量足够大,以至于可以产生很好的统计数据. 这就是为什么在没有足够的射线的条件下, AO会产生一个看上去脏脏的颗粒状的式样的原因. 照射线的数量通过Samples NumButton控制. 默认值5通常很适合做预览. 照射线实际的数量是这个数值的平方值. (例如:Samples=5 意味着有25条射线). 图片:不同采样率的渲染效果 显示了一个简单的场景,在采样率增加的情况下的渲染效果. 当然采样率越高, 渲染时间越长.


Effect of the different number of samples.不同采样率的渲染效果
Effect of the different number of samples.不同采样率的渲染效果

The Dist and Use Distances Buttons allow for subtle control over shadowing by defining a distance dependent behaviour and damping in the occlusion. The row of radio buttons Add, Sub and Both controls the occlusion behaviour:

  • Add - The pixel receives light according to the number of non-obstructed rays. The scene is lighter.
  • Sub - The pixel receives shadow (negative light) according to the number of obstructed rays. The scene is darker.
  • Both - Both effects take place, the scene has more or less the same brightness.
Note:

If Sub is chosen then there must be some light source somewhere, otherwise the scene would be pitch black. In the other two cases the scene is lit even if no explicit light is present.

注意

如果 Sub 被关闭了,那么在某处必须有个光源, 否则场景将会是一片黑色. 另外一种情况是,场景将被照亮,即使目前并没有外在的光源.


The row of radio buttons Plain, Sky Color and Sky Texture controls the light color:

  • Plain - The pixel receives pure white light according to the number of non-obstructed rays.
  • Sky Color - The pixel receives colored light, the color is computed on the basis of the portion of the sky hit by the non-obstructed rays (Ambient Occlusion with Sky Color. Zenith is blue, Horizon is orange, and type is Blend so that sky goes full orange at Nadir.).
  • Sky Texture - A Sky Image texture must be present, possibly an AngMap or a SphereMap. It behaves as Sky Color but the ray color depends on the color of the Sky texture pixel hit.
Ambient Occlusion with Sky Color. Zenith is blue, Horizon is orange, and type is Blend so that sky goes full orange at Nadir.
Ambient Occlusion with Sky Color. Zenith is blue, Horizon is orange, and type is Blend so that sky goes full orange at Nadir.

The Energy slider controls the actual amount of light/shadows the AO procedure creates. Since AO occurs on the original faceted mesh, it is possible that the AO light makes faces visible even on objects with 'smooth' On. This is due to the way AO rays are shot, and can be controlled with the Bias Slider. The bias setting allows you to control how smooth 'smooth' faces will appear in AO rendering. The bias denotes the angle (in radians) the hemisphere will be made narrower. Values of 0.05 to 0.1 typically work well (Ambient Occlusion bias values.).

Ambient Occlusion bias values.
Ambient Occlusion bias values.

Please note that this is just raytracing, so it tends to be slow. Furthermore, performance severely depends on Octree size, see the Rendering Chapter for more information.

Previous: Manual/PartVI/World Background Contents Next: Manual/PartVI/Exposure
Personal tools