Home Technical Talk

normalmap shifted at uv seam

polycounter lvl 10
Offline / Send Message
toolpaddz polycounter lvl 10
Hey folks,

I came upon an issue I've never encountered before and wasn't able to solve yet. Maybe you can help?
mlg6cx5r.jpg

The texture is shifted at the uv seam though both lowpoly and highpoly are aligned perfectly fine.

The seam is smoothed edge, so no SG split there. However, the same texture shift comes up with split SGs.

It seams to me this is a problem of the cage - it basically seems like skewing - but the cage is averaged and looks perfectly fine as well. Support geometry didn't change anything, too.

Replies

  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    can you post that same shot with wires turned on and also a pic of the UVs in that area? Also, what are you baking in? One possibility is that there is some odd geometry in that spot and it is projecting at a weird angle. Check for a hidden vert or double edge.
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    Hi Alec, thanks for the answer! Baked in xNormal.

    Here's the wireframe and the uvs (there's a blue edge marked because the left part is mirrored and the respective poly on that side is selected, too):

    sjcgl7vp.jpg
    optvos7h.jpg

    Unfortunately, I already checked the geometry for errors a few times and there are none. When moving the verts in the uv layout just for checking, everything seems alright, too.
    What I actually did after unwrapping it was changing the triangulation of a few quads in that area, but
    a) this did not seem to produce the error as I flipped them and rebaked - no change in the bake - and
    b) I never read of the triangulation being able to do such things when played with. I could imagine, however, that the UV space of the texture would somehow be stretched/distorted, thus causing the problem. But a) seems to rule that solution out, too...

    I'm really at my wit's end...
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    triangulation can affect a projection in xnormal since it disturbs the normal- however, if the cage is averaged, it shouldn't be creating a seam like that.
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    i just did a testbake in 3ds max and it solved the issue. As I split the model apart into more than 50 parts to be able to explode it properly, I'd really like to know what to do to get it right in xNormal, though. The cage should be averaged when exporting the mesh with a projection modifier as .sbm, shouldn't it?
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    Btw I came across some weird triangulation issues in xNormal today when testbaking another object. As xNormal requires the mesh to be an editable mesh, before exporting, the editable poly must have both editable mesh and projection modifier, right? However, the editable mesh modifier somehow seems to change triangulation and/or normals as I had really weird artifacts in some spots on the mesh showing exactly the form of a meshs triangles. This seems somehow suboptimal... Is there another way to export an .sbm without conversion or an editable mesh modifier?

    Manually exporting a cage always throws me the error in xNormal that the cage has different vert count. I tried playing around with the bools in the xNormal triangulator plugin as somewhere stated by Santiago, but that did not solve the vert count error.
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    Not sure on that one. Are you exporting the cage as a separate mesh and then impoting into xnormal and hitting the "use cage" checkbox? You can make a cage inside in the xnormal 3d viewer. The interface is really cumbersome but the result is averaged and you don't need to deal with xnormal rejecting cage meshes.
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    I might be wrong but- I don't think exporting an SBM of a single model with a projection modifier ontop will include the cage. If it does work, at the least it looks like it isn't averaging the cage. I have also had issues with xnormal accepting cages. It works best for me when both models are force triangulated.
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    yeah i know that, but that costs a lot of time when doing several testbakes... always opening up the viewer, adjusting the cage manually, exporting, etc.
    3ds Max's normal map seems to be generally a lot better this time. There were several minor issues that seemed to be solved as well with Max's bake. It really seems to me that xNormal is not reading the mesh correctly, most likely the triangulation and mesh normals. And this applies to both .fbx and .sbm. I wonder why?
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    AlecMoody wrote: »
    I might be wrong but- I don't think exporting an SBM of a single model with a projection modifier ontop will include the cage. If it does work, at the least it looks like it isn't averaging the cage. I have also had issues with xnormal accepting cages. It works best for me when both models are force triangulated.

    It does export the cage and it even looks exactly as the one generated in xNormals 3d viewer. As stated above, I believe this is rather an issue of the way xNormal imports and processes the given meshes. how do you generally force triangulate without using editable mesh? I tried Editable patch but it is really buggy and crashes Max a lot. Is there another way without sacrificing the editable poly? Oh before I forget: the .fbx export (latest version, 13.1 I think) "triangulate" option doesn't work for me. Strange as well...
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    You can select all the verts and hit connect inside editable poly. You do lose your quads. I usually do it on a copy that I keep in another layer. Some game engines don't respect triangle orientation so you will likely want to force triangulate at some point anyway.
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    that's nice - I didn't know that! Will try and report back tomorrow (it's close to midnight here in middle europe) if it changed anything with the xNormal bake. Hope you stay tuned, so we may continue the discussion tomorrow? Thanks again for the useful input already!
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    hm couldn't wait and testet it out right away, to no luck. Didn't seem to change anything, neither with fbx and manually done cage (in xNormal), nor with the .sbm export.
    From what I noticed when comparing the two baked normalmaps of 3ds Max and xNormal was that the xN one seems not only to shift the texture at the seam but in general. All shells, the whole texture, seems to be offset 1px to the bottom left... I will email Santiago about this, so he can take a look. Maybe he's got some insider advice.
  • Rob_Blight
    Options
    Offline / Send Message
    Are you making the cage properly inside xnormal? 3D viewer > click show cage checkbox, then push the cage out a bit, then click save and click "yes" to the auto-allocate box that pops up. Then bake. I was getting similar issues, but finally got perfect bakes after learning to do this.

    On a side note those UVs are quite impressively packed. Is there enough padding between the shells?
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    Thanks Rob!
    Rob_Blight wrote: »
    Are you making the cage properly inside xnormal? 3D viewer > click show cage checkbox, then push the cage out a bit, then click save and click "yes" to the auto-allocate box that pops up. Then bake. I was getting similar issues, but finally got perfect bakes after learning to do this.
    Yes, that's how I do it. I don't want to sound presumptuous, but is there another way of making the cage in xNormal?
    On a side note those UVs are quite impressively packed. Is there enough padding between the shells?
    Thanks, I think I spent over 12 hours for this (exterior of a helicopter) and another 8 or so for the interior which you don't see... Much too long in my opinion, but this aims for portfolio, so it had to be as best as I could do it.
    Padding is 2 pixels for each shell at a 2k res, so effectively there should be 4 pixels of free space between the shells. There will be a 4k map for close-up shots though.
    I never had any padding related issues until now, so I hope this is sufficient?!
  • toolpaddz
    Options
    Offline / Send Message
    toolpaddz polycounter lvl 10
    Thanks Dustin,

    there's a uv seam there, so the checker map will not align. As for if it is only the normal map causing the problem: yes, I think so. It is only the one baked by xNormal as stated above. The 3ds max bake is perfectly aligned.

    I reset the normals various times already, even tried modified explicit normals - to no avail.
  • Rob_Blight
    Options
    Offline / Send Message
    toolpaddz wrote: »
    I don't want to sound presumptuous, but is there another way of making the cage in xNormal?
    No, but I made the mistake in the past of not doing each step correctly and it ended up not using the cage, so it could have been that.

    If you're doing everything right, it might be down to some issue with the low poly itself, as dustin suggested. Try looking for duplicated verts, reset xform, apply the normal modifier twice, export then re-import the model, etc. If all else fails, rip out and re-make those polys or upload the low poly so someone else can check it out.
    toolpaddz wrote: »
    Thanks, I think I spent over 12 hours for this (exterior of a helicopter) and another 8 or so for the interior which you don't see... Much too long in my opinion, but this aims for portfolio, so it had to be as best as I could do it.
    Padding is 2 pixels for each shell at a 2k res, so effectively there should be 4 pixels of free space between the shells. There will be a 4k map for close-up shots though.
    I never had any padding related issues until now, so I hope this is sufficient?!
    The packing is great, but it might be a bit close. Even if you have 4 pixels padding, as soon as the engine starts using mip maps you'll start to get bleeding on the second or third mip. Might not show up now, but once you get more high contrast areas in the texture I would be surprised if it doesn't show. Further info here: http://wiki.polycount.com/EdgePadding
Sign In or Register to comment.