Weird Occurence with Normal map

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

http://25.media.tumblr.com/tumblr_mdgpy2LQlN1rysyd9o1_500.png

This image displays the model without the normal map applied

http://24.media.tumblr.com/tumblr_mdgpy2LQlN1rysyd9o2_1280.png

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.



Thanks in advance for your help.

Did you generate tangents for your model?

2 Likes

yeah, no tangents or skeleton vertex assign problem.

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.

danquedynasty



then show face normals in blender(3d tool that you use), maybe you have this faces culled. but then it should not depend on normal map…

but you can try,



you can always set culling off in SceneComposer, but it’s bad idea. better to fix normals in 3d tool.



edit:



also remember that sometimes you need to FLIP TEXTURE.(normalmap texture in this case) → and this could be issue here too.

this can be done via code or SDK Material editor(easiest way) or 2d graphic tool or SDK image editor tool.

oxplay2



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.

Could it be uv mapping giving them black polygons?



Try putting a coloured background behind the model so you can see the difference between polys not being rendered at all or rendered black.

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

@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...
@pspeed said:
If the normals are facing backwards then I wonder why the first picture (which seems clearly lit to me) doesn't have black polygons...

mhhh true...
@danquedynasty could you post your normal map?

@nehon



Here is the normal map I am currently using: http://img824.imageshack.us/img824/6504/bylandernormal.png

update



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.

@danquedynasty said:
*update*

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.

@danquedynasty



is this Blender?



if you could send me files, maybe i could fix it and report you how i done it.

1 Like