3
$\begingroup$

How does multiply shade node work? I've found similar question, but in that case it's a "difference" parameter. What about multiply then? I've tried to look for it in Blender documentation, but didn't found any of formulas or good description.

$\endgroup$
2
  • $\begingroup$ multiply is described here docs.blender.org/manual/en/latest/modeling/geometry_nodes/… or are you looking for something else? $\endgroup$
    – lemon
    Jan 11 at 19:05
  • $\begingroup$ @lemon I mean, there is a formula for color difference - Color = |Color1 - Color2| * Fac + Color1 * (1-Fac). But how it will look for multiply color node? Should I just replace minus with multiply, or it will look different? $\endgroup$ Jan 11 at 19:07

1 Answer 1

6
$\begingroup$

Multiply simply multiplies red of one image by red of the other image, green of one image by green of other image and blue of one image by blue of the other image.

Since color components are in range $[0, 1]$, multiplication always reduces the value.

Factor lerps between the A and the result of the above multiplication. These lerping is what Mix mode does.

Therefore Multiply with a Factor $= x$ is the same as Multiply with a Factor $= 1$ passed to Mix with a Factor $= x$:

The purpose of Distance → Compare is to show both upper Multiply, and lower Multiply + Mix are equivalent (same color result).

Math Formula

The Multiply with Factor $ = 1$ is simply $A × B$.

The Mix (lerping) is $(1-f)A + fB$, or as Marty Fouts puts it (link below), it's $A$ plus the difference between $A$ and $B$ multiplied by Factor: $A+f(B−A)$.

Therefore Multiply with Factor is: $$(1-f)A + fAB$$ or $$A + f(AB - A)$$.

More reading:

What does the MixRGB or Mix Shader node factor do exactly?

$\endgroup$
3
  • $\begingroup$ So, the formula for multiply color "Color = |Color1 * Color2| * Fac + Color1 * (1-Fac)" is not correct? I just can't figure out the math part of it. $\endgroup$ Jan 11 at 19:41
  • $\begingroup$ @Сергей see edit. $\endgroup$ Jan 11 at 20:14
  • $\begingroup$ Just what I needed. Thank you! $\endgroup$ Jan 11 at 20:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .