Hi, I’ve started trying to use normal maps for the first time since my models looked plain without them.
The code to load it is pretty simple, I hope I am doing the tangent generation bit right?
player = new Node(); Spatial p = game.getAssetManager().loadModel("Models/Actors/Players/newfemale.mesh.xml"); TangentBinormalGenerator.generate(p); p.setLocalScale(0.135f); Material mat = game.getAssetManager().loadMaterial("Materials/Actors/Players/newfemale.j3m"); mat.setColor("Diffuse", new ColorRGBA(1,1,1,1)); p.setMaterial(mat);
Without a normal map my model looked like this:
When I add normal maps, a problem occurs:
Most of it I really like, but the face is totally messed up. I do not understand were that line comes from going down the forehead, throat, and back of the head.
Here is the UV Map:
And here it is again with the UV overlapped:
The face is on the right hand side (its all plain, no detail).
I figured the problem was the normal map bleeding since the forehead is quite close to another part
To test this I scaled down this part of the UV giving it plenty of space
(the model only has 1 UV map so it is the same on the normal map)
This did not work though, the problem still exists
I have read about how JME uses normal maps, so I have tried inverting the green channel of the UV image but nothing changed. I did not make these normals in Blender so am not 100% sure they are correct for JME, but the majority of the model seems to be working, just not the face.
I have also tried using an entirely plain normal map.
Which works over the entire model but again not the face
The part were the problem occurs is were a mirror modifier was used, but the same is true of the entire model and the problem does not extend down the torso.
I know its hard to see, but I have also checked the normals on the faces and made sure there are no duplicate vertices - it is properly joined and the normal look correct.
I’m not sure what it could be, or even how to find out?