1
$\begingroup$

(I have modified my initial question after finding out more about the normal maps.)

I am playing around with some ripped models and I am trying to figure out how to use the normal maps that come with them. They only have the Red and Green color channels and it seems the Blue channel needs to be generated. Is this something Blender can do easily? Can I use a material node setup to create the Blue channel at run time?

An red/green normal map


Edit:

I have found two plausible ways to fix the normal maps. The first is suggested by Christopher below and is to invert the normal map and to invert the green channel afterwards to get the correct direction.

The second is from Substance in an article about Normals in Unity engine. It seems that the blue channel can be dropped because the normals are always of length 1, so the Blue channel can be recovered by:

B = sqrt( 1 - R*R - G*G)

which I have implemented using nodes below.

I am leaning towards the Substance approach, however, when I check the RGB values in Python, it seems that parts of the mouth have Normal vectors with length greater than 1, so this would be invalid for the approach suggested by the substance article.

Does anyone have any further suggestions about the correct approach?

enter image description here

$\endgroup$
2
  • $\begingroup$ maybe if you plug that image in both Red and Blue sockets of CombineRGB node and something else in blue socket (maybe the standard normal map color), it could work. It will work only if that map really was used as normal map because color of the map doesn't mean anything $\endgroup$
    – Mr Zak
    Mar 13, 2021 at 17:40
  • $\begingroup$ It seems like the normal map is a BC5 type normal map. I found something on it here: docs.substance3d.com/integrations/… $\endgroup$
    – user668074
    Mar 14, 2021 at 5:19

1 Answer 1

1
$\begingroup$

Try inverting the image before connecting to the Normal Map Node to get back the purple (tangent space) colors (and map) you're used to seeing (color not shown).

Invert

However, looking more closely, I'm assuming the eyelids and nostrils are supposed to be protruding from the "outwards" face (hard to tell using the low res sample). If this is how you need it to be, you may also need to do a DirectX to OpenGL conversion:

Invert2

$\endgroup$
3
  • $\begingroup$ I found this article on compressed normal maps from Substance. It seems that the blue channel is removed and can be recovered later. docs.substance3d.com/integrations/… $\endgroup$
    – user668074
    Mar 14, 2021 at 5:20
  • $\begingroup$ I have tried both your method and the method suggested in the Substance article. Your method gives better results. Is this a common way for Normal maps to be saved for games? $\endgroup$
    – user668074
    Mar 14, 2021 at 6:09
  • $\begingroup$ To be honest, I'm not sure. At first I thought it was an Object Space or World Space Normal map (based on the color), but connecting it using either of those didn't give very nice results. So, I just started trying some of the conversions I know, and this one seems to give correct results for a Tangent Space Normal map, providing the desired surface deformation directions and accurate "shadow" angles. $\endgroup$ Mar 14, 2021 at 7:10

You must log in to answer this question.

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