Home Technical Talk

Zbrush workflow for low poly normal maps

I'm trying to figure out a workflow for creating low poly models with normal maps baked from a Zbrush sculpt.

Currently, I am creating a base block mesh in Maya which I am importing into Zbrush. This part of the process is working out ok but I am confused as to how I then turn the sculpted object into a low poly normal map.

From what little information I can find online, it seems that the most common method is to use decimation master in Zbrush, crunch down the mesh, import it into Maya and use it to bake a normal may onto a lower poly mesh. Is this correct? If so, does that mean I don't need to UV map my low poly mesh or would the baking process require the low poly mesh to have a UV map setup?

I'd appreciate any help or links to tutorials, thanks!

Replies

  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    your low poly mesh obviously needs to have uv's since it'll be displaying the normal map within the game.

    decimating the high poly is usually done in order to be able to work with your very dense sculpt, for the low poly you can retopologize from scratch, or use one of the lower subdivision levels of the sculpt as a base for editing. in the end, the low poly mesh should adhere to the high poly's silhouette as far as possible.
  • Equanim
    Options
    Offline / Send Message
    Equanim polycounter lvl 11
    Hey Hanpan,

    Here's the process I use, assuming I have my low poly mesh finalized and exactly the way I want it...


    Within Maya


    1) Make SURE you're using ALL quads. This is important because Z subdivides every edge of your model by 2, each time you click the "divide" button. Having tris etc can produce weird results that will show when you try and paint in more detail.

    A great way to tell you have all quads is by turning on Polycount if you haven't already (Display > Heads Up Display > Polycount) and making sure your tris are exactly double that of your faces. If they're not, it means you may have some triangles or extra verts somewhere. If you're like me and make your models in several parts, you can hide them one by one to narrow down your problem areas.

    2) Make sure your model is mapped. When Z transfers your geometry to a normal map, it's going to want to use the existing UVs. It's possible to map within ZBrush, but Maya's mapping tools will give you much more control, so do it there.

    3) Soften your normals. You don't HAVE to do this, but it will help you evaluate your maps when we bring them back to Maya. You may think Z would soften your normals automatically when you convert your divided geometry to a normal map, but it doesn't. I usually just do Normals > Soften Edge to the whole model. Then I select the edges I want to look crisp and do Normals > Harden Edge.

    4) Crease your hard edges. I'm sure you've noticed that Z performs basically the same operation that Mesh Smooth does in Maya. By default, any crisp edges on your model will be smoothed as well and you'll lose that definition. One solution is to double up those edges but since you want your model to remain low poly, you'll have to remove them later to keep your poly count optimized. A better solution is to select the edges who's definition you want ZBrush to keep, and do Edit Mesh > Crease Tool. (The value doesn't really matter as long as they're creased.) This will effectively "Crease" those edges. Now, when you divide your geometry in ZBrush, you'll notice those edges stay nice and sharp!

    That's it for prep! Make sure you delete the history from your mesh and export it to ZBrush.


    Within ZBrush


    It sounds like you're familiar with dividing your mesh's geometry and painting in detail etc. One piece of advice I can give here is not to paint on your lowest geometry resolution. You'd essentially just be moving around the verts of your base mesh, which will make your UV map look distorted.

    1) When you're done painting detail, slide back down to the lowest resolution level. (The slider is under the "Geometry" tab in the Tool menu.) Some people will only go down to maybe the second or third level, feel free to experiment.

    2) Under Tool > Normal Map, set your options. I usually click "Tangent" (Because we're making "Tangent Space Normals"), and "Adaptive" but feel free to play with these. When you're set, click "Create NormalMap" (Go figure). It may take a moment, but you should see your new normal map appear in the top left corner of the "Normal Map" tab. If you mouse over it, it'll expand and you can get a better look. You'll notice it's flipped vertically. That's just how ZBrush creates its maps. We'll fix that in a moment.

    3) Next, still in the "Normal Map" tab, click "Clone NM". This makes your normal map the active texture in ZBrush. You'll see it appear in the texture box on the left hand side of the screen.

    4) Time to export your normal map! In the top menu, click "Texture", this should bring up the Texture tab where you'll see the normal map yet again. The map is still upside down so click "Flip V" to make it right side up. Now click "Export" and save your map where you want. (I usually save mine as a TIFF because PSDs can be a bit problematic for Maya to interpret and render.)


    Back to Maya

    1) Back in Maya, add a material to your original mesh if you haven't already and prepare the bump input to accept a file.

    2) Under the "Bump2d" node, make sure "use as" is set to "Tangent Space Normals". (Object Space Normals interpret their normal data a bit differently and aren't used very often anymore. That's why we clicked that "Tangent" option in ZBrush.)

    3) Under the "File" node, make sure the image file you exported from ZBrush is selected.

    4) We're more or less done now. However, Maya likes to use the Maya Software Renderer by default and its not the best at interpreting normal maps. (They'll look like garbage.) Mental Ray however, handles normal maps just fine. So have Mental Ray selected. I usually set the quality to "Preview".

    (NOTE: If you don't see Mental Ray as a rendering option, you just haven't turned it on. Go to Window > Settings and Preferences > Plugin Manager > Mayatomr, and check both boxes. You may need to restart Maya but you should now have the option to render with Mental Ray.)

    5) That's it! Click the render button and you should see your results! Remember that normal maps don't actually change the geometry of your model, so don't expect it to look EXACTLY like your Z Sculpt. Depending on the quality of your sculpt however, you should see some pretty nice detail.


    RECAP


    Within Maya:
    1) Make sure you've got all quads.
    2) Make sure your model is mapped.
    3) Soften/harden your edges as you see fit.
    4) Crease any edges you want to remain crisp in ZBrush.

    Within ZBrush:
    (Import your mesh and add your detail, avoiding painting on the base resolution.)
    1) Slide back down to a lower resolution.
    2) Tool > Normal Map, set your options (Especially "Tangent") and click "Create NormalMap".
    3) Click "Clone NM".
    4) Under the top menu, go to "Texture", hit "Flip V" and "Export". Save your map.

    Back to Maya:
    1) Add a material to your original model if you haven't already and set the bump input to use a file.
    2) Under the material's "Bump2d" node, set "use as" to "Tangent Space Normals".
    3) Under the material's "File" node, make sure your bump map from ZBrush is selected.
    4) Set your renderer to Mental Ray. ("Preview" quality is recommended.)
    5) Render and view your results.


    I know that sounds like a lot, but that's setting up your workflow from scratch. Tweaking the map is as simple as...
    1) Tweak your sculpt in ZBrush.
    2) Re-render your normal map, re-clone and re-export.
    3) Back in Maya, refresh the link to the normal map file.
    4) Click render to view your revised map on the model.

    Remember, even when you think you're done, it's ALWAYS a good idea to save your Sculpt as a ZTool. That way you can reload it later if need be. You could also paint a preliminary color map based on your sculpt and export that as a separate texture.

    Good luck!
  • spacekatgal
    Options
    Offline / Send Message
    Hey Equanim,

    That is so amazingly helpful. I was about to embark in just this kind of normal map job. Thanks for the share!
  • BadCustomerService
    I have been fighting with this problem for the past few weeks. Thank you for this response. I'm transitioning from a pure Zbrush sculptor to going through the work flow between Zbrush and Maya.

    Do you use the GoZ plugin? Any opinions?
  • TylerSorg
    Options
    Offline / Send Message
    TylerSorg polycounter lvl 4
    I use max and zbrush I get hiddiously horrible maps... I mean I make them good but the tangent is F ed up I am not sure what to do about that. I have tryed a few thigns I can make it look good for animations or screen shots.. but I go to UDk and its right back to crap again. Suggestions PM me.
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    TylerSorg wrote: »
    I use max and zbrush I get hiddiously horrible maps... I mean I make them good but the tangent is F ed up I am not sure what to do about that. I have tryed a few thigns I can make it look good for animations or screen shots.. but I go to UDk and its right back to crap again. Suggestions PM me.

    I'd recommend starting your own thread and post pictures of your issues to garner a proper response.
  • SinAmos
    Options
    Offline / Send Message
    There is one thing your guide isn't mentioning, which is when creating game models, you are encouraged to share UV space by using symmetrical parts and flipping their UVs to share this space. What I've noticed when using ZBRUSH is this creates a nasty seam where no information is produced. This is kind of annoying when you are trying to get the most information per pixel. Any suggestions for shared UV edges and mirrored UV layouts.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    Xnormal or GoZ it to another app. Zbrush could be baking a fine map as far as it's concerned, but if the engine is going to calculate it differently, I don't think there would be anything zbrush could do to fix that.

    Also, don't have the faces sharing the same space when baking, just move them +1 off the 1:1 grid. Don't delete any faces that may risk changing the vertex normals.

    http://wiki.polycount.com/NormalMap#Mirroring
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Equanim, you could use the Multi-Map exporter plugin in Zbrush to simplify exporting maps in your process a little :)

    http://www.pixologic.com/docs/index.php/Multi_Map_Exporter
  • mike1377
    Options
    Offline / Send Message
    Equanim, i registered just to thank you on your amazingness. I had searched several tutorials and documentation. It said to "flip vertically" but i wasn't sure where to, and the tangeant space messed me up too. So thank you, you loveable ball of awesome.


    I'd recommend this to anyone who has a problem with bump mapping from ZBRush.
Sign In or Register to comment.