Math(数式)ノード#

Math(数式)ノード。

Math(数式)ノード は、数学的演算を実行します。

入力#

The inputs of the node are dynamic. Some inputs are only available for certain operations. For instance, the Addend input is only available for the Multiply Add operator.

Value(値)

入力値。三角関数は、この値をラジアンとして読み取ります。

Addend

Addendの入力。

Base(ベース)

Base(ベース)の入力。

Exponent(指数)

Exponent(指数)の入力。

Epsilon(イプシロン)

Epsilon(イプシロン)の入力。

Distance(距離)

Distance(距離)の入力。

Min(最小)

Minimum(最小)の入力。

Max(最大)

Maximum(最大)の入力。

Increment(増分)

Increment(増分)の入力。

Scale(スケール)

Scale(スケール)の入力。

Degrees(度)

Degrees(度)の入力。

Radians(ラジアン)

Radians(ラジアン)の入力。

Properties(プロパティ)#

Operation(処理)

入力値に適用される数学演算子:

Functions(関数)
Add(追加):

2つの値の合計。

Subtract(減算):

2つの値の差。

Multiply(乗算):

2つの値の積。

Divide(除算):

最初の値を2番目の値で除算。

Multiply Add(積和算):

Addend による、2つの値の積の合計。

Power(パワー):

Base(底)Exponent(指数) 乗となる。

Logarithm(Log):

Base(底) をベースとする値のlog。

Square Root(平方根):

値の平方根。

Inverse Square Root(逆平方根):

値の平方根で割った値。

Absolute(絶対):

入力値が、符号に関係なく読み取られ、負の値が正の値に変わります。

Exponent(指数):

オイラー数 を値の乗数に。

Comparison(比較)
Minimum(最小):

入力値の最小値を出力。

Maximum(最大):

2つの入力値の最大値を出力。

Less Than(小さい):

最初の値が2番目の値より小さい場合、1.0を出力。それ以外の場合、出力は0.0。

Greater Than(大きい):

最初の値が2番目の値より大きい場合、1.0を出力。それ以外の場合、出力は0.0。

Sign(符号):

入力値の符号の抽出。 正の数は1.0を出力します。負の数は-1.0を出力します。0.0は0.0を出力します。

Compare(比較):

2つの入力値の差が Epsilon(イプシロン) 以下の場合、1.0を出力します。

Smooth Minimum:

Smooth Minimum

Smooth Maximum:

Smooth Maximum

Rounding(丸め)
Round(丸め):

入力値を最も近い整数に丸める。

Floor(床):

入力値を最も近い整数に切り捨て。

Ceil(天井):

入力値を最も近い整数に切り上げ。

Truncate(切り捨て):

の整数部分を出力。

Fraction(小数部):

Returns the fractional part of the value.

Truncated Modulo:

最初の値を2番目の値で除算した、余りを出力。

Floored Modulo:

Returns the positive remainder of a division operation.

Wrap(ラップ):

入力値と、その値より小さい Max(最大) の整数倍に最も近い値との絶対差に基づき、Min(最小)Max(最大) 間の値を出力します。

Snap(スナップ):

入力値を Increment(増分) の最も近い整数倍に切り捨てます。

Ping-pong(ピンポン):

Bounces back and forth between 0.0 and the Scale as the input value increases.

Trigonometric(三角関数)
Sine(サイン):

入力値の Sine

Cosine(コサイン):

入力値の Cosine

Tangent(タンジェント):

入力値の Tangent

Arcsine(アークサイン):

入力値の Arcsine

Arccosine(アークコサイン):

入力値の Arccosine

Arctangent(アークタンジェント):

入力値の Arctangent

Arctan2(アークタンジェント2):

ラジアンで測定した2番目の値で割った最初の値の Inverse Tangent の出力。

Hyperbolic Sine(双曲線サイン):

入力値の Hyperbolic Sine

Hyperbolic Cosine(双曲線コサイン):

入力値の Hyperbolic Cosine

Hyperbolic Tangent(双曲線タンジェント):

入力値の Hyperbolic Tangent

Conversion(変換)
To Radians(ラジアンへ):

入力を度からラジアンに変換。

To Degrees(度へ):

入力をラジアンから度に変換。

Clamp(範囲制限)

出力を(0.0〜1.0)の範囲に制限。 Clamp(範囲制限) を参照してください。

出力#

Value(値)

数値出力。

#

手動での Z-マスク#

../../../../_images/compositing_types_converter_math_manual-z-mask.png

Minimum(最小) と Maximum(最大) 関数の例。#

The top Render Layers node has a cube that is about 10 units from the camera. The bottom Render Layers node has a plane that covers the left half of the view and is 7 units from the camera. Both are fed through their respective Map Value nodes to multiply the depth value by 0.05 and clamp it to [0.0, 1.0], bringing it into a suitable range for displaying it as a color.

The Minimum node selects the smallest of the two depth values at each pixel. In the left half, it chooses the plane (because it's closer than the cube), and in the right half, it chooses the cube (because it's closer than the background, which is infinitely far away).

The Maximum node selects the largest of the two depth values at each pixel. In the left half, it chooses the cube (because it's farther away than the plane), and in the right half, it chooses the background (because it's farther away than the cube).

脈動のためのサイン関数の使用#

../../../../_images/compositing_types_converter_math_sine.png

サイン関数を使用した例。#

この例には、101フレームの間に0から1までの線形シーケンスを出力する Time(時間) ノードがあります。フレーム25では、出力値は0.25です。その値は 2 × pi(6.28) で乗算され、サイン関数によって1.0に変換されます。 \(sin(2 × pi/ 4) = sin(pi/ 2) = +1.0\)

Since the sine function can output values between (-1.0 to 1.0), the Map Value node scales that to 0.0 to 1.0 by taking the input (-1 to 1), adding 1 (making 0 to 2), and multiplying the result by 0.5 (thus scaling the output between 0 to 1). The default Color Ramp converts those values to a gray-scale. Thus, medium gray corresponds to a 0.0 output by the sine, black to -1.0, and white to 1.0. As you can see, \(sin(pi/ 2) = 1.0\). Like having your own visual color calculator! Animating this node setup provides a smooth cyclic sequence through the range of grays.

この機能を使用して、例えば、画像のアルファチャンネルを変更して、フェードイン/フェードアウト効果を生成します。Zチャンネルを変更して、シーンの焦点を合わせたり外したりします。カラーチャンネル値を変更して、カラーを "パルス" にします。

チャンネルを明るくする(スケールする)#

../../../../_images/compositing_types_converter_math_multiply.png

チャンネルをスケールする例。#

This example has a Math (Multiply) node increasing the luminance channel (Y) of the image to make it brighter. Note that you should use a Map Value node with min() and max() enabled to clamp the output to valid values. With this approach, you could use a logarithmic function to make a high dynamic range image. For this particular example, there is also a Brightness/Contrast node that might give simpler control over brightness.

色の選択を制限(ポスタリゼーション)#

../../../../_images/compositing_types_converter_math_posterization.png

ポスタリゼーションの例。#

この例では、色の値を 0、0.2、0.4、0.6、0.8、1の6つの値のいずれかに制限します。

0 から 1 までの値の連続範囲を特定の値セットに分割するには、次の関数を使用します。\(round(x × n - 0.5) / (n - 1)\) ここで、 "n" は可能な出力値の個数、 "x" は入力ピクセルの色です。 この関数の詳細をご覧ください

この関数をBlenderに実装するには、上記のノード設定を検討してください。Math(数式) ノードを、各色(0から​​1の値)を取り、それを希望する分割数 6 を掛け(値は0から6になります)、0.5でオフセットし(-0.5から5.5)、値を最も近い整数に丸め(0、1、2、3、4、5を生成)、次に画像のピクセルカラーを5で除算します(0.0、0.2、0.4、0.6、0.8、1.0)。

In the case of a color image, you need to split it into separate RGB channels using Separate/Combine Color nodes and perform this operation on each channel independently.