Home Technical Talk

Unity normals are funky

greentooth
Offline / Send Message
LouisPhilippe greentooth
Yo yo,
I'm having a hard time to get my normals to behave exactly how i want them. Maybe someone has the knowledge to guide me in the right direction. My normal maps work exactly as intended in marmoset and substance painter, but look pretty different in Unity (URP)  maybe the tangent space is just too different or something idk.
Here's the model with normal map in substance

Here's the model with normal map in marmoset (mikk tangent space)

and here's in unity

It's not a huge deal but when cell-shaded it becomes a problem

Replies

  • Fabi_G
    Offline / Send Message
    Fabi_G high dynamic range
    Hi! Did you triangulate the model before baking, to make sure triangulation is consistent across applications?
  • LouisPhilippe
    Offline / Send Message
    LouisPhilippe greentooth
    Fabi_G said:
    Hi! Did you triangulate the model before baking, to make sure triangulation is consistent across applications?
    I did not  :# How can you make sure that the animated version of this model has the same exact triangulation? I'm assuming most riggers and animators preffer to work with quad models. But you're right, this is most likely the issue!
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    The fact that animators and TAs prefer to work on quad models doesn't prevent the ingame asset to be exported with known, locked-in triangle edges. The models only get baked and exported once ...

    In practice you'd have to bring this up to whoever is in charge of the tech in your project, and not bulge from there. Otherwise it will bite *you* in the ass later as you will be considered responsible for the models looking broken.

    (nice work on the frog and owl BTW !)
  • LouisPhilippe
    Offline / Send Message
    LouisPhilippe greentooth
    pior said:
    The fact that animators and TAs prefer to work on quad models doesn't prevent the ingame asset to be exported with known, locked-in triangle edges. The models only get baked and exported once ...

    In practice you'd have to bring this up to whoever is in charge of the tech in your project, and not bulge from there. Otherwise it will bite *you* in the ass later as you will be considered responsible for the models looking broken.

    (nice work on the frog and owl BTW !)
    I see, unfortunately the one responsible would be me anyways haha (small team problems)... So riggers would have ways to transfer their rig to a triangulated model with no problem? Sorry if these are noob questions, I'm not sure where else to find good answers!
    (thanks!!)
  • Fabi_G
    Offline / Send Message
    Fabi_G high dynamic range
    An option while iterating (and to minimize dependencies) would be to rig and animate a proxy mesh with the correct proportions and transfer the weights to the game mesh.
  • LouisPhilippe
    Offline / Send Message
    LouisPhilippe greentooth
    Just updating, but @Fabi_G was correct. The triangulation was not consistent between softwares.
    As for using proxy meshes, we already use them in our current pipeline so I guess we're not too far off. I guess the triangulation problem went un-noticed because we didn't use normal maps for a while and just now re-introduced them.
    thanks a lot for the help, this saved me a lot of headscratching! 
  • Alex_J
    Offline / Send Message
    Alex_J grand marshal polycounter
    you probably figured it out already, but the animation only needs skeleton to work. you can associate any skinned mesh with it later non-destructively.
  • LouisPhilippe
    Offline / Send Message
    LouisPhilippe greentooth
    The area around the eye looks clean now (dont mind all the other small issues i'll fix them I swear)

  • Klunk
    Online / Send Message
    Klunk ngon master
    should give him webbed feet ;) looks great though :)
  • CheeseOnToast
    Offline / Send Message
    CheeseOnToast greentooth
    Are you working in Maya? If so, you can leave the triangulation to the fbx export (turn on "triangulation" in the export dialogue) and leave your source model in quads. I believe it uses Maya's triangulation method, which is to create the shortest edge possible to create triangles. Anyone exporting the skinned model as an fbx should do the same.
  • LouisPhilippe
    Offline / Send Message
    LouisPhilippe greentooth
    Are you working in Maya? If so, you can leave the triangulation to the fbx export (turn on "triangulation" in the export dialogue) and leave your source model in quads. I believe it uses Maya's triangulation method, which is to create the shortest edge possible to create triangles. Anyone exporting the skinned model as an fbx should do the same.
    I'm in max, but it does have a triangulation option on export too. Our animator/rigger is in blender. essentially he will need both the quad and triangulated model and transfer the weights once the skinning is good.
  • Noors
    Offline / Send Message
    Noors greentooth
    it looks correct now, but be sure to also check if bitangent is generated per vert or per frag as it needs to be per frag for URP/HDRP, and pert vert for BuiltIn  :# (tho it's just a shader thing)
    https://bgolus.medium.com/generating-perfect-normal-maps-for-unity-f929e673fc57
  • LouisPhilippe
    Offline / Send Message
    LouisPhilippe greentooth
    Noors said:
    it looks correct now, but be sure to also check if bitangent is generated per vert or per frag as it needs to be per frag for unity :
    https://bgolus.medium.com/generating-perfect-normal-maps-for-unity-f929e673fc57
    Oh thanks for the heads up, I'll check that rn!
Sign In or Register to comment.