Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

seams apparent in Unity when I put on my mesh :s

Discussion in 'Editor & General Support' started by togeux, Jul 11, 2011.

  1. togeux

    togeux

    Joined:
    Oct 29, 2009
    Posts:
    6
    Hi,

    Edit my title: seams apparent in Unity when I put my NORMAL MAP on my mesh *


    I have a probleme, I have make my normal map in Zbrush and Xnormal and its same probleme,
    when i put a normal map in my model (with all shader) I see seames
    I think is a problem of my mesh?

    thanks very much

    Togeux
     
    Last edited: Jul 11, 2011
  2. togeux

    togeux

    Joined:
    Oct 29, 2009
    Posts:
    6
  3. sawfish

    sawfish

    Joined:
    Feb 12, 2011
    Posts:
    314
    When you unwrapped your UVs did you put a seam down the center? You should put it up the sides under the arms instead.

    Also, make sure the normal map edges (that meet up) match perfectly.
     
  4. togeux

    togeux

    Joined:
    Oct 29, 2009
    Posts:
    6
  5. togeux

    togeux

    Joined:
    Oct 29, 2009
    Posts:
    6
  6. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    What happens if you change some of the import settings in Unity. Specifically turning on "Split Tangents" and "Calculate Tangents". Let me know if that fixes it. If it doesn't I'd really like to have a chance to look at your models as we're trying to track down issues with our normal map pipeline at the moment.
     
  7. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    Hey antenna tree,
    I'm on the Unity beta list, I've submited a case with the same problem as Togeux is talking about.
    The case provides a small project with the model and normal maps.

    Some pictures showing the issue:
    http://grab.by/axPa
    http://grab.by/axPh
    http://grab.by/axPC
    http://grab.by/axPC

    If you wanna take a look here is: 411698

    As you can see normal maps are inverted in some places of the mesh, creating then
    some lighting differences leading to a huge seam (or mesh separation)
    issue. To me it looks like the way Unity generates tangents on models. The same normal map looks fine in some part of the mesh and looks inverted in other parts of the mesh really weird stuff. And to be honest, this happens with all our models inside Unity.
    I had the chance to try out our models inside UDK and they look fine over there, no issue at all.
     
    Last edited: Jul 15, 2011
  8. Naison

    Naison

    Joined:
    Feb 21, 2010
    Posts:
    386
    Unity has done the same thing to me as well it can be fixed by recalculating normals, or calculating smoothing angles within unity. i have yet to find a time where an issue can't be fixed by doing one of the above.
     
  9. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    Hello Naison,
    Even if the mesh looks mirrored in the previous post, you can see in this video the vertices aren’t duplicated and nothing have been mirrored:

    Btw, we never mirror meshes. ^^

    This was rendered using a tangent method with a similar similar shader in 3ds max:
    http://grab.by/ay2d
    http://grab.by/ay2m
    http://grab.by/ay2q
    http://grab.by/ay2z
    http://grab.by/ay2A

    Unreal Engine shots:
    http://grab.by/ay3U
    http://grab.by/ay3W
    http://grab.by/ay40
    http://grab.by/ay47
    http://grab.by/ay4b
    http://grab.by/ay4d
    http://grab.by/ay4r
    http://grab.by/ay4t

    Now the same model normal mapped inside Unity(be ready to drop your jaw):
    http://grab.by/ay2V
    http://grab.by/ay2W
    http://grab.by/ay2Y
    http://grab.by/ay31

    I’m using the exact same model(same FBX file), same textures, same normal maps, nothing have changed.
    I’ve also tryed the same models on other engines (Not just Unreal Engine) but also inside xNormals real-time renderer and again, they look fine.
    The problem is Unity normal map system. Not only i got those weird seams but also incorrect lighting, my normal maps looks flat (instead of bumped) and my models they all looks skinny (quite different in Unity, but this is provably an other issue, could be an FOV issue, not sure).
    3ds max, Unreal Engine, xNormals and the other engines that I’ve imported my meshes shows the correct normal maps (and correct bumpiness too).
    Obiously, there’s something really wrong here, I can’t speak on the Unity side but my models (and normal maps) looks fine everywhere, but quite incorrect inside Unity.

    By the way, my normal maps have been done with zbrush and xNormals and they are all tangent normal maps.

    Cheers,
     
    Last edited: Jul 15, 2011
  10. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    Is there a solution to this? I am having the same issue. Model looks fine in other engines/rendering apps but in Unity it is having that same strange lighting issue. It is only the NM, my texture map is not showing any seams. Split Tangents and Calculate Tangents is not helping, they are already on.
     
    Last edited: Apr 20, 2012
  11. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    This apparently was fixed (but FBX still a garbage file format, i could be wrong).
    If your model comes from 3ds max, there's some stuff you need to do in order to make it look correct inside Unity.
    You must try to convert your model into Mesh Modifier (if its already Editable Poly Modifier) or into Poly Edit (if its Mesh).
    Use the FBX 2012.2 version (dont use FBX 2013, it have lots of problems).
    Tick Binormals and Tangents.
    Untick MeshSmooth (if ticked).
    Don't Triangulate it.
    Untick instances (just in case).
    If still not work, try ticking splitting normal!
    You must try all this with a Mesh Modifier and a Poly modifier (i don't remember exactly the one that worked for us).
    Let me know if it works!
    Cheers,
     
  12. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    My mesh is from Maya 2012, should I look for similar things?
     
  13. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    Then two things comes to my mind. Unity FBX import pipeline still broken, Autodesk FBX file exporter still s**k (as always) or both!
    Try to file a bug report with a small project and pictures. To show Unity your model on different engines (Like i've done).
    Really, we don't use Maya, can't help you on that.
     
  14. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    Ok I will do that. Do I just start a thread or is that a different way to file a bug report?

    EDIT: I noticed I am getting an error saying "Shader wants Tangents, but the mesh doesn't have them"

    I exported with Tangents and Binormals selected, error now reads:

    "FBX import warning: Can't import Tangents and Binormals because mesh doesn't have them". I don't understand, why wouldn't the mesh have them? I am confused if I am supposed to manually add them to the mesh? How does Zbrush take a normal map if it doesn't have them?

    I brought the mesh into 3ds Max and it doesn't work from there either.
     
    Last edited: Apr 21, 2012
  15. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    I filed a bug. When you do this, do you get somewhat immediate help or is it just for the knowledge base of the engine?
     
  16. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    You should get an answer from Unity QA within days, depending on the gravity of your problem (and general). But any reproducible bug is always fixed! Well, not all, depends how hard it is to fix it! XD
    This one, have been laying around for years. XD
     
  17. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    Does everybody have this problem with normals? I just don't get what else to try.
     
  18. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    [EDIT] The problem is obviously Unity tangent generation (being very wrong). Did you tried importing your own tangents?

    I'm on the Unity Beta list. If you can share your model with me, i can report a bug and pass it to the beta list.
    Not long ago, i had this same issue and i would like them to take a second look (specially for models coming from Maya).
    Just in case:
    tatoforever{a t }psychozinteractive{d o t}com

    Cheers,
     
    Last edited: Apr 22, 2012
  19. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    I tried to export from maya with Tangents and Binormals selected, but that didn't change anything. Do you have an e-mail address where I can send you a link to the model?
     
  20. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    Inside Unity, have you tried to set the Import setting to "Import" normals and tangents?
    my email:
    tatoforever{a t }psychozinteractive{d o t}com
     
  21. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    Yea I adjusted the settings with unity. Sorry I overlooked the e-mail the first time, I will get that model to you today.

    By the way, when I use "Import" normals and tangents, there is an FBX Import error message saying the mesh does not have tangents.
     
    Last edited: Apr 23, 2012
  22. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    Sent. Thanks again.
     
  23. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    I got your email! Going to inspect that right away and report a bug (if still a bug)! There's probably a workaround (cross your fingers).
    I'll get back to you later!
     
  24. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    I've reported a bug case with your models and textures: 460090
    In case you need to reference it anywhere.
    I’ll keep you posted on that.
    Cheers,
     
  25. i3DTutorials

    i3DTutorials

    Joined:
    Aug 26, 2010
    Posts:
    564
    This is a common problem with normal maps, tangents, and realtime graphics- there's lots of articles about it on the internet; it's not a problem with FBX or Unity. Cause is user error plus software limitation.

    First, don't ever put seams in noticeable places.

    Second, this will always happen with mirrored/symmetrized meshes; this breaks the tangents. There is currently no way to solve this in game development.

    There are "workarounds" for this. To ensure the tangents are as continuous as possible, make sure to normal map a mesh in it's complete state; not one half. This will result in problems with overlapping Uv's, so to solve it you need to take the duplicate UV's that are inverted, move them one entire unit in UV space from 0-1 space to 1-1; then bake the normal map. Your seam will now practically dissappear; remember you can then go into Photoshop and alleviate the seam further by making sure to paint only in the respective color channels.
     
  26. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    No, that's not the case. Tangents look correct inside 3ds max, UDK and others 3D software, but incorrect inside Unity.
    This is an Unity tangent handling (importing and generating) issue.
    I've already reported a similar problem in the past (we use 3ds max). The problem that rmelee09 is having are with models that came from a different 3d package (which btw are exactly the same problem i had some time ago).
     
  27. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    688
    I sent you an e-mail Tatoforever explaining the outcome of unity support.
     
  28. kinl

    kinl

    Joined:
    Jun 1, 2008
    Posts:
    355
    This has been an issue for years, I currently use a lot of FBX exports from Modo and some of the seams show up like you said, they're not mirrored and there is no problem with the normal map since applying the normal map as a texture show no seam, its a tangent creation/import problem as you say, I've just lived with it and worked around it, it is a huge pain especially since many versions of Unity have come out and not fixed this issue.

    I'd be interested to know what Unity support has said this time, I gave up on the issue.
     
  29. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    @kinl,
    I've also given up (I've reported this problem a lot of times). We got lucky and found a way to generate normal maps that looks correct inside Unity and it's with xNormals, outside of that they wont look correct, we've tried 3ds max normal map creation, Zbrush, anything that can generate normal maps with high poly count mesh and nothing worked. The way normal maps works in Unity should be highly documented. You know, the stuff that tells you how to correctly generate normal maps those that works with Unity.
     
  30. kinl

    kinl

    Joined:
    Jun 1, 2008
    Posts:
    355
    Thanks i'll look into that... seems from a workflow point of view for myself its best to be careful with your seams I guess, I'll take a look at fixing it with xNormal.
     
  31. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,328
    Unity internally uses some of the xNormal techniques to generate mesh tangents but if you ever do something with xNormals try to let unity generate tangent and compare with your own tangents.
     
  32. kinl

    kinl

    Joined:
    Jun 1, 2008
    Posts:
    355
    Ok thanks, just installed xN... and it works great! now i just need to figure how i get my bumps into xNormal 0_o
     
    Last edited: Nov 29, 2012
  33. felixfors

    felixfors

    Joined:
    Aug 13, 2010
    Posts:
    178
    I had the same problem but after playing around with the import settings in 5mins i found a solution for this. go to the import settings on your model and look under the title " Normals Tangents " and take Tangents setting to none. It removed the seam for me. : )

    BEFORE
    http://i.imgur.com/q6T5AAf.png

    AFTER
    http://i.imgur.com/aLYoqvZ.png
     
  34. MRCalderon3D

    MRCalderon3D

    Joined:
    Jan 22, 2013
    Posts:
    7

    Thanks a lot felixfors !
     
  35. CampingCaraboo

    CampingCaraboo

    Joined:
    Jun 7, 2013
    Posts:
    1
    Hey guys,

    Like many of you, I've had a similar issue. That is, the seams kept showing up in Unity. I troubleshooted all of these things but none of them worked for me. I just wanted to share what I just found to be the solution (something I had totally forgotten about with 3DS Max and the way it does it's lighting).

    If the normal map is baked in 3DS Max, then what you need to do (if none of these other solutions solve it) is go to your image in Photoshop (or some other image editor) and select "Channels" then select the Green channel. Once this is done, invert the color of the Green channel.

    The result, if tested in 3DS Max, will create seams, but in Unity it will look just fine, as well as in UDK, etc..

    If rendering normals in XNormal, all you need to do to prevent this from ever happening is to make sure that the Y channel is set to Y+. Have it set to Y- if you are needing to use it in 3DS Max.

    That should fix it!