Home Unity

Issues with normal map shading

jclardie
polycounter lvl 8
Offline / Send Message
jclardie polycounter lvl 8

Having an issue with normals in Unity.

I'm baking my normals in Toolbag, texturing in Substance, and then dropping them in Unity.

The first issue comes in Substance but seems to be fixed by enabling "Compute tangent space per fragment". The problem is according to Substances documentation, this isn't done by Unity. As soon as I disable that feature the normals look busted, but are pretty similar to the busted'ness as what I'm getting in unity.

All the meshes are triangulated and I've tried all .fbx options on export and nothing seems to resolve the issue. I've tried adding smoothing group at UV seams, tried using the same SG everywhere and still no fix. 

Any thoughts on how to get these to look correct in?



Replies

  • rollin
    Offline / Send Message
    rollin polycounter
    Hello and welcome in the huge group of people who think we can help you with just screens of the end result.
  • jclardie
    Offline / Send Message
    jclardie polycounter lvl 8
    Sorry? Not sure I'm following you here. There's text that states the problem, so not sure what you are trying to say. 
  • rollin
    Offline / Send Message
    rollin polycounter
    I did try to say:
    to help you we primarily don't need your problem stating text but: 
    screenshot of the lowpoly wireframe 
    screenshot of the highpoly
    screenshot of the uvs
    screenshot of the normalmap

    please
  • Eric Chadwick
    Actually I thought the text and screenshots were adequate to explain the problem thoroughly.

    Unity seems to be ignoring the incoming tangents from the FBX.

    Images of the highpoly/UVs/normalmap aren't going to help much with solving tangent issues. Except to solve other potential issues, like not enough padding, ray misses, etc. The OP doesn't seem to have those problems tho.

    What import options are you setting inside Unity?
  • rollin
    Offline / Send Message
    rollin polycounter
    If that's the issue isn't it bit flawed in the first place? I tend to stay with the target-(engine) tangent space and the whole pipeline should adopt to it. So getting some (intended or not) custom tangents from the fbx seems counter productive. But maybe I'm missing a valid use case here?

    Edit: also if you're using custom tangents imported from the fbx, shouldn't the baker still produce a valid output then? But honestly I haven't tried it myself yet.
  • Eric Chadwick
    Yeah, definitely a fiddly workflow. I'll second rollin here, and suggest figuring out what tangent basis Unity expects, then try to bake to that.
  • rollin
    Offline / Send Message
    rollin polycounter
    The very first thing which did come to my mind is that it's a triangulation issue which is (partly?) hidden if the per-fragment calculation is used.
    But without screens of the actual input assets it's just purely guessing.

    I bake regularly for unity and it should work "good enough" from a technical point of view. 

    Btw: the author himself says here that Unity since 5.3 supports mikkspace. And I doubt something has changed since then, but not sure..
  • pixelpatron
    Offline / Send Message
    pixelpatron polycounter
    Whenever I have issues like this in any program/engine the best approach is to bake out something very simple. A normal map that has a positive shape, a negative shape and a round button type shape, some indented text and some embossed text, you can add a few scratches and stuff to it too. Map to a cube with each element on a different surface of the cube. Bevel the edges of the cube (high poly), ding up and dent one side edge of the other. Bake out your cube(s) and see what happens. The models are so basic (usually removing some of the elements that can cause snags....mainly soft hard edges..tangents and polygon tessellation (oh ya triangulate your meshes). Through this process of elimination you should be able to see where the breakdowns occur pretty easily because you'll be dealing with such basic primitives and uv layouts. 

    Good luck.
  • Noors
    Offline / Send Message
    Noors greentooth
    It's a tangent space issue, not smoothing groups/UV related.
    You have to check your baker options in Toolbag.
    In Unity, if you click the fbx, you have all importer options : Model>Tangents.
    I assume "calculate tangent space" is in mikktspace (considering Mr. Mikkelsen is working for Unity Technologies...)
    But you can mess around with the options, if the tangents are actually exported in your fbx.
Sign In or Register to comment.