Home Technical Talk

Normal Map Distortion: Zbrush Generating bad normal map

As the title says, ZBrush keeps generating a bad normal map. The piece of geometry is clean, and was made in 3DSMax then imported into ZBrush. This was just a test run to see how the normals were working and with some subdivisions and quick alpha drags.

I used Zbrush to generate UV's and then used the Multimaper to create a normal map. I'm not sure why but it keeps generating a weird border in the normals. I took it into Marmoset to see how it would actually look on the model and well... it looks exactly like the map shows it would. Weird distortions along the edges and border.

Does anyone know what would be causing this? The distortion was a lot worse, but then i turned on adaptive to get better results, and it's still there.
pAc4D5N.jpg

Replies

  • Uhni20
    Options
    Offline / Send Message
    The problem is happening again, on a different piece of geometry. It's very frustrating because i don't know what the core problem is. Just like the other peice of geometry I made this one in 3DSMax, Imported it into Zbrush, added some subd's and a quick alpha texture, used UVMaster, then the Multimap exporter. I imported the results into Marmoset and it's the same problem weird problem.

    On this piece i had it in 2 polygroups, but i combined before multimapping. It also had a Geometry> Creased Edge, but i took that off as well prior to multimapping.

    Here you can see the low res poly and high res deform (Image 1), The Normal Map (Image 2), Export Settings (Image 3), How it looks in Marmoset with normal map (Images 4,5,6)


    pleaseeeeeeeeeeeeeeeeeeeeeeee helppppp
    w5bKvAI.jpg
  • Uhni20
    Options
    Offline / Send Message
    The faceting is fine, that's not what bothers me. I can fix the faceting quiet easily, right now i'm mostly trouble by these weird edge distortions that are being generated. I want the normal map geometry to look exactly like the higher res model, with the facets. I do not want these random harsh lines that are being generated along the edges thought.

    My process has been the following:
    - Make basemesh in MAX
    - Import mesh into Zbrush
    - Subdivide, add detail, crease edges and add polygroups where needed
    - Use UVMaster
    - Remove polygroups/creases (to prep for Multimapper because i'm not sure if that might be whats causing problems)
    - Use Multimapper with normal map and mesh being exported - Turn ON Adaptive, Tangent & SNorm smooth
    - Import to Marmoset
    - View Results
    - Get frustrated because it generates random distortions
  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    From my experience, ZBrush is really terrible at baking normal maps in cases with sharp edges. The problem stems from ZBrush wanting to put the entire model on a single smoothing group, when this simply isn't how baking normal maps works in many cases. Those harsh outlines you showed in your first post are due to the normal map trying to compensate for light spreading across a 90 degree corner (from smooth normals), which shouldn't ever happen.

    As I said before, it's been a while since I baked a normal map in ZBrush, but I believe the distortions at the corner points of your model are being caused by the SmoothUV option being enabled.

    I would recommend using xNormal to bake out your maps. It might seem like a pain to switch between yet another application, but xNormal does not disappoint.

    My personal process is:
    - Make starting shape in Maya (or Max)
    - GoZ & Dynamesh, add details
    - Retopo in ZBrush with ZSpheres
    - GoZ retopologized low poly mesh to Maya
    - Decimate HP and also send over to Maya (for making a cage)
    - Unwrap, set proper smoothing groups, create cage all in Maya
    - Export LP and C from Maya
    - Export HP from Zbrush
    - Bake all maps in xNormal, never get questionable or confusing results
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Depends on what was fixed in ZBrush, but previously, ZB had the nasty habit of exploding the UV's of your mesh into bits and pieces, so each square was an island of it's own, coupled with the wierd 1 smooth group combo, and it causes issues.

    Not sure if your issue in this case.

    Either way, Xnormal or Maya/Max is the standard to bake in. They offer editing tools that you kinda do need if baking Normals.
  • Uhni20
    Options
    Offline / Send Message
  • Uhni20
    Options
    Offline / Send Message
    Okay, so i did every tip i have been given and i am still getting problems.
    - Took my lowpoly Model into Max, Redid UV'S + Smoothing Groups.
    - Exported From Max Directly into XNormals with Texture Cords, Normals and UV's
    - Baked in XNormals - no cage, no ray calculations (they shouldn't be necessary), My smooth is set to "use exported normals" on both my high and low poly models.
    -Took Baked Normal Map directly into Marmoset along with low poly

    - My UV's Look good
    - I have a smoothing group on each UV Island
    Other Than that i dont know what else i can do to make this look right?UfPJrGu.jpg
  • SuperFranky
    Options
    Offline / Send Message
    SuperFranky polycounter lvl 10
    Baked in XNormals - no cage, no ray calculations

    - I have a smoothing group on each UV Island
    If you want to take advantage of hard edges (smoothing groups on each island) you have to use a cage.
  • Uhni20
    Options
    Offline / Send Message
    wXwfIkg.jpgI tried using an internal cage within XNormals and it looks like it averaged the normals in some weird way? Im not entirely sure. I'm sorry for my noobness and all these questions, I really am trying my best to make this work. I feel like it shouldn't be this hard to fix it.

    I've read many articles and what stuck out to me most was if you make separate UV islands and assign each of those islands to it's own smoothing group and the normal baked should be perfect. So i'm not sure if theres a setting im missing or 1 step i didnt do. Is it true this wont work without a cage?
  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    Quick question, as it wasn't clearly stated in your previous posts: when you export to Marmoset, are you exporting the SubD level 1 from ZBrush as your low poly, or are you using the base mesh you made in Max? The reason I ask is, after subdividing and sculpting, the base mesh shifts slightly (or considerably depending on starting mesh density). If you're using the pre-subdivided mesh as your LP to bake against your HP, it could cause weird rounding effects like in your last image due to HP-LP alignment inconsistencies.

    Fiddling with individual points on your cage can also lead to baking errors if you're not careful. It's best manipulate individual points as a last resort in situations involving very tight areas or other spots that don't move far enough with global extrusion.
    I've read many articles and what stuck out to me most was if you make separate UV islands and assign each of those islands to it's own smoothing group and the normal baked should be perfect. So i'm not sure if theres a setting im missing or 1 step i didnt do. Is it true this wont work without a cage?

    Correct, each UV island should have its own smoothing group, at which point using a properly configured cage should ensure a perfect bake. I personally don't like the xNormal cage generator; it's also possible to make a cage in Max/Maya for use in xNormal, which is what I prefer.

    If you are still having troubles, providing access to your models could help us understand where you might be making a mistake.
  • Uhni20
    Options
    Offline / Send Message
    I made a cage in max with the "push" modifier, and i had no luck. It still shows an odd edge.

    The only thing I can think of is maybe, as you said, the low poly mesh and the high poly one aren't syncd up? But I took the low poly mesh back into Zbrush and ran project master over it at subd1 just in case, and it seems like its close enough that it wouldn't have a problem, but it still does.

    If anyone has the time, can they take a look at my files and maybe see what i don't. It would be much appreciated.

    http://www.speedyshare.com/R2vjH/LOW.obj
    http://www.speedyshare.com/GJDgM/HIGH.OBJ
    http://www.speedyshare.com/jTrHd/NormalMap.jpg
    http://www.speedyshare.com/bs3UE/CAGE.obj
  • final_fight
    Options
    Offline / Send Message
    final_fight polycounter lvl 9
    Baked in 3ds Max without any serious issues. Except low poly doesn't really match high poly in thickness.
    image.jpg
    image.jpg
    LOWNormals_Map.jpg
  • final_fight
    Options
    Offline / Send Message
    final_fight polycounter lvl 9
    With normal map baked in xNormal:
    screenshot000.png
    screenshot001.png
  • Uhni20
    Options
    Offline / Send Message
    Did you change the low poly mesh at all for the bakes? It does look better, but it looks like it's still suffering from an issue of a dark like around the bottom of the normal map.

    Do you think it's because the low poly doesn't completely match up to the high poly?

    Edit: I brought the normal map you baked from max into marmoset and it has a really strange grainy texture along the edges. Did this happen to you at all?

    qoifkwS.jpg
  • JasonT
    Options
    Offline / Send Message
    Do you have the SNormals option marked in the normal map properties of the multimap exporter ?
  • Thanez
    Options
    Offline / Send Message
    Thanez interpolator
    The grainy effect comes from two places
    -A combination of the resolution you bake at and the amount of rays you cast define how accurate a result you get. Lower settings bake faster, but will give you a grainy effect due to very few surface normals captured. A higher ray count will give you less grain as the normalmap is captured using more information. 
    -The orientation of your UV islands. At lower texel density, the fact that pixels are square becomes really apparent, creating a jaggy edge along edgeloops that are rotated slightly on the UVs. For those long strips along the edges I would suggest you flatten them so they either share the same U or V coordinate.

    A tip is to use lower res and ray count for test baking, and once you're happy that you're not getting any errors rebake at a higher resolution and ray count, then scale down your map to the desired resolution. That'll give you an antialiased normalmap with very little fuzz.

  • kanga
    Options
    Offline / Send Message
    kanga quad damage
    I had this problem whenever baking normal maps in ZB. Tried everything and ended up going with XNormal. Nowdays its Substance painter so I don't need a cage. But with XNormal and an external app  (where you make and uv your lowpoly) your ZB hi and lopoly have to be exactly the same 3d space.

    Goz a decimated version of your finished sculpt to your external app (we will just call that Max), and play with the export settings in ZB till its in the perfect position at the perfect size in Max.

    Use the decimated import as a base for your lowpoly (very important). Retopo on top of the decimated ZB import to produce your lowpoly. While making the lowpoly make allowances for animation if there is any by placing your loops in the right place. Also add a bevel to the sharp edges on your lowpoly if they are producing artifacts.

    Uv the lowpoly in Max.

    Put all the polys of the lowpoly in one smoothing group.

    Place a cage modifier on the Max lowpoly and point to your imported ZB decimated mesh (in Max) as a reference in the modifier.

    Inflate the cage as a whole if needed using the settings in the modifier. Inflate to a point where the lowpoly is poking only a little through the cage.

    Tweak the verts of the cage using the modifier (not the move tool) till everything is totally enclosed.

    Export the lowpoly including the cage using the XNormal export setting in Max. When installing XNormal you have the option to include the exporter as I remember, maybe these days its automatic.

    In ZB bump your model up to it's maximum subD and export it to a place on your disk. If you need to you can also include polypaint info.

    Now you have your hi and low poly including your lowpoly cage in exactly the same 3d space on your disk. The beauty of XNormal is you dont have to have your hipoly open to bake which means it can be at a very high resolution.

    Point XNormal to your lowpoly with uvs and cage and your highpoly.

    In XNormal specify the size and type of maps you want and hit bake.

    Tha's it. Cheerio and have fun!
Sign In or Register to comment.