Hello, I am having a problem with one of my models for a game I am working on. I have centralized the problem to the way the normal map is rendered. I have included below pictures illustrating my current problem
This image demonstrates when the normal map is applied. The mesh doesn’t appear to have any problems, but once the normal map is applied, the normals on the face start to act weird. Any ideas as to resolve this. The normal map is in the tangent space format.
Yes, I made sure that with my exporter it generate tangents and when that didnt work, when I converted it to a j3o using the advanced option, I made sure generate tangents was checked.
I recently tested the flip texture method, but that has failed as i still get the same results. I know for sure the mesh is clean as the faces that are effected by the applying of the normal map in the engine, does not show up in my OgreViewer. Any other possible suggestions? I double checked the Uvs, and there are no problems. I checked with three of my 3d tools(Maya, 3ds Max, and Blender), and none report any normals problems. But like I said, the mesh is fine.
Try disabling backface culling, if that does it the mesh is indeed having some triangles with normals pointing inside. Blender has a function to make all normals point outside I think.
@normen said:
Try disabling backface culling, if that does it the mesh is indeed having some triangles with normals pointing inside. Blender has a function to make all normals point outside I think.
Back face culling has nothing to do with normals. Back face culling has 100% to do with vertex order.
If this was a front face or back face culling problem then it would show up 100% of the time. He might have normals facing the wrong direction.. but then the first picture would be messed up because I'm pretty sure that it is lit.
Bad tangents would have been my guess, too... since in the worst case that can flip the normal map vectors in weird directions. The uniformity of the issue is kind of weird though. Since vertexes are probably shared on the smooth parts, I would have expect a smoother transition.
So I'm feeling like this isn't one of the conventional problems. And if those vertexes _aren't_ shared, then it still sounds like a tangent problem.
Normen is right it’s normals pointing backward, even if backface culling wouldn’t make them show up.
To fix this i had to flip the normals of the problematic faces in blender. Recomputing them globally does not work, i don’t really know why.
Go in glsl mode in blender you’ll notice the ones that are inverted better. Select each face and flip the normals. then export the model again and it should work
@nehon said:
I already had this on a model.
Normen is right it's normals pointing backward, even if backface culling wouldn't make them show up.
To fix this i had to flip the normals of the problematic faces in blender. Recomputing them globally does not work, i don't really know why.
Go in glsl mode in blender you'll notice the ones that are inverted better. Select each face and flip the normals. then export the model again and it should work
If the normals are facing backwards then I wonder why the first picture (which seems clearly lit to me) doesn't have black polygons...
I tried exporting the mesh without tangents, and so far the results look fine, none of the normals issue. But if I do try to export with tangents generated,…I get the face-culling issue.
I tried exporting the mesh without tangents, and so far the results look fine, none of the normals issue. But if I do try to export with tangents generated,..I get the face-culling issue.
So it sounds like your tool is messing up the tangents somehow... if that's the "export" you mean.
But... without tangents at all, the normal map is basically not doing anything. It might look like it is doing something on some platforms, do nothing at all on others, or grossly smear the texture as one giant color on others.
Maybe JME's tangent generation does better? If not then that implies something strange is going on with the mesh, too.