Ambient Occlusion 环境光遮蔽

Introduction 引言

Ambient Occlusion (AO) is a shading technique that was developed back in the time when global illumination was impractical. Instead of shooting many rays and bouncing them around (which is what is needed for global illumination), ambient occlusion was used to detect the parts of the scene that are occluded from the rest of the environment (such as corners and creases).

环境遮挡(Ambient Occlusion,AO)是一种明暗处理技术,早在全局光源不切实际的时候就发展起来了。环境遮挡被用来检测那些与周围环境隔绝的部分(比如角落和折痕) ,而不是用来拍摄多条射线并在周围反弹(这是全局光源所需要的)。

Today's computers are much more powerful than when Ambient Occlusion was first developed and the use of global illumination is now the norm. This reduces the usefulness of ambient occlusion as a primary lighting technique. However, Ambient Occlusion to achieve different effects such as:

今天的计算机比环境遮挡(Ambient Occlusion)刚开发出来的时候要强大得多,而且全局光源的使用现在已经成为常态。这降低了环境光遮挡作为主要照明技术的有用性。然而,环境遮挡可以达到不同的效果,例如:

  • Creating extra darkness/contrast in occluded areas for artistic reasons – when GI has failed to do so and has 'leaked' too much lighting in these areas (because of multiple bounces) 由于艺术原因,在封闭区域创造额外的黑暗/对比度——当 GI 未能做到这一点,并在这些区域“泄漏”了太多的照明(因为多重反弹)
  • Using it to implement techniques like 'dirtmaps' where shading is modified around occluded areas by blending different textures (such as moss) 使用它来实现类似于“ dirtmaps”的技术,通过混合不同的纹理(如苔藓) ,在遮挡区域周围修改阴影

Redshift allows the results of the Ambient Occlusion node to be connected and combined with other rendering techniques which provides the user with a very good degree of flexibility.

红移允许将环境遮挡节点的结果连接起来,并与其他渲染技术相结合,这为用户提供了非常好的灵活性。

If you need to create a full-scene Ambient Occlusion render pass please take a look into creating and using a Custom AOV pass.

如果你需要创建一个全场景环境遮挡渲染通道,请考虑创建和使用自定义 AOV 通道。

Parameters

参数

 

In the examples below the ambient occlusion's out color has been connected to an incandescent shader's color input in order to preview the result.

在下面的例子环境遮挡的颜色已经连接到白炽着色器的颜色输入,以预览结果。

Samples

样本

Ambient occlusion is a multi-sampled technique, which means that it uses several samples (rays) per pixel. Often times a fairly clean result can be obtain with relatively few samples. Of course, if the Ambient Occlusion node is used to drive other shading nodes that might be of very high contrast, more samples might be needed.

环境遮挡是一种多采样技术,即每个像素使用多个采样(射线)。通常情况下,只需要相对较少的样本就可以得到相当干净的结果。当然,如果 Ambient Occlusion 节点用于驱动其他可能具有非常高对比度的着色节点,则可能需要更多的样本。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Samples: 4

样本: 4

128

Bright / Dark Color

明/暗颜色

The result of the ambient occlusion node is a color. These two parameters define the darkest possible color (i.e. when the pixel is completely occluded) and the brightest possible color (when the pixel is totally unoccluded). By default the bright color is set to white and the dark color is set to black.

环境遮挡节点的结果是一种颜色。这两个参数定义了可能的最暗颜色(即当像素完全被遮挡时)和可能的最亮颜色(即当像素完全未遮挡时)。默认情况下,明亮的颜色设置为白色,深色设置为黑色。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Bright color: White

亮色: 白色

Dark color: Black

深色: 黑色

Red

红色

Blue

蓝色

Spread

传播

Ambient occlusion works by shooting a number of rays for each pixel. These rays are shot in a hemispherical fashion which produces a smoothly spread out result. The spread parameter makes the rays more concentrated around the pixel's normal which allows the AO effect to be 'tightened'. The lower this value is, the tighter the AO effect. Please note AO Max Distance has been set to 1 for the examples below.

环境遮挡通过为每个像素拍摄一定数量的光线来工作。这些射线以半球形的方式射出,产生一种平滑的展开效果。扩展参数使得光线更加集中在像素的正常范围,这使得 AO 效果被“收紧”。这个值越低,AO 效应越紧。请注意,下面的例子中 AO 最大距离被设置为1。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Spread: 0.0

传播范围: 0.0

Max Distance: 1.0

最大距离: 1.0

0.1

0.5

1.0

Falloff

女名女子名

This allows you to control the tightness of the transition between occluded and un-occluded areas, with values less than 1.0 biasing towards un-occluded and values greater than 1.0 toward occluded.

这使您可以控制紧密度之间的过渡闭塞和非闭塞地区,值小于1.0偏向非闭塞和大于1.0的值闭塞。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Falloff: 0.0

0.0

0.1

1.0

3.0

Maximum Distance

最大距离

This defines the maximum length of each one of the AO rays. The larger the length, the more areas will be considered 'occluded' and vice-versa.

这定义了每个 AO 射线的最大长度。长度越大,被认为“阻塞”的区域就越多,反之亦然。

A length of 0.0 will use the maximum scene ray distance.

一个0.0的长度将使用最大场景光线距离。

Please note that, in the following scene, the model is approximately 2 units tall.

请注意,在下面的场景中,模型大约有2个单位高。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Maximum Distance: 0.0

最大距离: 0.0

0.05

0.5

3.0

Reflective

反思

Normally, AO behaves as a 'diffuse' effect. However, there are some (rare) cases where a user might prefer for AO to behave more like a glossy reflection. This option enables that mode. This can be useful if you are combining AO with environment shaders (using the "Sampled Environment" output mode explained below) and you only want to show the environment in the reflections. The "Spread" parameter controls how glossy these fake reflections are.

通常情况下,AO 表现为一种“扩散”效应。但是,在某些(罕见的)情况下,用户可能希望 AO 的行为更像光滑的反射。此选项启用该模式。如果您将 AO 与环境着色器结合(使用下面解释的“ Sampled Environment”输出模式) ,并且您只想在反射中显示环境,那么这将非常有用。“分散”参数控制这些虚假反射的光泽度。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Reflective: Disabled

反思: 残疾人

Spread: 1.0

传播范围: 1.0

Enabled

启用

1.0

Enabled

启用

0.1

Invert Normal

反向正态

This option allows you to reverse the occlusion effect, whereby open corners will now receive the occlusion.

这个选项允许你扭转遮挡效果,即开放的角落现在将接收遮挡。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Invert Normal: Disabled

反相正常: 禁用

Max Distance: 1.0

最大距离: 1.0

Enabled

启用

Output Mode

输出模式

The Ambient Occlusion node can output data in several different methods:

Ambient Occlusion 节点可以用几种不同的方法输出数据:

  • Occlusion (Default) - The default output of the AO node where the occlusion is output as a color that is interpolated between the Bright/Dark colors. Every example pictured above uses the Occlusion output.  遮挡(默认值)-AO 节点的默认输出,其中遮挡作为一种颜色输出,在亮/暗颜色之间插值。上面的每个例子都使用了遮挡输出
  • Sampled Environment - This will return the results of the environment shader scaled by the occlusion. In other words, occluded pixels will return a dark version of the environment lighting while unoccluded pixels will return the environment lighting unmodified. This output mode can also be useful when you want to use AO for simple lighting effects. The result looks similar to global illumination (Brute-Force) but is typically faster than GI because it skips certain computations (such as multiple GI bounces, for example).

    取样环境-这将返回的结果,环境着色规模由遮挡。换句话说,被遮挡的像素将返回环境照明的黑暗版本,而未被遮挡的像素将返回未经修改的环境照明。这种输出模式也可以是有用的时候,你想使用 AO 为简单的照明效果。结果看起来类似于全局光源,但是通常比 GI 更快,因为它跳过了某些计算(例如多重 GI 跳跃)。

    The example shown below is not using any global illumination! It simply contains a dome light (an environment shader can also be used) and then uses "Sampled Environment" as the AO node's output mode.

    下面的例子没有使用任何全局光源!它只是包含一个圆顶灯(一个环境着色器也可以使用) ,然后使用“采样环境”作为 AO 节点的输出模式。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Output Mode: Sampled Environment

输出模式: 采样环境

Reflective: Disabled

反思: 残疾人

Spread: 0.8

传播范围: 0.8

Disabled

残疾人士

0.001

Enabled

启用

0.8

Enabled

启用

0.001

  • Return Bent Normals (World Space / Object Space) - This returns the average normal of the AO rays, biased towards where there is the least occlusion.

    返回弯曲法线(世界空间/物体空间)-这返回的平均正常的 AO 光线,偏向哪里有最少的遮挡。

    This is a legacy output option.

    这是一个遗留的输出选项。

Occlusion In Alpha

阿尔法闭塞

Normally, the alpha channel returned by the AO node contains the interpolated alphas of the Bright/Dark colors. If "Occlusion In Alpha" is enabled, the alpha channel is replaced by a value which ranges between 0.0 and 1.0, where 0.0 means "totally occluded" and 1.0 means "totally unoccluded".

通常,AO 节点返回的 alpha 通道包含插值的亮/暗颜色的阿尔法。如果启用“ Alpha 闭塞”,Alpha 通道将被一个范围在0.0和1.0之间的值所取代,其中0.0表示“完全闭塞”,1.0表示“完全闭塞”。

Consider Same Object Only

只考虑相同的对象

This options controls whether the occlusion result will take into consideration objects other than the objects with AO applied to it.

这个选项控制遮挡结果是否会考虑除了 AO 应用到的对象以外的其他对象。

By default this option is disabled, meaning all objects in the scene are considered for occlusion. When enabled, each object with AO applied to it will only consider itself for occlusion.

默认情况下,此选项是禁用的,这意味着场景中的所有对象都被视为遮挡。当启用时,每个对象只会考虑自己是否被遮挡。

In the example below the fire hydrant is made up of many different objects, for instance each link of the chain is a separate object. Note how the chain links no longer occlude on each other or the fire hydrant body, and the ground plane no longer occludes on the bottom of the fire hydrant.

在下面的例子中,消防栓是由许多不同的物体组成的,例如,链条的每个环节都是一个独立的物体。请注意链接不再相互遮挡或消防栓体,地面不再遮挡消防栓底部。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Consider Same Object Only: Disabled

只考虑相同的对象: 禁用

Enabled

启用

Bias Mode

偏置模式

This allows you to bias the occlusion in a custom direction, by default this is set to none.

这允许您在自定义方向上偏置遮挡,默认情况下设置为无。

  • None (Default) - No occlusion biasing, occlusion is calculated equally in all directions. 无(默认)-没有遮挡偏置,遮挡是在所有方向上计算相等
  • Object Space -  Occlusion calculation is biased in object space based towards a custom positive or negative X, Y, and Z coordinate. 物体空间遮挡的计算是偏向于物体空间的基础上自定义正或负的 x,y,和 z 坐标
  • World Space -  Occlusion calculation is biased in world space based towards a custom positive or negative X, Y, and Z coordinate. 世界空间遮挡计算在世界空间基于自定义的正或负的 x,y 和 z 坐标是有偏差的

Higher values will result in a more intense bias.

更高的数值会导致更强烈的偏见。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Bias Mode: World Space

偏置模式: 世界空间

Bias Coordinates (X,Y,Z): 0,0,0

偏差坐标(x,y,z) : 0,0,0

1,0,0

100,0,0

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Bias Mode: World Space

偏置模式: 世界空间

Bias Coordinates (X,Y,Z): 5,5,0

偏差坐标(x,y,z) : 5,5,0

Spread: 0.1

传播范围: 0.1

Object Space

物体空间

5,5,0

Object Space

物体空间

-5,5,0

- 5,5,0

Other Uses: Dirtmaps / Masks

其他用途: 灰度地图/蒙版

Here we'll show a simple example of how to use the AO node to achieve a "Dirtmap" type effect. The technique uses the result of a Y axis biased AO shader as a mask to blend between two different things. In this example there are two Redshift Material shaders, a clean hydrant shader and a dirty shader variant. To achieve this, we use the output of the AO node to drive a Material Blender's layer blend color. You can take this technique even further like using a Redshift Color Layer to blend this AO result with other shaders like a RS Curvature for more complex procedural masking. By making use of the AO biasing the dirty hydrant shader is only revealed in occluded areas on the underside of the object as seen below.

在这里,我们将展示一个简单的示例,说明如何使用 AO 节点实现“ Dirtmap”类型的效果。这项技术使用 y 轴偏置 AO 着色器的结果作为掩模,在两个不同的东西之间混合。在这个例子中有两个红移材质着色器,一个干净的消防栓着色器和一个肮脏着色器变种。为了实现这一点,我们使用 AO 节点的输出来驱动一个材料混合器的层混合颜色。你可以进一步使用这个技巧,比如使用红移色层,将这个 AO 结果与其他着色器混合,比如 RS 曲率,以实现更复杂的程序掩码。通过使用 AO 偏置脏的消防栓着色器只显示在遮挡区域的对象下面看到。

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

C4D周练作业-Ambient Occlusion 环境光遮蔽—RS节点编辑器内容—Redshift红移中文帮助文档手册-苦七君

Base Color: Clean Hydrant

底色: 清洁消防栓

Layer 1 Color: Dirty Hydrant

第一层颜色: 肮脏的消防栓

AO Blended Result 混合效果

 

Pictured below is the shader graph used for this example.

下图是本例中使用的着色器图形。

 

0

赶快留个言打破零评论!~

返回顶部

显示

忘记密码?

显示

显示

获取验证码

Close