Normal map showing inwards

Hi everybody!

I’m trying to import an object from Blender with a normal map. The normal map was generated in Blender and looks perfect in it, but when I assign the map in Unity it is showing inwards, so the bumps are pointing inside the mesh.
I had the same problem in another engine and to solve it I had to flip X or Y UV coordinates in the mesh editor of the engine. This had something to do with the right/left hand system.
How can I do this in Unity? I tried every configuration in the Import Inspector but nothing worked. Can anybody help me?

Thanx in advance!

If you don’t find another solution, I guess as last resort you could invert the red and/or green channel of the normal map texture?

Rune

Thanx a lot, runevision! That did the trick :smile:

Now I noticed visible seams, where I marked UV seams before unwrapping. They are visible in Blender as well, but not in xNormal :? Are there some workarounds for this problem?

I don’t know where to find the settings in either Blender of xNormal, but is sounds like you need to set the border bleed/padding higher when you are pulling the normal map. Make sure you have at least a 2 pixel padding on your UV borders.

Seams on tangentspace Normals will most likely always be visible at least slightly.
To lessen that make sure to give your texture enough pixel border (like melmonkey already mentioned). Deactivating the mipMapping might also help. But I’d strongly recommend leaving MipMapping on as you’l lose a lot of performance. And that’s not worth it.

Your best approach is simply using as little seams as possible and hiding them well on your model. :slight_smile:

Also yust FYI: Blender so far does not have an option to invert the R/B channles. You’l unfortunately have to do this by hand, ATM. Maybe it’ll come with Blender 2.5.

Hey thanx for your replies!
I always set the border padding at min 4 pixels, tried to increase it but with no success. Mipmapping is always deactivated.
I noticed that exporting from Blender to .OBJ and then to Unity produces no seams. I would use this workaround BUT I can’t export my animations to .OBJ…
It seems that the only solution for this problem is, as motionblur said, to hide the seams :?

Check the bottom of this page for some noodling you can do to automate this.

http://wiki.blender.org/index.php/Doc:Manual/Render/Bake

Thanx Jessy!
Tried it out, works like a charm. Now I don’t have to load my normals into Gimp.
Great link :smile: