Sketchfab Forum

My normalmap is different in viewer

(Narisoto) #1

First of all I want to say hello, because it’s my first post here.
So, my problem is that normalmap on my model is completely different in viewer than in “editing mode”. It doesn’t looks like just flipped green channel - I’ve checked it in photoshop. Any idea what’s going on?

Editing mode:


Oh, and just to be clear - I want this normalmap on hair to be greeny-yellow, not blue like on the second screenshot.


Are you using world space normal maps? We expect tangent space normal maps, so it’s probably causing issues when we process and optimize the textures.

(Narisoto) #3

I’ve tried to use world space normal map, but it was working only on one side of my hair material. Second half has flipped normals and I couldn’t fix it easily. Then I’ve found this tutorial about painting flow maps in photoshop:
And effect still wasn’t perfect, but this method gives me the best result so far. Sadly it’s working only in editing mode :confused: Is there a better way to make anisotropic materials in sketchfab?


Did you use a mirror modifier or similar on the hair that would leave one side with a non-uniform scale? (e.g. a negative x value [-1, 1, 1]). If so, can you try to freeze or apply the transformation?

(Narisoto) #5

Yes, but I have applied all modifiers before exporting my model. And I’ve even tried creating second UV map from non-mirrored model to make sure that I’m not using mirrored normal map.
Anyway as I said - my hair material is working not so bad with this greeny-yellow normal map, so I want to keep it look the same in viewer as well.

(Stephomi) #6

We normalize the normalmap, by making sure each vector has a unit length.
We also force the blue component to be positive (which basically means >127 for 8bit), this is the reason why the yellowish texture turns blueish.

It seems every pixels on your nmap has blue<0.5 which basically means your normalmap points below the surface, which is something we don’t want to allow (that’s also the reason why 99% of tangential nmap are blueish).

In other words, your nmap is basically reverting the normals on your hair.
If that’s really what you want, you could flip the vertex normal and then use a standard nmap with positive blue component.


(Narisoto) #7

Ok, looks like I’ve found a solution. As you said, blue channel was inverted in viewer, so I’ve inverted this channel myself in Photoshop before importing to Sketchfab. After that “flip green (-Y)” option in normal map settings solved the problem. It doesn’t look exactly the same as before, but it’s acceptable.
Anyway, thank you for help.