Home Marmoset

UDIM worked once then not anymore. Can't figure out why ?

polycounter lvl 8
Offline / Send Message
hansolocambo polycounter lvl 8
Hi,
I have quiet a lot of bakes to do on a big object I'm working on. I began with this little Top part.
At my first attempt to bake, Marmoset gave me a bake on both sides (symmetry with UDIM). It all worked great.

But I had make a few changes here and there on my object. When I cam back later to the baking in marmoset, I couldn't get the blue half (the symmetry that I use only to get a clean bake at the seams) to be baked anymore. I struggle on that for hours and it gets me crazy as I can't figure out what I'm doing wrong or differently now compared to my first attempt.

My scene in 3DS Max : 2 ID Maps, One Mesh with welded symmetry, Half of the mesh (blue) has a UDIM +1.

Could someone please tell me what I'm doing wrong ? I know UDIM ain't perfectly understood by Marmoset yet, but somehow I HAD it working once ! But now, I even reinstalled Marmoset to get back to default settings. But I can't get it to work anymore. Half of the mesh doesn't bake at all (I loaded the same objects in Substance by the way, the bakings take forever but they work fine).

Thanks in advance for your help.



Replies

  • EarthQuake
    UVs outside the 0-1 range will be ignored by the baker, so you'll have to move them back into the 0-1 space.

    That said, it should not be necessary to use multiple texture sets in this case. Simply use a single material and single texture set and it should work without issue. There is no need to split materials up to get clean results on the center line, moving the UVs outside the 0-1 space should be all you need to do. You can enable Fix Mirror Tangents in the low poly object properties if you have any problems with the mirror seam as well.
  • hansolocambo
    Offline / Send Message
    hansolocambo polycounter lvl 8
    Thanks EarthQuake for your answer :)

    - On one hand you write : "UVs outside the 0-1 range will be ignored by the baker"
    But again at my first attempt at baking this part, the blue half (symmetry with UVs outside the 0-1 range) got a proper bake for some reason ?! I mean... you begin to make me doubt now, but I'm 99% sure that at my first baking attempy, with the blue half outside the 0-1 range, Marmoset managed to bake something on each half. That's really weird ??

    -Then on the other hand you write : "moving the UVs outside the 0-1 space should be all you need to do"
    Well.... that's precisely what I did. But I don't understand why you tell me that's what I have to do, when you wrote just before that UVs outside this range will be ignored during the bake process ? I don't get what you mean by that.

    - "you can enable Fix Mirror Tangents in the low poly" Sure. But this is after the bake is done. It's got nothing to do with the baking process. A few minutes ago, I baked the object from the first post in this thread using Substance Painter. Then I deleted the blue half. I made mirror copy of the grey half (UVs in the 0-1 range). And ended up with a clean object : two halves sharing the same texture. I imported that new object + the Substance Baked Normals into Marmoset and, indeed, I then had to activate the "enable fix mirror tangents" to get a clean seam. But that's just a display thing, not a baking option.

    My issue is not how to display properly a symmetry but how to bake with Marmoset. Marmoset's baking is fast and very efficient. That's kind of the only reason why I paid for it. But if I can't find a way to bake an object such as the one I'm working on [...]

    [...] with one symmetrical half using the UDIM+1 symmetry trick that fixes normal issues along the seams....

    - "it should not be necessary to use multiple texture sets in this case
    at the line that says : "Sometimes an artist will decide to delete half of a symmetrical model before baking [...]" . And you'll understand why artists working on symmetrical objects need two halves for the baking process, then they get rid of one for the final result. All this to get a clean seam in the middle.

    I continue with Substance for the moment. But I hope there's a workaround in marmoset I haven't figured out yet :(

    ----------------------------------------------------------------------------------------------------------------------

    Just a thought. What if I do that :
    * the half I keep + a symmetry..
    * Both welded at the seam (might not be necessary)
    * Each half is unwrapped in the 0-1 UV Range
    * Each half has its own texture / Material ID
    * This way Marmoset's baking can do its job.

    Using this method, would the result be the same as the clean one I get using Substance ? But using Marmoset's baker, much faster and efficient in my opinion, except this damn UDIM option which is cruelly missing ?





  • EarthQuake
    "But again at my first attempt at baking this part, the blue half (symmetry with UVs outside the 0-1 range) got a proper bake for some reason ?! I mean... you begin to make me doubt now, but I'm 99% sure that at my first baking attempy, with the blue half outside the 0-1 range, Marmoset managed to bake something on each half. That's really weird ??"

    It is likely that something significant changed in your mesh/uv content if it was producing different results before. Toolbag ignores UV data outside of 0-1 to make it easy to resolve mirror seams, see method #2 below.

    "
    Well.... that's precisely what I did. But I don't understand why you tell me that's what I have to do, when you wrote just before that UVs outside this range will be ignored during the bake process ? I don't get what you mean by that."

    Sorry I should have been more clear. There is nothing you need to do in addition to offsetting the UVs, and even the offsetting UV step is not be expressly necessary. That is to say, there is no purpose or function to adding another material and baking with texture sets enabled in this case. You would only need to do that if your texture sets have unique UV layouts (proper UDIMs, more on this in a bit). Here, it seems that the UVS in 1-2 are simply mirrored/instanced versions of the same UVS in 0-1, please correct me if I am wrong.

    From my understanding you are attempting to do some sort of work around to solve a mirror edge problem that should not be necessary in Toolbag.

    "[...] with one symmetrical half using the UDIM+1 symmetry trick that fixes normal issues along the seams...."

    ^ This specifically, seems to be a workaround you think you need to use based on experience with other software (Substance?). It should not be necessary with Toolbag.

    There are two easy ways to tackle mirror seams in Toolbag.

    1. If you don't offset the mirrored UVs outside of 0-1, you simply need to enable Fix Mirror Tangents before baking.



    Above you can see a simple mirrored object, the UVs have not been offset.



    Here you can see what happens when I bake this mesh. I get weird errors along the UV seam. This is what the Fix Mirrored Tangents feature is for.



    Now, if I enable Fix Mirror Tangents and rebake, I get a flawless bake. This is not a preview setting, it may look that way when you click it, but if you re-bake it change the resulting normal map. This baked normal map should work as expected in Unreal, Substance, etc. This is the fastest and easiest method, as it does not require any additional work with UVs or materials.

    2. You can skip the Fix Mirror Tangent step if you move the mirrored UVs 1 unit outside the 0-1 space. 



    This is the most common way to tackle the seam problem and should not require you to do anything else when you get into Toolbag. Just bake it and it will work. Because Toolbag ignores the UVs outside of 0-1, the primary UVs are isolated and there is no conflicting UV or tangent data that we need to correct for.



    And here is the result with the offset UVs method. This should produce results that are identical to the Fix Mirrored Tangents method. Either should solve your problem, it's just a matter of where you would prefer to do the work (offsetting the UVs or clicking the button in TB).

    There should be no reason to use multiple materials or the Texture Set functionality to resolve this issue in Toolbag.

    Now, onto UDIMs. UDIMs are sets of unique UV layouts placed in the 0-1, 1-2, 2-3, etc spaces. We do not support UDIMs currently but it is something we plan to investigate for the future. Unfortunately it will require a major reworking of the materials and rendering systems to support UDIMs properly, which is why it hasn't been added yet.

    That said, you can bake maps intended for UDIM workflows in Toolbag. The process for doing this is fairly simple:
    1. Make sure all UVs are within the 0-1 space.
    2. For each UDIM set, apply a unique material, ie: 1001, 1002, 1003, etc
    3. Enable Texture Sets in the baker

    This will bake out assetname_maptype_1001, 1002, 1003 etc which most applications that support UDIMs will be able to read.

    You could theoretically use this UDIM work around to solve your problem in a third way. However, it will result in redundant output files, will likely be a bit slower to bake, and is the most complicated method so I would not recommend doing so.
  • hansolocambo
    Offline / Send Message
    hansolocambo polycounter lvl 8
    Well that's some amazingly interesting infos you're giving here. I'm gonna try all that out, though I'm not sure I understand it all right away It's pretty late and I spent my day baking. It's always a hard part of the job (for me at least).

    - Is there a reason why you use Mikk / xNormal Tangent Space instead of "Marmoset" tangent Space ? I use Mikk for a long time but this "marmoset" tangent space being the one by default I thought for a moment that it was more or less the same with some improvements.

    I tried the method you explained :



    Could you please just consider recording a straight to the point video tutorial with your nice example above ? Explaining this baking option specifically : Fix Mirror Tangents. And... eventually the "UDIM workflows in Toolbag" : I already read this explanation you give me here on another thread but I'm a bit thick on this one and the logic really escapes me :
    - load a lowpoly UDIM 0-1 + the symmetrical copy UDIM 1-2 with each its own unique material.
    - bake (without "fix mirror tangent" activated if I got that right ?).
    - Marmoset doesn't take into account the offset 1-2 mirror, but somehow get the bake clean at the seam ? If Marmoset doesn't "see" the UDIM 1-2 what difference does it make to have it there or not at all ?
    It's a method. I get that. But I hardly understand why it works (I tried and ended up with the same line at the seam) and how people could figure that out ?

    There's a lot of confusing infos about symmetrical baking. According to your explanation,  Marmoset has the perfect solution. And a simple one with that ! Simpler than what's explained in the Polycount Wiki about baking/mirroring. I'd say your knowledge deserves to be spread around :) But again, just consider this idea of a recorded tutorial. I'm sure it would be golden for a lot of people. But I'd totally understand if you don't have time to do it ;)

    Thanks a lot for your help :)



  • EarthQuake
    I think your remaining issues will be resolved by switching to Mikktspace. Mikkt is pretty much the industry standard these days, being used in Substance, Unreal, Unity, etc.

    The Marmoset tangent space's main advantage is that it is faster to calculate, so it speeds up load time with very dense meshes. However, no applications outside of Toolbag use it, and it is generally not as accurate as Mikkt, so it shouldn't be used for baking. This probably seems a bit silly consider it is the default option - I'll make a note that we should reconsider this for a future update.

    In any case, you can change the default tangent space in Edit->Preferences. Once set here this should apply to all new baker objects.
  • hansolocambo
    Offline / Send Message
    hansolocambo polycounter lvl 8
    On the last screenshot, on the top left, you'll see I was using Mikk Space already ;)
    Thanks for the info about the default Tangent Space ! That's cool ;)
  • EarthQuake
    On the last screenshot, on the top left, you'll see I was using Mikk Space already ;)
    Thanks for the info about the default Tangent Space ! That's cool ;)
    Oh sorry, I thought you were using Marmoset tangents there. There could be some other issue here then as this should work.

    If you haven't already done so, try merging the objects and welding the verts along the center line.

    If that doesn't solve it, please send me your high and low objects along with your .tbscene file and I will have a look at it.
  • hansolocambo
    Offline / Send Message
    hansolocambo polycounter lvl 8
    I try to weld vertices in the center, it's usually better to bake symmetrical objects.
    But still, I had issues at the seam in Marmoset. I ended up finishing the bakes in Substance (it took me forefuckingver). 
    Method that gave by far the cleanest results : 
    - I retopo on half and unwrap it in UDIM 0-1. When smoothing groups (hard edges) are ready
    - I make a symmetrical copy of  my mesh and move those UVs in UDIM space 1-2.
    - I bake the whole low poly, vertices welded, and export textures for only the half I need (UDIM 0-1)
    - Then I make a new symmetrical copy of my original retopo and keep all UVs in UDIM 0-1.
    - Final result looks fine at the seams.

    Result here :  

    I'll make some tests to re-bake parts in Marmoset, as you showed me that it's also possible there. But something in my workflow is wrong and I couldn't get proper results. I'll try again as I really like baking in Marmoset :( and keep you updated.
    Thanks ;)
Sign In or Register to comment.