0
$\begingroup$

So after finding out how tangent space and normal map values roughly work, I have a question:

The normal map node has a strength input. I know that increasing the strength will make the normal map have a "stronger" influence but how does that input work mathematically?

$\endgroup$
1
  • 1
    $\begingroup$ Did you see the link I posted yesterday? Code. It lerps between the original and new normal. $\endgroup$
    – scurest
    May 15, 2022 at 17:56

1 Answer 1

4
$\begingroup$

It's

  if (Strength != 1.0)
    Normal = normalize(NormalIn + (Normal - NormalIn) * max(Strength, 0.0));

In other words, draw a line from the tip of the original normal to the tip of the new one. Strength controls how far you move along this line. Strength=0 means you stay at the original normal. Strength=1 means you go to the new normal. Strength=0.5 means you go halfway etc.

Strength

The result is normalized afterwards.

$\endgroup$
3
  • $\begingroup$ So does the strength input of the normal map do exactly the same as the one in the bump node? $\endgroup$ May 17, 2022 at 16:59
  • $\begingroup$ Wouldn't Normalin just be the same as the vector 0,0,1 as everything is done in tangent space? $\endgroup$ May 17, 2022 at 17:23
  • 1
    $\begingroup$ This is actually done after transforming to world space (it's done the same way for all modes of the Normal Map node so we are not necessarily using tangent space), although most of the time I wouldn't expect it to make much difference which space you use. It's the same for the bump node (although in that case it does it before transforming to world space). $\endgroup$
    – scurest
    May 18, 2022 at 23:45

You must log in to answer this question.

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