Gradient


The Gradient texture node produces a gradient blend between color values. It can accept a texture input to determine how the gradient is mapped to the surface, provided the projection for the texture input is defined. The Gradient node is not equivalent to the Cinema 4D gradient; for that, the Sinewave Node is a better choice. In the Octane Gradient node, any two color values will mix with each other if you do not use the input channel group (available in Complex mode, discussed below), as in the mix shader or cosine mix. The Octane Gradient node is used more often for color and value remapping. For more traditional Cinema 4D uses of the gradient, just use the Cinema 4D Gradient node.
渐变纹理节点在颜色值之间产生渐变混合。它可以接受一个纹理输入,以确定如何梯度映射到表面,提供了纹理输入的投影是定义的。渐变节点不等同于 Cinema 4 d 渐变,因此 Sinewave 节点是一个更好的选择。在辛烷梯度节点中,如果不使用输入通道组(在复合模式下可用,下面讨论) ,任何两个颜色值都会相互混合,就像混合着色器或余弦混合。辛烷梯度节点更经常用于颜色和值重新映射。对于更传统的 Cinema 4 d 渐变使用,只需使用 Cinema 4 d 渐变节点。

To better understand how this node works, refer to the following examples.
为了更好地理解这个节点是如何工作的,请参考以下示例。

Octane gradient 【OC渐变】 - 图1

HOW TO USE (SIMPLE MODE) 如何使用(简单模式)

Gradient texture works in two modes, Simple and Complex.
渐变纹理有两种工作模式,简单和复杂。

COLOR ANY GENERATOR USING A GRADIENT

使用渐变颜色任何生成器
A “value” is each color you assign to the gradient. This value can be any color or image texture. In simple mode you can define a maximum of 2 values, and any color or image texture will be mixed according to the data you define in the input node.
“值”是您分配给渐变的每个颜色。此值可以是任何颜色或图像纹理。在简单模式下,您可以定义最多两个值,任何颜色或图像纹理将根据您在输入节点中定义的数据混合。

Octane gradient 【OC渐变】 - 图2

As you can see in the node setup below, the grayscale checker is used as texture input and the colors are changed by entering two separate values (i.e., color) in the gradient.
正如您在下面的节点设置中看到的,灰度检查器用作纹理输入,颜色通过在渐变中输入两个单独的值(即颜色)来更改。
Octane gradient 【OC渐变】 - 图3

RE-COLOR ANY IMAGE TEXTURE USING A GRADIENT

基于梯度的任意图像纹理重彩
If you want to change the colors of the image texture you uploaded, you can also use a Gradient. The following setup shows this process.
如果你想改变你上传的图片纹理的颜色,你也可以使用渐变。下面的设置显示了这个过程。

Octane gradient 【OC渐变】 - 图4

HOW TO GET A CLASSIC GRADIENT LOOK

如何获得经典的渐变效果
The default behavior of the Octane gradient does not create the expected “blend” between the two different color values. To get this blend, attach a Falloffmap node to the input of the Octane Gradient node. You can also use native Cinema 4D’s “Gradient“ for the classic gradient look.
辛烷值梯度的默认行为不会在两个不同的颜色值之间创建预期的“混合”。要得到这种混合,附加一个 Falloffmap 节点到辛烷梯度节点的输入。你也可以使用本地电影院4d 的“梯度”为经典的渐变外观。

Octane gradient 【OC渐变】 - 图5

GRADIENT AS A MASK FUNCTION FOR DIRT/OTHER GENERATORS

用于 DIRT/OTHER 生成器的掩模函数——梯度
You can also use the Gradient Node as a mask. The default values, black and white (or float values which is 0 and 1), can use as a masking function. In the following setup the “Dirt Texture” is assigned to the Dragon Object and then using the gradient to make this dirt appear only in the crevices.
你也可以使用渐变节点作为遮罩。默认值黑白(或浮点值为0和1)可以用作屏蔽函数。在下面的设置中,“污垢纹理”被分配给龙的对象,然后使用梯度,使这些污垢出现在裂缝中。

Octane gradient 【OC渐变】 - 图6

HOW TO USE (COMPLEX MODE)

如何使用(复杂模式)
The Gradient texture really shows its power in complex mode. Instead of the two-value limit in Simple Mode, you can use many values (inputs) in Complex mode. It’s possible to use any image or procedural texture for each of the values. To switch to complex mode, select “Mode / Complex” from the gradient option; this will reveal the gradient Inputs group. Now, every color you enter from the color section is a “value”. In this case you can add “knots” to gradient colors according to the complexity of the material. The image below shows an example setup. Only one “value” is used except the “Start and End” values to get the texture in the image. Also, one image texture is used as a input texture and mix factor. Download the scene from this link
渐变纹理在复杂模式下显示了它的威力。与简单模式中的两值限制不同,您可以在复杂模式中使用多个值(输入)。可以为每个值使用任何图像或过程纹理。要切换到复杂模式,从梯度选项中选择“ Mode/Complex”; 这将显示梯度输入组。现在,您从颜色部分输入的每个颜色都是一个“值”。在这种情况下,您可以添加“结”到梯度颜色根据材料的复杂性。下面的图片展示了一个设置示例。除了“开始和结束”值以外,只使用一个“值”来获得图像中的纹理。此外,一个图像纹理用作输入纹理和混合因子。从这个链接下载场景

Octane gradient 【OC渐变】 - 图7

GRADIENT SETTINGS 渐变设置

MODE 模式

Select the gradient mode from this drop down menu. There are two modes: Simple and Complex, both of which are explained above.
从这个下拉菜单中选择渐变模式。有两种模式: 简单模式和复杂模式,这两种模式在上面都有解释。

LINEAR AND RADIAL OPTIONS 线性和径向选项

You can select the gradient style from here.
你可以从这里选择渐变样式。

INTERPOLATION INTERPOLATION

Select from Constant, Linear or Cubic to determine the rate at which colors blend from one gradient knot to the next. Note that each color knot can have a separate interpolation value, so this setting will override those settings.
从恒量,线性或立方选择确定颜色混合的速率从一个梯度结到下一个。请注意,每个彩色结可以有一个单独的插值值,所以这个设置将覆盖这些设置。

TEXTURE (INPUT)

纹理(输入)
Input to determine the way the color is mapped to the surface. The importance of this option is explained in the examples above. For an accurate mix, you can define RGB / Alpha / grayscale procedural or image texture here.
输入以确定颜色映射到表面的方式。这个选择的重要性已在上面的例子中说明。为了获得准确的混合效果,可以在这里定义 RGB/Alpha/灰度过程或图像纹理。

SMOOTHING 平滑

This toggle smooths the mix if enabled.
如果启用此切换,将使混合更加平滑。

GRADIENT FIELD 梯度场

From here you can add “value” or knots to create the gradient.
从这里你可以添加“价值”或节点来创建梯度。