Light Object 轻物体Basic 基础Coord.General 常规Details 详情Visibility 能见度Shadow 阴影Photometric 光度计的Caustics 焦散Noise 噪音Lens 镜头Project 工程项目

Shadow

阴影

Shadow

阴影

You can combine different light source types with different shadow types. For example, an area light can cast not only area shadows, but hard shadows as well.

您可以组合不同的光源类型与不同的阴影类型。例如,区域光线不仅可以投射区域阴影,还可以投射硬阴影。

Use the parameters on this page to fine-tune the scene’s shadow maps.

使用这个页面上的参数来微调场景的阴影地图。

You will now find an additional menu for defining shadow type. This menu corresponds to the menu of the same name located in the General tab, and has the same functionality.

现在您将找到一个定义阴影类型的附加菜单。此菜单对应于“常规”选项卡中同名的菜单,并具有相同的功能。

Shadow Maps (Soft)

影子地图(软件)

In reality all objects — whether they are trees growing in the wild, or a vase in a room — are lit by several partial light sources. The result of this is a gradual transition of light to shadow. This soft edge, or umbra, can be simulated in Cinema 4D by using a shadow map. A shadow map is a grayscale picture of the scene as viewed from the light source. Contained in this are all the objects lit by the light source. During the render calculation the renderer will determine exactly which objects will fall into this shadow of the light source.

事实上,所有的物体ーー无论是生长在野外的树木,还是房间里的花瓶ーー都由几个部分光源照明。这样的结果就是光线逐渐过渡到阴影。这个柔软的边缘,或者说本影,可以在 Cinema 4D 中通过使用阴影贴图来模拟。阴影贴图是从光源观察到的场景的灰度图片。其中包含了所有被光源照亮的物体。在渲染计算过程中,渲染器将确定哪些物体将落入光源的阴影中。

The major advantage of this method is the high computing speed and the soft shadow’s natural appearance.

该方法的主要优点是计算速度快,阴影自然形成。

However, the one downside to soft shadows is the memory needed. Depending on the size of the shadow map, a great deal of additional memory may be needed. So be careful in your allocation of shadow maps or you may find your scenes wasting precious memory.

然而,软阴影的一个缺点是需要内存。根据阴影贴图的大小,可能需要大量额外的内存。所以在分配影子地图时要小心,否则你可能会发现你的场景正在浪费宝贵的内存。

Raytraced (Hard)

Traditionally in raytracers, genuinely raytraced scenes contained hard shadows. As this technique needed to compute many more additional rays, this method increases the render time dramatically. Hard shadows, because of their abrupt, sharp appearance, are of particular interest for technical illustrations. However, in other more natural pictures they look rather unrealistic because such hard, sharp shadow borders are rarely found in real world environments.

在传统的光线追踪器中,真正的光线追踪场景包含硬阴影。由于这种技术需要计算更多的附加光线,这种方法显著地增加了渲染时间。硬阴影,因为他们的突然,锐利的外观,是特别有趣的技术插图。然而,在其他更为自然的图片中,它们看起来相当不现实,因为这种硬而锐利的阴影边界在现实世界中很少见。

Area

面积

Although Soft shadows are more natural than Hard shadows, they are still not perfectly natural. On careful examination you can see that the soft edge always has the same width. In nature this does not happen; the closer an object is to a surface on which it casts its shadows, the sharper this edge will be. Area shadows simulate this effect.

尽管软阴影比硬阴影更自然,但它们仍然不是完全自然的。仔细检查,你可以看到,软边总是有相同的宽度。在自然界中这是不会发生的,物体越靠近投射阴影的表面,这个边缘就会越锐利。区域阴影模拟了这种效果。

Cinema 4D calculates the shadow at the origin of the light source outwards (for all lights, whether Omni, Spot or Area). Only a hard shadow is computed at this point. The softer Area shadow is the result of a virtual Area light source that simulates the overlay of several light sources. This provides the natural scattering of light. However, as usual, this method comes with a price: it adds to the render time. Carefully assigned Area shadows, however, can produce very realistic shadows.

Cinema 4D 计算出光源原点的阴影向外(对于所有的灯,无论是 Omni,Spot 还是 Area)。此时只计算硬阴影。较软的区域阴影是虚拟区域光源的结果,模拟了多个光源的叠加。这提供了光的自然散射。然而,和往常一样,这种方法也有代价: 它增加了渲染时间。然而,精心分配的区域阴影可以产生非常真实的阴影。

Density[0..10000%]

密度[0.10000% ]

Adjusting this value will vary the intensity of your shadow. A value of 100% means the shadow has full intensity. With 50% your shadow will be half transparent and at 0% the shadow is invisible. Values in excess of 100% can also be entered.

调整这个值会改变你的阴影的强度。值为100% 意味着阴影具有完全的强度。50% 的阴影是半透明的,0% 的阴影是看不见的。超过100% 的值也可以输入。

Color

颜色

Here you can change the shadow’s color. Since shadows in nature are rarely jet black, this setting is more useful than it first appears. Or you might want to set the shadow to include some of the complementary color of the subject, to emphasize the contrast between light and shade.

在这里你可以改变阴影的颜色。因为自然界中的阴影很少是乌黑的,所以这个设置比最初看起来更有用。或者你也可以设置阴影来包含主体的一些互补色,以强调明暗之间的对比。

Transparency

透明度

If shadow maps should take the transparency and alpha channels into account, enable this option.

如果阴影映射应该考虑透明度和 alpha 通道,启用此选项。

Transparency enabled. 启用透明度 Transparency disabled. 禁用透明度
The calculation of transparent soft shadows is memory-intensive. An Omni light source can sometimes use six times as much memory as a spotlight, because six shadow map calculations must be computed compared to the spotlight’s single shadow map. 透明软阴影的计算是内存密集型的。Omni 光源有时需要使用聚光灯6倍的内存,因为与聚光灯的单个阴影图相比,必须计算6个阴影图

Clipping Influence

剪裁的影响

If this option is enabled, the clipping settings on the Details tab are applied to shadow-casting as well as to illumination.

如果启用此选项,Details 选项卡上的剪辑设置将应用于阴影投射和照明。

Soft Shadows

柔和的阴影

Shadow Map

阴影地图

The Shadow Map settings are available only when soft shadow is selected. When using soft shadows, Cinema 4D initially sees the scene from the point of view of the light source and calculates the complete scene from this view. All objects seen in this view are interpreted as shadows for the scene. This results in Shadow Maps. Shadow Map assigns memory for each shadow map. The smaller the memory assignment, the more pixelated the shadow will appear. This can result in a shadow with a jagged, staircase-like appearance at its edges. The more memory used for the shadow map, the smoother the shadow and its edges, but the higher the memory usage.

阴影贴图设置只有在选择软阴影时才可用。当使用柔和的阴影时,Cinema 4D 最初是从光源的角度看场景,然后从这个角度计算出完整的场景。在这个视图中看到的所有物体都被解释为场景的阴影。这就产生了阴影地图。阴影映射为每个阴影映射分配内存。内存分配越小,阴影就会出现越多像素。这可能导致一个锯齿状的阴影,楼梯似的外观在其边缘。阴影映射使用的内存越多,阴影及其边缘越平滑,但内存使用量越高。

By default, a standard size of 250x250 is used. Shadow map size can be increased substantially if needed. In order to keep your shadow sharp and smoothly defined, your shadow map will need to increase in size. If you simply need to keep your shadow edge soft, you can increase the Sample Radius. Again, this will increase render time.

默认情况下,标准大小为250x250。阴影贴图的大小可以大幅增加,如果需要的话。为了保持你的阴影锐利和平滑的定义,你的阴影贴图将需要增加大小。如果你只是需要保持你的阴影边缘柔软,你可以增加样本半径。同样,这将增加渲染时间。

Rather than use a map with a doubled Shadow Map size, you can achieve an equivalent soft edge by doubling the Sample Radius. 与使用双倍阴影贴图大小的贴图不同,您可以通过将样本半径加倍来获得等效的软边缘

Sometimes when you have a small shadow map created by a very distant light source, spherical objects may cast rectangular shadows! You can remedy this by viewing the scene through your light source. A light source, like any other scene object, can be defined as a camera view. To do this, ensure the light source is selected and from the viewport, choose Cameras / Link Active Object.

有时当你有一个很远的光源创建的小阴影贴图,球形物体可能投下矩形的阴影!你可以通过你的光源来观察这个场景来补救这个问题。光源,像其他场景物体一样,可以被定义为相机视图。要做到这一点,确保光源是选择和从视区,选择相机/链接活动对象。

250x250 map size. 250x250地图尺寸 750x750 map size. 750x750地图尺寸

Resolution X[40..10000]

决议 x [40. . 10000]

If the preset value of the map size does not give the desired result, adjust the Resolution X manually. In general, set Resolution X (width) to the same value as Resolution Y (height).

如果地图大小的预设值不能给出所需的结果,请手动调整分辨率 x。一般来说,将分辨率 x (宽度)设置为与分辨率 y (高度)相同的值。

Resolution Y[40..10000]

决议 y [40. . 10000]

With a spotlight, you can provide a non-square shadow map by entering a value for Resolution Y.

使用聚光灯,您可以通过输入分辨率 y 的值来提供一个非正方形的阴影地图。

Memory Usage:

内存使用:

Cinema 4D automatically calculates the maximum memory use for the shadow map, which is shown here. This helps you to estimate how much memory will be needed for the shadow maps.

Cinema 4D 自动计算阴影贴图的最大内存使用量,如下所示。这可以帮助您估计阴影映射需要多少内存。

Sample Radius[1..20]

样本半径[1. . 20]

Determines the shadow map accuracy. The higher the value, the more accurate the shadow is, at the expense of a longer render time. If you must use a small shadow map, selecting a higher value will improve the shadow quality. So you can trade off render time against memory usage.

确定阴影贴图的精度。值越高,阴影就越精确,这就要牺牲更长的渲染时间。如果你必须使用一个小的阴影贴图,选择一个更高的值将改善阴影质量。因此,您可以权衡渲染时间和内存使用情况。

Sampling Radius Boost

采样半径升压

With animated lights it can happen that a cast shadow flickers and doesn’t move correctly. This is due to the fixed resolution of the shadow maps. The resolution has to be reduced to ensure that the shadows move correctly. Of course this will result in correspondingly sharper edges as the resolution increases, which in turn has to be compensated for with a larger Sample Radius value. This will also increase render times.

使用动画灯光,可能会发生投射阴影闪烁和不正确移动。这是由于阴影图的分辨率是固定的。分辨率必须降低,以确保阴影正确移动。当然,这将导致相应的尖锐的边缘作为分辨率增加,这反过来必须补偿一个更大的样本半径值。这也会增加渲染时间。

The Boost Sample Radius selection menu has been added to prevent the Sample Radius value from having to be set too high. This enables a function that increases the Sample Radius and randomly disperses the samples. This replaces the stepping effect with noise, which is less noticable in animations.

升压采样半径选择菜单已被添加,以防止采样半径值被设置得太高。这使得一个函数可以增加样本半径并随机分散样本。这就用噪音代替了步进效果,噪音在动画中不那么引人注目。

Absolute Bias

绝对偏见

In general, leave this option enabled. If you disable the option, the distance of the shadow from the object depends also on the distance of the light source from the object — called relative bias. With relative bias, the further the light source is from the object, the further the shadow will be from the object. This behavior originated in Cinema 4D R5 and is present for compatibility reasons when loading old scenes.

通常,保持此选项为启用状态。如果禁用这个选项,阴影到物体的距离也取决于光源到物体的距离,称为相对偏差。在相对偏差的情况下,光源离物体越远,阴影离物体越远。这种行为起源于 Cinema 4D R5,在加载旧场景时出于兼容性原因而出现。

Bias (Rel)

偏差(Rel)

Bias (Abs)[0..+∞m]

斜线(Abs)[0. . + ∞ m ]

Occasionally, you may need to adjust the shadow’s position using the Bias value. A value of 1 m will suffice for most scenes. However, sometimes an adjustment may be necessary.

偶尔,你可能需要调整阴影的位置使用的偏见值。对于大多数场景,1 m 的值就足够了。然而,有时可能需要进行调整。

When zooming the camera on extremely small objects, the distance between object and shadow will become apparent (see Figure 1). Correct the error by lowering the value (Figure 2). You may also at times have too small a Bias value — especially with very large objects — which can result in the object casting the shadow onto itself (Figure 3). In such cases, increase the Bias value.

当相机对极小的物体放大时,物体和阴影之间的距离将变得明显(见图1)。通过降低值来纠正错误(图2)。有时候,你可能会有一个偏差值太小ーー特别是对于非常大的物体ーー这会导致物体将阴影投射到自身上(图3)。在这种情况下,增加偏差值。

Figure 1. 图1 Figure 2. 图2 Figure 3. 图3 The smaller an object is and the more you zoom in with the camera, the smaller the Bias value must be set. This ensures no gap between object and shadow is visible. If the object is excessively large and unwanted self-shadowing occurs, increase the Bias value. Generally speaking, a value of 物体越小,你用相机放大得越多,设置的 Bias 值就越小。这样可以确保对象和阴影之间没有可见的间隙。如果对象过大并且不希望发生自遮蔽,则增加 Bias 值。一般来说,一个值1 m 1米 is usually adequate for objects up to a size of 通常适用于大小不超过10,000 m 10000米 wide.

Parallel Width[-∞..+∞m]

平行宽度[-∞ . . + ∞ m ]

This setting will only be active for Distant and/or Parallel lights. This is a visible light concept known as a light cube. The light cube has its length and width dimensions set to the Parallel Width value, the depth (Z axis) of the light cube being infinite. Objects within the cube can cast shadows.

这个设置只对遥远和/或平行光有效。这是一个可见光的概念,称为光立方体。光立方体的长度和宽度尺寸设置为平行宽度值,光立方体的深度(z 轴)为无穷大。立方体中的对象可以投射阴影。

This value cannot dynamically adapt to your scene, as it is possible for other objects to jump into the shadow-casting area during an animation. Therefore, a fixed value is used, which is entered here.

这个值不能动态地适应你的场景,因为在动画过程中,其他对象可能会跳到阴影投射区域。因此,使用了一个固定值,该值在此处输入。

You can change the size of the shadow map. The lower this value, the more pixelated the shadow becomes. If the parallel light cube boundary had a dynamic value, these pixels would appear to jump, since the shadow map would otherwise vary dynamically in its size. In order to prevent this, a fixed value is used and any such shadow jumps are eliminated. 您可以更改阴影贴图的大小。这个值越低,阴影就越像素化。如果平行的光立方体边界有一个动态值,这些像素就会跳跃,因为阴影映射会在其大小上动态变化。为了防止这种情况,使用了一个固定的值,并消除了任何此类阴影跳转

Outline Shadow

轮廓阴影

This option results in a thin shadow outline instead of a full shadow.

这个选项会产生一个细小的阴影轮廓,而不是一个完整的阴影。

When enabling this option, we recommend you use higher than usual values for the shadow map’s resolution and sample radius. 启用此选项时,我们建议您使用比通常更高的阴影贴图分辨率和采样半径值

High Quality

高品质

For Omni lights, 6 shadow maps will be created internally. Visible edges can occur where individual shadow maps transition if higher Sample Radius values are used. Enabling this option will improve the quality of these transitions (but the render time will also increase).

对于泛光灯,将在内部创建6个阴影地图。如果使用较高的采样半径值,单个阴影映射转换的地方可以出现可见边。启用此选项将提高这些转换的质量(但渲染时间也将增加)。

High Quality 高品质 option disabled on left, enabled on right. 选项在左边禁用,在右边启用

Shadow Cone
Angle[0..170°]

阴影圆角[0. . 170 ° ]

One of the drawbacks of Omni light sources is that six shadow maps must be computed in total, which can sometimes produce small artifacts at the edges of shadows. If Shadow Cone is enabled, the shadow production is limited to a cone, thus generating a single shadow map that is free from artifacts. This also has the advantage of speeding up render times. Set the vertex angle of the shadow cone using Angle.

全光源的缺点之一是必须计算六个阴影地图,这有时会在阴影的边缘产生小的伪影。如果启用了阴影锥,阴影产生被限制在一个圆锥体上,从而产生一个单一的阴影贴图,而不需要人工制品。这也有加快渲染时间的优点。使用角度设置影锥的顶点角度。

Soft Cone

软锥体

Enable this option to give the shadow cone a softer edge. This ensures that any object only partially in the shadow cone area casts a soft, fading shadow.

启用此选项可以给阴影圆锥体一个更柔和的边缘。这样可以确保阴影锥区域内的任何物体只有一部分投射出柔和的渐消阴影。

Area Shadows

区域阴影

Area shadows should preferably be used only when you have a little more time on your hands …

区域阴影应该最好只使用当您有一点更多的时间在您的手..。

The Area shadow’s shape can be controlled very precisely since the light source used to generate the Area shadow can be defined using the settings in the Details tab.

区域阴影的形状可以非常精确地控制,因为用于产生区域阴影的光源可以通过使用 Details 选项卡中的设置来定义。

Hence, the Area shadow can be controlled two ways:

因此,区域阴影可以通过两种方式来控制:

Accuracy[0..100%]
Minimum Samples[2..10000]
Maximum Samples[2..10000]

精确度[0. . 100% ]最小样本[2. . 10000]最大样本[2. . 10000]

Area Shadow Quality

区域阴影质量

The three settings Accuracy, Minimum Samples and Maximum Samples can now be used to control the quality of your Area shadow.

三个设置的精度,最小样本和最大样本现在可以用来控制你的区域阴影的质量。

The basic algorithm is pretty complex so we will not discuss it here. What you should know, though: Samples are required to render Area shadows. The more samples, the more homogeneous (less grainy) the rendering will be, and the longer it will take to render. Fewer samples, on the other hand, mean shorter render times.

基本算法非常复杂,所以我们不在这里讨论它。但是你应该知道: 渲染区域阴影需要样本。样本越多,渲染的均匀性越好(颗粒越少) ,渲染所需的时间也越长。另一方面,更少的样本意味着更短的渲染时间。

Of course you could render a scene with the maximum number of samples possible but this would not make any sense because parts of the scene would only require a minimum amount of samples and the scene would simply take much too long to render.

当然,你可以使用尽可能多的样本来渲染一个场景,但是这样做没有任何意义,因为场景的某些部分只需要最少量的样本,而渲染这个场景需要的时间太长了。

This is why Minimum Samples and Maximum Samples are available. This gives you the ability to set many or few samples, as needed (as well as an interpolation between them).

这就是为什么最小样本和最大样本是可用的。这使您能够根据需要设置很多或很少的示例(以及它们之间的插值)。

The Accuracy setting determines how (and how many) samples will be allotted in order to achieve the best result. In the most critical areas, Maximum Samples may be set to its highest value.

精度设置决定如何(以及有多少)分配样本,以获得最佳结果。在最关键的区域,最大样本可能被设置为其最高值。

The Accuracy setting has the most influence in critical areas since high values lead to more samples being used. In less critical areas, the Minimum Samples value is applied.

精度设置有最大的影响,在关键领域,因为高值导致更多的样本被使用。在不太关键的区域,应用最小采样值。

Follow these steps to achieve the optimal settings for your scene:

按照下面的步骤为你的场景实现最佳的设置:

  1. Find out where the critical areas in your scene are (grainy areas). 找出场景中的关键区域(颗粒状区域)
  2. Set 预备Minimum Samples 最少样本 and Maximum Samples 最大样本数 to the same value and render the scene using 使用相同的值渲染场景Render Region 渲染区域
  3. Raise the 提高Minimum Samples 最少样本 and Maximum Samples 最大样本数 equally until you achieve a good result. 直到你得到一个好的结果
  4. Lower 低一点Minimum Samples 最少样本 to 25% of the Maximum Samples 最大样本数 value and set 值和集合Accuracy 准确性 to 50%.
  5. Finally, raise the 最后,提高Accuracy 准确性 setting until you have a result you are happy with. 直到你得到满意的结果

Also, make a note of these rules of thumb:

同时,记下这些经验法则:

Examples:

例子:

In the previous image, Accuracy has been set to 100% in the top half. As you can see, the quality is still not good (very grainy). Maximum Samples is set too low. Much better results can be achieved by raising the Maximum Samples value and lowering Accuracy.

在上一张图片中,上半部分的准确度被设置为100% 。正如你所看到的,质量仍然不好(颗粒感很强)。最大采样值设置得太低。通过提高最大采样值和降低精度,可以得到更好的结果。

In the image below you can see variations of the two most important settings, Accuracy and Maximum Samples, including approximate render times. Use these render times as points of reference only. Depending on the lighting effect(s) you use, the result can differ. The reference below is good for assessing render times when the Maximum Samples value is doubled, for example.

在下面的图片中,你可以看到两个最重要的设置的变化,精度和最大样本,包括大约的渲染时间。使用这些渲染时间只作为参考点。根据你使用的光照效果,结果可能不同。例如,当最大样本值翻倍时,下面的参考对于评估渲染时间很有用。

At top: Various 顶部: 各种Accuracy 准确性 values; at bottom: various 价值观; 底部: 各种各样的Maximum Samples 最大样本数 values; top left: the shape that casts the shadow, lit by an Area light. 左上角: 投射阴影的形状,被一个区域光照亮 Anti-aliasing 抗锯齿 can also reduce graininess (type: 还可以减少颗粒度(类型:Best 最好的). This will also affect render times, so you might want to first find out to what degree it is necessary, if at all. Remember, you can determine on a (Render) tag-to-tag basis which objects should be affected by ).这也会影响渲染时间,所以您可能需要首先找出它的必要程度,如果有的话。请记住,您可以根据(Render)标记到标记的基础确定哪些对象应该受到影响Best 最好的 anti-aliasing. 抗混叠

Limitations

局限性

Area shadows don’t work with PyroCluster clouds; these are rendered with hard shadows.

区域阴影不适用于 PyroCluster 云,这些是用硬阴影渲染的。