Home Technical Talk

Normal Errors in XNormal

polycounter lvl 5
Offline / Send Message
Fogbrain polycounter lvl 5
Hey guys, I'm in a real hard spot. I've got these models due by tomorrow and I'm freaking out a bit. I've set up the bake for the hi to lo in Xnormal and I keep getting these errors of what appears to be other models imprinting normals onto others. So I tried to separate the objects and allow the bake to have enough space to do everything it needs to but I keep getting these errors. I'm absolutely terrible at baking.

https://www.dropbox.com/sc/p05bg635yql04ek/WB1p3JXdEe

Here's the dropbox album for viewing, and also includes the UV layout to determine if the problem lies there.

I'm using xNormal to bake out with a value of 16 for edge padding on a 4K texture map, with 4x anti-aliasing with calculated ray distance.

I can also include the normals if anyone wants to see them.

Thankyou for any help provided :)

Replies

  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    Looks like you need to set up a cage. You can do it in your software of choice or within xNormal.

    http://wiki.polycount.com/NormalMap?highlight=%28\bCategoryTexturing\b%29#Working_with_Cages

    The ray distance calculator starts to lose functionality if the model has small complex parts or large gaps between sections (like the space between a character's arm and ribs). A cage remedies these issues in most cases.

    Also make sure your model's hard edges match your UV texture borders otherwise your normals won't bake properly no matter how hard you try.

    Additionally, it seems you might have some overlapping UVs down at the bottom there. Stacked UVs will cause conflicting bakes in that area. Avoid this by offsetting stacked or overlapping UVs by 1 unit in any direction.
  • Fogbrain
    Options
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Bartalon wrote: »
    Looks like you need to set up a cage. You can do it in your software of choice or within xNormal.

    http://wiki.polycount.com/NormalMap?highlight=%28\bCategoryTexturing\b%29#Working_with_Cages

    The ray distance calculator starts to lose functionality if the model has small complex parts or large gaps between sections (like the space between a character's arm and ribs). A cage remedies these issues in most cases.

    Also make sure your model's hard edges match your UV texture borders otherwise your normals won't bake properly no matter how hard you try.

    Additionally, it seems you might have some overlapping UVs down at the bottom there. Stacked UVs will cause conflicting bakes in that area. Avoid this by offsetting stacked or overlapping UVs by 1 unit in any direction.

    So basically I have my low poly mesh over the high poly mesh? Which is pretty much what I've done, so in that case should I click the checkbox that says 'Use Cage' in xNormal? Or is there any other additional things I gotta do?

    Also with any hard edges on the model I've split them in the UV, or should I split all the UV's into their own separate islands for the low poly mesh? What I've done is I've split the UVs on edges like for instance the edges of the box, similar to if you split the UVs of a cube to bake the hard edges. Is this correct?

    As for the overlapping UV's, those objects are models that aren't being baked. Which should be okay.
  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    your LP should match your HP topology as closely as possible, and your cage should be pushed out far enough to fully encapsulate the HP.

    It's a general rule of thumb (there are other rules and exceptions) to create hard edges wherever you have texture seams and vice versa. Since you always harden 90 degree corners and other harsh angles, you would also cut a texture seam there. Make sure all your UV shells are not touching each other.

    For example, a simple cube, properly unwrapped for normal mapping, would have 6 individual UV shells, one for each side.

    Check out this thread for a very detailed and technical breakdown of normal mapping and how it relates to UV shells, hard edges, and vertices:

    http://www.polycount.com/forum/showthread.php?t=107196

    This should help you get a solid understanding of how to properly bake normal maps.
  • PyrZern
    Options
    Offline / Send Message
    PyrZern polycounter lvl 12
    This might help you. It has helped me greatly. If you don't use ZBrush, you can adjust the cage yourself. Technically, The Low Poly is matching the High Poly. The Cage (duplicated from LowPoly) is bigger than everything else and it should cover the whole High Poly without overlapping itself ever.


    661c9e322ac28aaa58d88973162642ca.jpg
  • Fogbrain
    Options
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Thanks for all the tips guys. It's making my head explode :S haha, so Ive shrunk all my low poly meshes down to closely match the size of my high poly. I will then duplicate the mesh, triangulate it and inflate it.

    Then do I save the cage out and use that as the xnormal low poly? Is triangulating necessary?
  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    You will have three models to load into xNormal: HP, LP, and your cage. To assign a cage to your LP, right click on the LP slot in xNormal and choose Browse External Cage File. You will get a prompt that just says to make sure the LP and C have identical vertex counts, which they should unless you modified your cage with modeling tools (extrude, delete component, etc.)
  • PyrZern
    Options
    Offline / Send Message
    PyrZern polycounter lvl 12
    In my workflow, I have 4 pieces together. HiRes, LowPoly Quads, LowPoly Tris, and LowPoly Tris Cage.
    I use Tris and Tris Cage to bake HiRes. Then apply the texture to the Lowpoly Quads.
  • Fogbrain
    Options
    Offline / Send Message
    Fogbrain polycounter lvl 5
    So I followed along with what you guys said and followed PyrZern's advice,

    I triangulated my objects, which are a new separate set of objects under their own group. Then took each one into Zbrush and inflated them to create them as cages which were also saved into their own separate files and groups. (i.e. ChiselBox_TriCage) and I sent into xnormal and tried to bake but I can't even do it because it says the vertex face is different (the external tri cage files) to the original low poly mesh, which was the tri objects.

    I'm feeling like I've exhausted every possible option here.
  • EarthQuake
    Options
    Offline / Send Message
    You can create a cage directly in xnormal, by going into the 3d viewer and setting it up there. I wouldn't bother with the zbrush thing, that seems like a lot of hassle for what you're doing.
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    PyrZern wrote: »
    In my workflow, I have 4 pieces together. HiRes, LowPoly Quads, LowPoly Tris, and LowPoly Tris Cage.
    I use Tris and Tris Cage to bake HiRes. Then apply the texture to the Lowpoly Quads.

    I would NOT apply your bake to low poly quads. Your triangle orientation from the bake should exactly match the triangle orientation of the model it is applied to. Leaving your low poly as quads will force whatever 3D program it is viewed in to triangulate in its own way, which may result in a triangle orientation mismatch. It is a good habit to get into that you just always display your bakes on triangulated objects.

    TLDR: Apply your normaml map bake to the triangulated object. Leave a clone of your low poly in quads for editing purposes.

    Fogbrain, what 3D package are you using? Only zbrush?
  • D4V1DC
    Options
    Offline / Send Message
    D4V1DC polycounter lvl 18
    Isn't there a problem here in that if you unwrap your quad mesh wouldn't the unwrap get f.u.b.a.r.d. when you tried to bake the triangulated version since the edges where changed from what the quad-ed triangle orientation was before you triangulated the flow by hand?

    I do what EQ says just use xnormal it is a hassle yes, but screw it, you get it done right you don't have to mess with anything else.
    Also if you rather not keep the Quad that screws everything up will you still have problems if you decided to just use the triangulated mesh instead of going back to the quad.

    To add isn't there also a script to de-triangulate the triangulated mesh, does it keep the orientation that would help with triangle quad situation out.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    D4V1DC wrote: »
    Isn't there a problem here in that if you unwrap your quad mesh wouldn't the unwrap get f.u.b.a.r.d. when you tried to bake the triangulated version since the edges where changed from what the quad-ed triangle orientation was before you triangulated the flow by hand?
    No. Triangulation does not alter your UV's. It's easier to work in quads; triangulate on export so you bake with the same triangulation the final model will have.
  • Fogbrain
    Options
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Quack! wrote: »
    I would NOT apply your bake to low poly quads. Your triangle orientation from the bake should exactly match the triangle orientation of the model it is applied to. Leaving your low poly as quads will force whatever 3D program it is viewed in to triangulate in its own way, which may result in a triangle orientation mismatch. It is a good habit to get into that you just always display your bakes on triangulated objects.

    TLDR: Apply your normaml map bake to the triangulated object. Leave a clone of your low poly in quads for editing purposes.

    Fogbrain, what 3D package are you using? Only zbrush?

    Using Maya 2013 and Zbrush for the inflation thing, but trying that last night just got me the error message that I got in the last post.

    Unfortunately I began learning in Maya and I'm frankly sick of it. Making the switch to max or modo this year.

    Is XNormals cage good enough? Or should I carry on with making a cage? I'll post results of the latest bake soon.
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    You should make your cage in your 3D package, it is by far the easiest way to do it. xnormals works fine if you can wrangle the nasty ui beast. I just wouldn't use zbrush for anything like that.

    Duplicate the finalized low poly, use a 'push' modifier equivalent in Maya (http://bit.ly/MkqRnb). Cover your high with the cage. Export the 3 seperate files.
  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    Quack! wrote: »
    Duplicate the finalized low poly, use a 'push' modifier equivalent in Maya (http://bit.ly/MkqRnb).

    Edit Mesh > Transform Component, pull out by Z axis; modify individual verts as necessary
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    Bartalon wrote: »
    Edit Mesh > Transform Component, pull out by Z axis; modify individual verts as necessary

    Perfect! Thanks.
  • Fogbrain
    Options
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Success! The bake turned out okay using the cage method, and a redo of one bad low poly.

    Capture.JPG


    Actually it looks great. I'm happy with it. I learned alot with this one. Thanks guys.
Sign In or Register to comment.