Home Technical Talk

normal map issues in maya

polycounter lvl 10
Offline / Send Message
Onnimra polycounter lvl 10
Hi everybody, I'm trying to bake the normals in Maya and I'm struggling to get a good result...
I began with just a portion of the model and this is what the map looks like:
surfacenormdoor.jpg

in maya viewport I get these errors:
the lines are not straight
screen1bk.jpg

weird cavity that should not be there
screen2ob.jpg

weird reflections
screen3sm.jpg

trying the model with the normal map in marmoset is clearly visible a weird "light behavior" right in the middle of the mesh
errmarm.jpg

All the edges of the mesh are soft except for the ones in the borders which are hard. I tried different backing settings, checked the model, but the cleanest result is the one I'm showing... What am I missing?

Thanks in advance :)

Replies

  • fatihG_
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    There are a bunch of things happening here. First off, is this maya 2013?
  • Ryan Clark
    Options
    Offline / Send Message
    Ryan Clark polycounter lvl 18
    You're using a Tangent Space normal map.

    This type of map is very versatile. It's easy to edit, and you can apply the same map to a variety of different geometric shapes, so it's perfect for floors, walls, terrain meshes, etc.

    Alas, tangent space maps are prone to this sort of trouble, because different programs and plugins might compute slightly different approximations of "Tangent Space." Think of that as a description of how a texture "fits" on a model. It's not quite an exact science, so one program may assume a slightly different "fit" than another, which results in an ill-fitting normal map.

    In your case, it looks like you may not need to use a tangent space map. If you can generate and use "object space" or "world space" normal maps instead, you can spare yourself this headache. The weakness of those types is that they're tied to one specific model, they can't use mirroring, and they're not easily editable. (and as passerby points out, they might not be supported in whatever engine you're using.)

    If you DO want to use tangent space normals, it's still possible to avoid these issues. It's just kind of a headache... the main thing is to make sure your normal map generator and renderer/engine are using the same tangent basis vectors (normals, tangents, and bitangents/binormals.). Read through the threads bb0x linked above.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    @Ryan Clark but if he is makeing the assets with the intention of using them in a game engine, you really do need tangent space
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    Triangulate BEFORE you bake and export that exact triangulated model to your engine of choice. When you get "x" shaped shading errors, that usually means the program you baked in auto-triangulated the quads differently then the engine in which you displayed it. Making the normals throw up on each other.

    Those issues in your second image that you have circled are happening because you have too harsh of angles on your uv map and this is causing issues. You either need to add more geo(in the form of chamfers) or split the uv chunk into more islands at the offending edges.

    The issues in your first circled image are resolution based errors as far as I can tell. The above should fix that.

    The skewed details are skewed in the normal map, so they will be skewed in the low poly with normal map. Your uv's are probably the culprit and are might not be relaxed fully.

    What does the high look like?
  • Onnimra
    Options
    Offline / Send Message
    Onnimra polycounter lvl 10
    Thanks everybody for the answers! At the moment I didn't find a solution, yet... I hope to solve this not later than tomorrow...
    bb0x wrote: »

    Thanks man :)
    AlecMoody wrote: »
    There are a bunch of things happening here. First off, is this maya 2013?

    Maya 2012
    Ryan Clark wrote: »
    You're using a Tangent Space normal map.

    This type of map is very versatile. It's easy to edit, and you can apply the same map to a variety of different geometric shapes, so it's perfect for floors, walls, terrain meshes, etc.

    Alas, tangent space maps are prone to this sort of trouble, because different programs and plugins might compute slightly different approximations of "Tangent Space." Think of that as a description of how a texture "fits" on a model. It's not quite an exact science, so one program may assume a slightly different "fit" than another, which results in an ill-fitting normal map.

    In your case, it looks like you may not need to use a tangent space map. If you can generate and use "object space" or "world space" normal maps instead, you can spare yourself this headache. The weakness of those types is that they're tied to one specific model, they can't use mirroring, and they're not easily editable. (and as passerby points out, they might not be supported in whatever engine you're using.)

    If you DO want to use tangent space normals, it's still possible to avoid these issues. It's just kind of a headache... the main thing is to make sure your normal map generator and renderer/engine are using the same tangent basis vectors (normals, tangents, and bitangents/binormals.). Read through the threads bb0x linked above.
    I do need tangent space normals and you're right, it is a headache... I'm reading the threads (those and others) and trying various solutions but I'm still stuck...
    Quack! wrote: »
    Triangulate BEFORE you bake and export that exact triangulated model to your engine of choice. When you get "x" shaped shading errors, that usually means the program you baked in auto-triangulated the quads differently then the engine in which you displayed it. Making the normals throw up on each other.

    Those issues in your second image that you have circled are happening because you have too harsh of angles on your uv map and this is causing issues. You either need to add more geo(in the form of chamfers) or split the uv chunk into more islands at the offending edges.

    The issues in your first circled image are resolution based errors as far as I can tell. The above should fix that.

    The skewed details are skewed in the normal map, so they will be skewed in the low poly with normal map. Your uv's are probably the culprit and are might not be relaxed fully.

    What does the high look like?

    Thanks man, this solved the "x shading" error. :)
    If I cut the UV into more islands would be a mess to create the diffuse? I still have to try the chamfer solution though... And the "curved" lines are still there even adding geometry.
    I create a topic the other day with some images of the model. There is the UV layout too. http://www.polycount.com/forum/showthread.php?t=116086
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    Kimahiri wrote: »
    If I cut the UV into more islands would be a mess to create the diffuse? I still have to try the chamfer solution though... And the "curved" lines are still there even adding geometry.
    I create a topic the other day with some images of the model. There is the UV layout too. http://www.polycount.com/forum/showthread.php?t=116086

    Yes it will make textureing the diffuse harder, but will fix your issues. It is all a balance of having fewer seams versus having proper bakes.

    Thanks for showing me your high, I tossed a critique up over there.
  • fatihG_
    Options
    Offline / Send Message
    fatihG_ polycounter lvl 14
    Also a quicky. Since quads are build of 2 triangles, this could mean some distortion could happen, no matter how good you bakes/cages/normals. This is especially true for very long polygons.

    Try adding a loop cut down the middle,vertically, where the distortion is taking place. See if that helps.
  • Onnimra
    Options
    Offline / Send Message
    Onnimra polycounter lvl 10
    Quack! wrote: »
    Yes it will make textureing the diffuse harder, but will fix your issues. It is all a balance of having fewer seams versus having proper bakes.

    Thanks for showing me your high, I tossed a critique up over there.

    I separated the "border" sides, as you can see from this snapshot, and I made all the border edges normal of the uvisland "hard", while all the other "soft":

    uv4e.jpg

    It fixed the "weird reflections" and the "weird cavity", but now I get a little seam all along the border that you can see here:

    littleseam.jpg

    I really don't understand why it is there, since those are hard edges baked with the match method "geometry normals" (surface normals make the surface dull and way too plain...)
    bb0x wrote: »
    Also a quicky. Since quads are build of 2 triangles, this could mean some distortion could happen, no matter how good you bakes/cages/normals. This is especially true for very long polygons.

    Try adding a loop cut down the middle,vertically, where the distortion is taking place. See if that helps.

    I tried it, adding even more than just one loop to the model and to the envelope too, but it didn't change... The weird thing (to me at least, but I'm still a novice) is that I got straight lines with a model with even fewer polygons.
    Check this 3 instances for example:
    3doorsr.jpg

    3doorsw.jpg

    How is it possible? Should I keep this mesh? It makes the 2 hexagons look less deep though... What do you think?

    Sorry If I made any grammar mistake and thanks everybody for the help :)
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    The player will never notice the different between 1 and 2. With 2 you fix your issue AND have a much more efficient mesh. The answer is clear.

    If you want the indents to be deeper looking, exaggerate them a bit more in your high poly.

    As for that small, almost unnoticeable seam you have there. Zoom out to where you might see it in game, do you still notice the seam? Seams can happen even if you follow every step correctly, just depends on the engine. With a diffuse and spec on the model, and tons of shit flying every where and particles effects, that seam, won't be visible.

    As long as you are using an averaged cage and are splitting your uvs on the hard edges of your low poly you have done what you can.
  • Onnimra
    Options
    Offline / Send Message
    Onnimra polycounter lvl 10
    Quack! wrote: »
    The player will never notice the different between 1 and 2. With 2 you fix your issue AND have a much more efficient mesh. The answer is clear.

    If you want the indents to be deeper looking, exaggerate them a bit more in your high poly.

    As for that small, almost unnoticeable seam you have there. Zoom out to where you might see it in game, do you still notice the seam? Seams can happen even if you follow every step correctly, just depends on the engine. With a diffuse and spec on the model, and tons of shit flying every where and particles effects, that seam, won't be visible.

    As long as you are using an averaged cage and are splitting your uvs on the hard edges of your low poly you have done what you can.

    Yes I thought the same since it's not even a particular piece, but I started this model thinking to put it in my portfolio, so I preferred looking for a solution, and yesterday I actually found one.

    Apparently the problem was the lower portion of the mesh's topology. I can't really explain yet what the exact problem was, but I found it out adding again those cavity to the "working" mesh doing a bake now and then during the process.
    Here is a picture of the wireframe:
    lastnorm.jpg

    That seam is actually unnoticeable without zooming that much, so as you suggest, I'll ignore it at the moment.
    Summing up, in case other Maya users will ever encounter the same issues as I had:
    - Warping normals have been solved changing the topology of the model;
    - Pointy triangles "carved" into the normal, have been fixed by using hard edges along one of the edges of that triangle;
    - The stretched normals along the corners have been fixed by relaxing more the UVs in that region (in my case I made a UV island for all those borders);
    - The bright spots in the marmoset render have been fixed by triangulating the mesh before exporting it.

    Thanks everybody for the help so far! I hope not having anymore issues with this model, but who knows? :D
Sign In or Register to comment.