Home Marmoset

Confused about tangent spaces Marmo/SP -> Unity

polycounter lvl 7
Offline / Send Message
morepolys polycounter lvl 7
I'm looking into integrating Marmoset baking into my workflow but I seem to be running into some issues from going to app to app.  I have my preferences in Marmoset set to Mikk / xNormal as default.

Just for testing, this mesh is a single smooth group, triangulated. The first example on the top is baked inside of Marmoset (looks great), the bottom baked in Substance Painter and brought into Marmoset (see the shading errors)


So the same mesh / normal maps put into Unity.  The top version is using the Marmoset normal map (bad shading), the bottom Substance Painter (looks good).


OR should I be adding doing the hard edges on UV splits (this is what I generally do) which in this image looks good.  The Marmoset bake being the green version, the yellow baked in Substance.


In any case this was a test scenario to see if having 1 smoothing group on everything would work consistently between apps.  Does this simply mean you should still be adding hard edges on uv splits / 90 degree angles to keep things consistent?

Replies

  • EarthQuake
    Hi Victor,

    I believe that Unity does not calculate bi-normals per-pixel, while Toolbag (and Unreal) does. Currently we do not have a setting to disable this behavior (it should match with Unreal, but not with Unity).

    It looks like there is an option in Painter called "Compute tangent space per fragment" when this is on it should match the Toolbag result. When it is off, it should match what Unity expects. If you try to bake from Painter with that setting on, what happens when you load it in Toolbag and Unity?

    Assuming this is the cause, the discrepancy typically should not be noticeable, but if you've got a complex mesh with harsh shading and it's on a single smoothing group, it may become apparent.

    In any case it is a good idea to use hard edges along your UV splits. This way your normal map has to do less of the heavy lifting, and will handle texture compression and mip-mapping better. There's no benefit to not hardening edges along UV seams as well, the in-game vertex count will be the same, as any seam splits double the verts along that edge, so there isn't any reason not to do it.
  • MM
    Offline / Send Message
    MM polycounter lvl 18
    anyone wanting to test on their own, you can get the test meshes here:

    here is the Painter forum post:
    https://forum.substance3d.com/index.php/topic,30395.0.html

    *edit

    @ Joe - i already tested that and no luck. it just gives different shading errors.

    as Victor mentions, Painter bakes look fine in Unity without hard edges.
    it also looks fine in our proprietary engine without any hard edges.

    i hard edges can help us quite a bit here, but the purpose of this test is to verify the tangent space sync issue. the closer we can get without using hard edges the closer it is to perfect sync.

    CTSF on



  • morepolys
    Offline / Send Message
    morepolys polycounter lvl 7
    Ahhh no love for the Unity folk! :) jk

    I work in a pipeline where we have artists baking in Marmoset, taking those maps into Painter then exporting into Unity.  We also have other artists who bake directly in Painter.  For those using Marmoset for baking do you have any suggestions / tips to maintaining consistency going from Marmo / Painter / Unity?  Or if your mesh is prepped correctly the differences shouldn't be noticeable? I am talking strictly hard surface assets.

  • EarthQuake
    morepolys said:
    Ahhh no love for the Unity folk! :) jk

    I work in a pipeline where we have artists baking in Marmoset, taking those maps into Painter then exporting into Unity.  We also have other artists who bake directly in Painter.  For those using Marmoset for baking do you have any suggestions / tips to maintaining consistency going from Marmo / Painter / Unity?  Or if your mesh is prepped correctly the differences shouldn't be noticeable? I am talking strictly hard surface assets.

    We'll do some tests with this mesh and try and see if we can narrow down the cause of the problem.

    For now, hardening edges at UV seams is your best bet.
  • danielgalanty
    Offline / Send Message
    danielgalanty polycounter lvl 5
Sign In or Register to comment.