Home Technical Talk

I thought I was done with you normal seams...

polycounter lvl 5
Offline / Send Message
dproeder polycounter lvl 5
Pictures are worth a lot more than words:

Issue:

seams.JPG


Highpoly:
highpoly.JPG


Lowpoly:
lowpoly.JPG


UV Layout:
uv.JPG


Normal Map Result using Xnormal:
normal%2520map.jpg



The only thing I can think of is the bevel on the high poly is too severe to be captured by the 90 angles of the low poly.

Replies

  • respawnrt
    Offline / Send Message
    respawnrt polycounter lvl 8
    Any reason why some of you use maya but bake in xnormal thing ? I'd think you didn't used an averaged cage ?
  • ahtiandr
    Offline / Send Message
    ahtiandr polycounter lvl 12
    I was baking some hard surface resently and I got similar issues. Make sure to set your lowpoly mesh normals to smooth in maya and then try to bake.

    I am using Xnormal btw.
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    Nah that is wrong. As a rule of thumb, Every edge that has a UV seam should be hardened as well. If not, you get uneven baking artifacts as seen here....

    chestnormal_normals.jpg

    edit: And the seams sill persists as well.
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    A lot of people from a lot of different packages use Xnormal to bake. I've found that it just gives the fastest and cleanest bakes. Plus it handles super high poly sculpts really well and doesn't lag out.
  • Olli.
    Offline / Send Message
    Olli. polycounter lvl 8
    sometimes you get seams.. you just cant fix them. they happen.

    what you can do is place the seams somewhere theyre not very visible, or try using some other baking method, since seams appear differently using different methods (xnormal, max/maya cage bake, projection bake etc)
  • ahtiandr
    Offline / Send Message
    ahtiandr polycounter lvl 12
    Hm strange but when I got hard normal then the bake was with artefacts and with smooth normals it was fine. Also check some tutorials about normal map baking from 3d motive. There are a lot of good info. Also try to add extra edges in the corners so you dont have 90 angle

    http://www.3dmotive.com/training/3ds-max/baking-tips-and-tricks/?follow=true

    Here is my test

    2dqrd3t.jpg
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    Olli. wrote: »
    sometimes you get seams.. you just cant fix them. they happen.

    what you can do is place the seams somewhere theyre not very visible, or try using some other baking method, since seams appear differently using different methods (xnormal, max/maya cage bake, projection bake etc)


    Ah. Well the seams are only really bad when see them up close and at a certain angle. I'll just live with them I guess.
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    ahtiandr wrote: »
    Hm strange but when I got hard normal then the bake was with artefacts and with smooth normals it was fine. Also check some tutorials about normal map baking from 3d motive. There are a lot of good info. Also try to add extra edges in the corners so you dont have 90 angle


    Ehhh that smoothed one looks terrible. I've seen the 3dmotive tuts. Adding extra geometry just seems like a waste of tris. Thanks for taking the time and replying though. :)
  • ahtiandr
    Offline / Send Message
    ahtiandr polycounter lvl 12
    ok I see what you mean now. Actually I can notice same artefacts on my other meshes now( I am looking at your model and one idea come to mind. What if you bake everything apart from the edges ? So you will have all year high details in the center and then the edges will be clean .
  • choco
    Offline / Send Message
    choco polycounter lvl 10
    It seems like it works fine for me.
    I did a quick test on a cube which has its normals set hard edge. (baked in maya)

    maya_bake.jpg

    maya_bake_Nrm.jpg
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    choco wrote: »
    It seems like it works fine for me.
    I did a quick test on a cube which has its normals set hard edge. (baked in maya)



    Yeah I've done multiple bakes for Hard surface models, and I haven't had this problem in a long time.
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    ahtiandr wrote: »
    ok I see what you mean now. Actually I can notice same artefacts on my other meshes now( I am looking at your model and one idea come to mind. What if you bake everything apart from the edges ? So you will have all year high details in the center and then the edges will be clean .


    If you do that, then you miss out on the nice smooth, beveling on those hard, garish edges.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    i guess im just one of those lucky bastards that doesn't get this issue.

    baked_cube.jpg

    i cheated a little, it is a beveled cube that i baked too, but it is unwrapped with the basic T unwrap for a cube.

    all of my uv seams have hard normals, and to get rid of the gradients in the normal map along the flat faces, i edited the vertex normals, on all 6 of the large faces.
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    passerby wrote: »
    i guess im just one of those lucky bastards that doesn't get this issue.



    i cheated a little, it is a beveled cube that i baked too, but it is unwrapped with the basic T unwrap for a cube.

    all of my uv seams have hard normals, and to get rid of the gradients in the normal map along the flat faces, i edited the vertex normals, on all 6 of the large faces.


    Well baking to a beveled low poly kinda defeats the purpose of solving this quandary. This method would not work on a more complex hard surface model (or would be too time consuming...or really up the Tri Count).

    What do u mean you edited the vertex normals? If the edges of your UV seams are hardened, the gradients shouldn't show up anyways.

    Did you have UV splits at every hard 90 angle?
  • |MM|
    1.What settings did you use?
    Did you use cage? If not, do.

    You are always gonna get shading seams if you use normal mapping
    to represent smooth edges.

    If you want to use your model in any engine, test the normal map in the engine not in Maya viewport.


    BTW These are both baked in Xnormal the one one the left has hard edges
    so 24 verts, the one on the right has 8 verts (the normal map is overriding smooth normals)




    screenshot0038h.jpg
  • choco
    Offline / Send Message
    choco polycounter lvl 10
    Here you can use this cool script which allows you to tweak your hard edges vertex normals and get something between smooth edged and hard edged.
    Works great to reduce the distortion on your normal map bakes.

    http://www.castorlee.com/maya-tools/vertex-normal-control

    I tried it with UDK and it gave me the exact same results shown in maya. (no seams whatsoever)

    Make sure to normalize your normal maps exported from maya before importing into UDK btw.

    udk_normals_02.jpg

    udk_normals.jpg
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    dproeder wrote: »
    Well baking to a beveled low poly kinda defeats the purpose of solving this quandary. This method would not work on a more complex hard surface model (or would be too time consuming...or really up the Tri Count).

    What do u mean you edited the vertex normals? If the edges of your UV seams are hardened, the gradients shouldn't show up anyways.

    Did you have UV splits at every hard 90 angle?


    don't really see how it defeats the purpose, since it is a very small amount of additional geometry, which allows me to not have to spilt my uv's in as many places, so fewer hard edges with spilt verts.

    it's vert count is only slightly higher, and im actually using those extra verts, to give a better silhouette.

    and tranfers to udk fine too, just using fbx export and makeing sure export bi-normals and tangets is checked off in the fbx settings.

    and the edits i did to the vertex normals is very much a automated process, i jsut got to select a few faces, and run the script.

    also i have done it your way basic cube 6 uv islands, all uv borders hard edges, and with both xnormal and transfer maps i can get it seamless.
  • metalliandy
    Offline / Send Message
    metalliandy interpolator
    dproeder wrote: »
    Nah that is wrong. As a rule of thumb, Every edge that has a UV seam should be hardened as well. If not, you get uneven baking artifacts as seen here....

    chestnormal_normals.jpg

    edit: And the seams sill persists as well.

    It's not wrong, it's just not ideal ;) You don't necessarily need to add hard edges to your UV island borders (though it doesn't hurt to or cost any more) as long as the baker and renderer match 100% and though it's preferable for texturing and increasing interoperability between baker and engine, it isn't 100% needed.

    You are getting the skewing because the bake isnt capturing evenly. Adding some loops close to the edge will fix that.
    dproeder wrote: »
    Ehhh that smoothed one looks terrible. I've seen the 3dmotive tuts. Adding extra geometry just seems like a waste of tris. Thanks for taking the time and replying though. :)
    dproeder wrote: »
    Well baking to a beveled low poly kinda defeats the purpose of solving this quandary. This method would not work on a more complex hard surface model (or would be too time consuming...or really up the Tri Count).

    What do u mean you edited the vertex normals? If the edges of your UV seams are hardened, the gradients shouldn't show up anyways.

    Did you have UV splits at every hard 90 angle?
    Adding bevels to this object will cost no more than having a cube with all hard edges. It's the vert count that matters...tris are only a guide. Plus the vert/tri count on this asset is so negligible that it's hardly worth worrying about :)

    This could be down to the fact that xNormal and Maya have different tangent baseis, so even if you you add hard edges, there is still a difference and therefore the potential for error.
    Did you triangulate your mesh before exporting and baking in xNormal? xNormal automatically triangulates all the meshes before baking so unless you are using a triangulated mesh in Maya and xNormal (the same geometry as was used to bake the normal map) then there is also more room for error as the geometry used to bake the normal map with is different to the mesh in which you are displaying the normal map on.
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    Thanks Andy for weighing in. I'm getting more confident with normal baking, but there are always exceptions to the rules that I sometimes forget to consider.

    And I agree that adding bevels to this simple washing machine object would solve all these problems. I just tend to shy away from situational fixes right now since I'm still trying to push my craft. Adding bevels to a more complex model with many, many more hard edges wouldn't be prudent, and that is all I was saying. Unless I am wrong on that as well.

    Is it possible to import a custom bake cage in Xnormal?

    In the end, I think I'm just going to use both Maya and Xnormal to bake, and use the better result for each piece of my current project as seen here...

    http://www.polycount.com/forum/showthread.php?t=99612
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    dproeder wrote: »

    And I agree that adding bevels to this simple washing machine object would solve all these problems. I just tend to shy away from situational fixes right now since I'm still trying to push my craft. Adding bevels to a more complex model with many, many more hard edges wouldn't be prudent, and that is all I was saying. Unless I am wrong on that as well.

    It is always situational.

    Adding bevels is sometimes the way to go if you can avoid a uv split and hard edges. Sometimes it's better to not have hard edges and no bevel. Especially for an object made of lots of tiny pieces.

    It's all about the vertex count and which result produces the best result for the fewest vertexes.

    And a lot of game engines will draw a jagged aliased edge wherever there is a uv or smoothing split even with a perfect normal map. So hard edges aren't the best looking option in most cases.
  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    Andy wins the thread..!
    dproeder wrote: »
    Is it possible to import a custom bake cage in Xnormal?

    Yup. Export a copy of your lowpoly model pushed outwards in the way Max's projection cage needs to envelope the highpoly, and set it as 'external cage file' in the 'low definition mesh' dialog of the mesh you're baking to. You might have to set your self-made cage mesh to use a single smoothing group, not sure whether xNormal automatically averages imported cages.

    Then there's also xNormal's built-in cage tool in the 3d viewer, but yeah. Don't use that.
  • choco
    Offline / Send Message
    choco polycounter lvl 10
    You can easily get your cage in maya by using the display "both" option in maya transfer maps option.
    When you enable display both, you can then select the cage shown with a red translucent material export selected.

    maya_bake_cage.jpg
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    Ah yes. I had worked with the maya transfer maps tool before. Never thought of exporting the cage they make for you. Very handy shortcut.
  • metalliandy
    Offline / Send Message
    metalliandy interpolator
    dproeder wrote: »
    Thanks Andy for weighing in. I'm getting more confident with normal baking, but there are always exceptions to the rules that I sometimes forget to consider.
    No problem :)
    Sorry for the late reply.
    dproeder wrote: »
    And I agree that adding bevels to this simple washing machine object would solve all these problems. I just tend to shy away from situational fixes right now since I'm still trying to push my craft. Adding bevels to a more complex model with many, many more hard edges wouldn't be prudent, and that is all I was saying. Unless I am wrong on that as well.
    You just need to avoid 90° angles if you can as they are not ideal for capturing some details. You can do this either adding bevels or increasing the angles of some parts so that thy are more suitable for baking.

    I wouldn't count adding the loops to the edges where you are getting skewed bakes a situational fix (if that is what you meant) as it's a smart thing to do because its efficient and fast way to solve a problem. You may only realise that you are getting issues once all your UV's are done and it's a great way to solve the problem without having to spend too much time changing other stuff to the same end, which could take substantially longer to do.
    It's always better to change the geometry on your mesh to fix any issues you are having, rather than painting out details etc. as if other people have to work on your asset after you are done, then they don't have to spend time painting out errors etc.
    dproeder wrote: »
    Is it possible to import a custom bake cage in Xnormal?

    In the end, I think I'm just going to use both Maya and Xnormal to bake, and use the better result for each piece of my current project as seen here...

    http://www.polycount.com/forum/showthread.php?t=99612
    One thing to remember with xNormal is that the "Custom Cage" needs to have exactly the same topology as the LP mesh and even if 1 vert. is different, then the bake will fail and you will get an error.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    i wouldn't shoot any method or idea down for being "Situational" since a large part of 3d is knowing about a variety of methods to accomplish something, and using what is best in your situation.
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    passerby wrote: »
    i wouldn't shoot any method or idea down for being "Situational" since a large part of 3d is knowing about a variety of methods to accomplish something, and using what is best in your situation.


    Right on. I ended up having a beveled cube for the washing machine mesh. And will probably start using beveled edges on my low poly meshes a lot more generously (by generous I mean from "never" to "Ok so they aren't the devil) .
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    No problem :)

    I wouldn't count adding the loops to the edges where you are getting skewed bakes a situational fix (if that is what you meant) as it's a smart thing to do because its efficient and fast way to solve a problem. You may only realise that you are getting issues once all your UV's are done and it's a great way to solve the problem without having to spend too much time changing other stuff to the same end, which could take substantially longer to do.



    Nah wasn't talking about using support loops near Hard Edges. I was just talking about beveling every hard edge on a model with complex shapes comprised of many many hard edges.

    I know that tris arn't the be all, end all in optimization measurement. All the verts on the border of a UV island, and all the verts in the actual model are what counts?

    So really, you could use beveling to get rid of many unnecessary UV islands, and in turn have better damage control of your vert count.

    I will be running tests and applying these lessons on this project if anyone cares to follow.

    http://www.polycount.com/forum/showthread.php?t=99612
  • ahtiandr
    Offline / Send Message
    ahtiandr polycounter lvl 12
    I am texturing low poly sword atm and I also have some hard edge problems here. I decided to build my normal map in layers. So there are many layers with details but the main shape has no normals because it does not need to have them. Some details were done in ps with Ndo app and some were done in Xnormal after sculpting in zbrush.

    scaled.php?server=213&filename=normalsissue.jpg&res=landing
  • Will Faucher
    Offline / Send Message
    Will Faucher polycounter lvl 12
    So... what exactly is your problem? Not sure what the question is here...?
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    Problems Solved. I ended up using a beveled Low Poly Cube with Support Loops to create even normals on the flat surfaces.

    supportloopsscreenshot.JPG

    supportloopsnormal.jpg



    Turns out I had one setting wrong in my Maya Transfer Maps tool. I had it set to "Surface Normals"
    mapswindow.JPG



    Now I'm just wondering if I am stuck with the support loops causing extra geometry on my low poly cube. When I delete them, I get:
    withoutsupportloopsscreenshot.JPG



    I have the vertex normal script installed, and I am going to mess with that to see if I can get even bakes without the support loops.
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    passerby wrote: »

    and the edits i did to the vertex normals is very much a automated process, i jsut got to select a few faces, and run the script.


    Hey Passerby, is this script public, integrated into maya, or something personal you created? I would like to mess around with it. As my understanding of editing vertex normals stands now its basically limited to....
    normalsmenu.JPG
  • dproeder
    Offline / Send Message
    dproeder polycounter lvl 5
    And Since there are so many Maya Users in this thread, I found this script on the forums the other day. Forgot who made it, but I give him props.

    It automatically hardens UV border edges, and softens the rest.

    string $objList[] = `ls -sl -o`; string $uvBorder[];
     string $edgeUVs[];
     string $finalBorder[];
      for ($subObj in $objList) {
     select -r $subObj;
     polyNormalPerVertex -ufn true;
     polySoftEdge -a 180 -ch 1 $subObj;
     select -r $subObj.map["*"];
      polySelectBorderShell 1;
      $uvBorder = `polyListComponentConversion -te -in`;
     $uvBorder = `ls -fl $uvBorder`;
      clear( $finalBorder );
      for( $curEdge in $uvBorder ) {
     $edgeUVs = `polyListComponentConversion -tuv $curEdge`;
     $edgeUVs = `ls -fl $edgeUVs`;
      if( size( $edgeUVs ) > 2 ) {
     $finalBorder[ size( $finalBorder ) ] = $curEdge;
     }
     }
      polySoftEdge -a 0 -ch 1 $finalBorder;
     }
      select -r $objList;
    
  • ZacD
    Offline / Send Message
    ZacD ngon master
    Never ever edit the model after baking UV's, it will only break stuff. You should be able to bake a beveled cube without support loops without errors if they render and baker are synced.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    ya i use 2 main scripts with my lowpoly

    the first is for make all my UV edges hard
    string $objList[] = `ls -sl -o`;
    string $uvBorder[];
    string $edgeUVs[];
    string $finalBorder[];
    
    for ($subObj in $objList) {
    select -r $subObj;
    polyNormalPerVertex -ufn true;
    polySoftEdge -a 180 -ch 1 $subObj;
    select -r $subObj.map["*"];
    
    polySelectBorderShell 1;
    
    $uvBorder = `polyListComponentConversion -te -in`;
    $uvBorder = `ls -fl $uvBorder`;
    
    clear( $finalBorder );
    
    for( $curEdge in $uvBorder ) {
    $edgeUVs = `polyListComponentConversion -tuv $curEdge`;
    $edgeUVs = `ls -fl $edgeUVs`;
    
    if( size( $edgeUVs ) > 2 ) {
    $finalBorder[ size( $finalBorder ) ] = $curEdge;
    }
    }
    
    polySoftEdge -a 0 -ch 1 $finalBorder;
    }
    
    select -r $objList;
    

    than i use a other script, which is a bit more situational which adjusts the vertex normals around a face to point in the same direction as the face normal, i find this one useful to use on the flat faces of beveled shape, so they get flat shading in the normal map instead of causing a gradient.
    global proc pbFacetoVertNRM() {
    
    
        string $Fs[] = `filterExpand -sm 34`;
        select -cl;
        for ($F in $Fs) {
            select -r $F;
            string $normals[] = `polyInfo -faceNormals`;
            string $buffer[];
            tokenize $normals[0] $buffer;
            
            float $plane[3];
            $plane[0] = $buffer[2];
            $plane[1] = $buffer[3];
            $plane[2] = $buffer[4];  
            PolySelectConvert 3;
            polyNormalPerVertex -xyz $plane[0] $plane[1] $plane[2];
            }
    }
    pbFacetoVertNRM();
    

    and the odd time , will just edit normals by hand using Mig Normal Tools and mayas built in tools
Sign In or Register to comment.