Topic: Mirrored UV Models!

Hi,
   I am having trouble to properly display a model with mirrored UV. When using a normal map, the mirrored side of the model looks inverted. And it shows strange shadows on the joints of the UV maps? How do I fix it.

   Regards.

Last edited by Arclord (2012-03-04 02:28:01)

Re: Mirrored UV Models!

Hi,

how is the uv mirrored ?
can you show us a screen-shot ?

Re: Mirrored UV Models!

Hi,
   I mean the model is an organic and the UV map of the mirrored part of the model is overlapped. That's why the normal map on that part look inverted.
   http://i980.photobucket.com/albums/ae285/isoprog/Mermaid.jpg
   Left side is rendered in BGE and roght is Maratis. Never mind the lines on some part of the model cos texturing is not complete yet. The problem is only inverted normal.

   Regards.

Last edited by Arclord (2012-03-04 17:50:11)

Re: Mirrored UV Models!

is the normal map also mirrored ?
I'm not sure you can mirror a normal map as each component correspond to a 3d vector.

Also, Maratis only support tangent-space normal map by default, is it the way it is done ?

Re: Mirrored UV Models!

Yes, the half part of the model's UV is mirrored and also the maps. Yes, it is tangent space normal map. Is it possible to solve this by shader?

Regards.

Re: Mirrored UV Models!

I'm not sure it's ok to flip a normal map, but the direction is computed using the uv coords, so I'm not sure.
In case it is not that, did you try to flip the normals of the bugged area in blender or to do a "recalculate outside" ?

Re: Mirrored UV Models!

If I flip the normals it will be culled. There are no options in the blender UV editor to flip the UV's without repositioning the UV and redraw the texture. I tested the model in Unity and it is showing everything correctly like BGE. But there are some persons who are having same inverted problem in Unity too and others suggested to use shader. That's why I asked you.

Regards.

Re: Mirrored UV Models!

Hi,

there is maybe something wrong in the code that generate tangent vectors,
(it's done by Maratis after the mesh loading)

You can tweek or generate the tangent vectors in the shaders by modifying the standard shader that you can find here http://www.maratis3d.org/?p=548

Just in case again, did you checked the normal map button in the map ?
http://www.maratis3d.com/wp-content/uploads/2011/01/08.jpg

Can you send me by mail the mesh or a part of the mesh with the textures so I can test ?

Re: Mirrored UV Models!

Yes, I checked it.

I will make a test model and send you to test in Maratis.

Regards.

Re: Mirrored UV Models!

ok, so I found that something is missing in the engine to accept mirrored normal maps,
it is basically the handedness of the binormal, it requires to do some modification of the mesh data by adding a 4th component to the tangents (the handedness) and update the shaders to use it.

Re: Mirrored UV Models!

Can you elaborate a little please? I don't get it! I think you should write a short tutorial on how to export a model with mirrored uv. It will benefit everyone.

Regards.

Re: Mirrored UV Models!

No sorry, I guess I was not clear, it's an engine problem.
I checked the code that deal with tangent space and normal map in Maratis, and I found that it doesn't support mirrored normal maps. I need to modify some code in the engine and in the default shaders. One information (called handedness) is missing in the current version of the engine to be sure that the binormal vector is correct, and it cannot be added like that, the mesh code need to be modified.

I will try to do that soon, but right now normal map cannot be mirrored, it's just not supported by the engine.

Re: Mirrored UV Models!

That mean next release will solve that issue. Ok, that's a good news.  Thanks. Will be waiting for it smile.

Regards.