Home Technical Talk

Having trouble to remesh and bake normals to a .OBJ mesh

Hello there,

I am trying since weks now to understand why I am getting weird results on my normal bakes.

I am taking the lowpoly OBJ from a game where you can download them to reskin them, the UV map is already done.

The Lowpoly mesh looks like that:


I want to add different details to it, So I tryed many ways to make it Highpoly inside blender (remesh, subsurf, etc), so my highpoly mesh is looking like that:


With that result, I want to bake my HighPoly to my lowpoly, and I am always getting a weird result :



As you can see, there is a square that seem to be overlapping with my added texture, and I don't know what could be causing this.
I tried to bake the same HP/LP on other softwares too, but I have the same kind of result.

Would anyone know what I am doing wrong here ? I think I may do something pretty wrong in the process but at this point I can't figure out what.

Thanks for reading, hoping that someone will be able to help on this :open_mouth:

Shaia

EDIT:
While checking the Lowpoly UV map, I notice that the kind of rectangle is here too. So I guess that this UV map is creating those weird effects on the bake, but I have to upload the textures applied to this particular UV map to upload it to the game.

Replies

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    The remeshing process most likely busted the UVs

    I'm very impressed that they're as unfucked as they are tbh so I salute whoever implemented the remeshing. 

    Im not familiar with blender but it may be possible to reproject UVs from the original mesh onto your remeshed version - it would be possible in Maya and maybe possible in max so there's a good chance. 
  • shaia
    Options
    Offline / Send Message
    Hi poopipe,

    The UV here are the base UV from the low poly mesh, I duplicated the low poly to remesh it to be able to bake high-poly to low-poly, that's why UV map is intact
  • Eric Chadwick
    Options
    Offline / Send Message
    Any UV overlaps or inversions?
  • shaia
    Options
    Offline / Send Message
    Any UV overlaps or inversions?
    I think the UV from the game is overlapping yes as a part of the top right is directly linked to the middle of the bottom square
  • Kanni3d
    Options
    Offline / Send Message
    Kanni3d ngon master
    Unstack your uvs, and fix the rectangular uv's on the top right that became welded to some random verts (due to remeshing process).
  • Eric Chadwick
    Options
    Offline / Send Message
    ^ this

    You need to fix UV overlaps just for the lowpoly model you use in baking. Since you are making a new texture set, the lowpoly mesh doesn't need to be exported, only the texture layout does.

    How to offset the overlaps before baking:
     http://wiki.polycount.com/wiki/Texture_Baking#UV_Coordinates
  • shaia
    Options
    Offline / Send Message
    I didn't know that was possible, I will give that a try tonight and let you know, thank you! 

    Edit: I did a quick try and moved the overlapped part outside of the UV square, it appears that those overlapped parts are the middle of the front panel's chest (inside), and that's most likely what is causing the bake wrong result.



    So I moved it out and tryed again but I am getting the same result here, most likely because that inside part is missing and the border of it somehow inflate and overlap my front texture:


    Would you know a way to avoid that behavior so the "UV hole" doesn't create weird results on the bake?

  • Ghogiel
    Options
    Offline / Send Message
    Ghogiel greentooth
    That one skewed UV shell wasn't the only thing overlapping. You still have just about everything overlapping by the looks of it. Layout everything so it's flat and is no overlapping. It's not something you can get around any other way than doing decent seams, splitting shells and flattening

  • Eric Chadwick
    Options
    Offline / Send Message
    Are you making a new texture set to import into an existing game? Or are you replacing the whole model with a new model?

    If the latter, then do as Ghogiel says, that's the best way.

    However if it's the former, you must preserve the existing texture layout; if you re-uv or change smoothing, it won't work on the existing model. To capture a proper bake, you must have zero overlaps inside the UV square. Is there a way in Blender to select all overlaps?
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    poopipe said:
    The remeshing process most likely busted the UVs

    I'm very impressed that they're as unfucked as they are tbh so I salute whoever implemented the remeshing. 

    Im not familiar with blender but it may be possible to reproject UVs from the original mesh onto your remeshed version - it would be possible in Maya and maybe possible in max so there's a good chance. 
    In both MAx and Blender  re-projecting UV is almost  impossible perfectly if your projecting target has much  different  edge flow around  UV seams .   
    I  project UV  to lods  and  if UV seam edges   are too decimated it often does a kind of  overlapping , wandering away UV vertexes.

    Both Blender and MAx have  special "projecting seams"  option but it never worked for me.
     
     So  it works for fixing UV on lods by re-projecting.  But almost  never really works for projecting some parametric UV  like cylindrical for example done in single island  over a split game model.  

    it's where source object with cylindrical unwrap has its seam  and target  mesh doesn't.   Whatever I puch uv seam  project  button or not.  Same in Max as I recall.

     
    Wonder if Maya has similar issue?



  • shaia
    Options
    Offline / Send Message
    Are you making a new texture set to import into an existing game? Or are you replacing the whole model with a new model?

    If the latter, then do as Ghogiel says, that's the best way.

    However if it's the former, you must preserve the existing texture layout; if you re-uv or change smoothing, it won't work on the existing model. To capture a proper bake, you must have zero overlaps inside the UV square. Is there a way in Blender to select all overlaps?
    @Goghiel, @Eric Chadwick Yes I'm trying to make a new texture set, so I need to preserve the texture layout. I'm not experienced enough as I dodn't meet this case so far, but I will try to find something , the issue is I'm not able to imagine the scenario where there is 0 overlapping, the texture set will be fully different, or am I missing something?

    @gnoop I tried that in the meantime but the result was indeed very wrong.

    I begin to think that may be too complicated for my level :o
  • Eric Chadwick
    Options
    Offline / Send Message
    You need to only have 1 non-overlapping UV inside the 0-1 UV square. 

    You moved one of the overlaps outside the 0-1 square (orange island here), but you didn't move it exactly 1 UV unit. This means it won't be mapped correctly in-game, the texture on that orange piece won't line up anymore.



    You also need to move the overlapped islands I am pointing out with green arrows. I can see they're overlapping because the edges are going under each other. You should select the whole island that's underneath, and move it exactly 1 unit on the U axis.

    There may be other overlaps we can't see so easily, because they may match exactly with the top island, causing no shadowing. That's why you need a tool which selects all overlapping UVs.... if you use a tool like that, then you can deselect one of the overlapping islands (so it will stay put) while you move all the other overlapped islands.
  • Eric Chadwick
    Options
    Offline / Send Message
    You're in luck, TexTools has this tool. 
    http://renderhjs.net/textools/blender/


  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Upload both high and low models, otherwise this thread will likely just run in circles because of all the guesswork.
  • shaia
    Options
    Offline / Send Message
    @Eric Chadwick I just understood that the texture set would still be the same if the unit is moved by only one UV unit, thank you for saying it again as that wasn't clear to me!
    The mesh itself isn't too complicated, I'll give it a try by tomorrow, I think I understood it now, just have to figure how to move by exactly one UV unit :) 

    This Textools seems pretty good too!


  • shaia
    Options
    Offline / Send Message
    .
    EDIT: Miss sorry
  • shaia
    Options
    Offline / Send Message
    You guys are awesome!

    Special thanks to @Eric Chadwick for your help!!! The bake went perfectly smooth once overlaps are gone :)



    Thanks again and have a great day!

    Shaia
  • Eric Chadwick
    Options
    Offline / Send Message
    Are the straps supposed to be doubled on the ends? Looks like those could be a baking error.

    Also, pior has offered to take a look at your meshes & process. Even if you feel like you're done with this asset, I would recommend taking him up on the offer. pior has a ton of skill and knowledge, don't miss out on a great opportunity!
  • shaia
    Options
    Offline / Send Message
    Wow sorry I didn't mean to ignore you @pior , I just seen that you posted a message too!

    I checked at your workshop submissions and wow, what an amazing job you did!

    I am sending you the OBJ file with private message.

    @Eric Chadwick no the straps are not supposed to be doubled, but I was happy enoough to have this first problem solved :)

  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Heya - Well, I meant it as in uploading it to the thread, so that the discussions/suggestions can have something to be based upon :)

    [edit] Anyways : 


    Might also want to link to the original public model as provided by the game studio.
  • shaia
    Options
    Offline / Send Message
    @pior Sorry I modified the High Poly version in my blend file and forgot to update the OBJ file, here is the right positioned high-Poly OBJ:
    https://file.io/ATwKsGaw8gKb

    Here is the public .OBJ model provided by game studio:
    https://file.io/XxoS7rCZbnyo
  • shaia
    Options
    Offline / Send Message
    Hey again,

    To update on this case, I managed to get this bake done properly with a custom cage:
    Now everything seems to be working just fine!

    Thanks again to all of you, you rock!  B)
Sign In or Register to comment.