In ZBrush, we created a simple plane and masked an area to grow the FiberMesh from. After tweaking the settings and clickinc accept from the FiberMesh palette, we used the brushes from the Grooming kit, to quickly set up the main clumps of hair.
Remember that the brushes I used to groom the clump of hair are part of the FiberMesh Grooming Kit, but they are not essential to complete this tutorial. You can use the Grooming brushes that come with ZBrush by default.
From ZBrush, Export the FiberMesh subtool as ‘.obj’ and give it a name (I called it ‘high’). Repeat the same process for the simple plane with UVs…. export as ‘.obj’ and name it (I called it ‘low’).
Ideally you want to have enough segments on your fibers too keep a smooth look, but If the segments are too obvious, you can subdivide the FiberMesh before exporting to get smoother results in the baking process.
Open xNormal and..
1. Drag the ‘high’ mesh (FiberMesh) into the ‘High definition meshes’ section. Make sure you uncheck the box for ‘Ignore per-vertex color’ so that the polypaint can be baked properly.
2. Drag the ‘low’ mesh (plane with UVs) into the ‘low definition meshes’ section.
3. Click on the ‘Baking options’ tab and configure the settings (maps size, output file, etc).
4. From the ‘Maps to render’ section, check the maps you want to generate. For this tutorial we only created the ‘Normal map’ and the ‘Albedo map’ (base colour from polypaint).
If you don’t want to use xNormal to generate the maps, there are alternative ways to produce the maps like BPR renders in ZBrush. I personally found the results of xNormal baking to be much better, but in some cases BPR might be a good option.
One of the advantages of using the BPR method, is that you don’t have to subdivide the FiberMesh before exporting them since the smoothing of the hair happens at the BPR level.
Here is a quick way to generate the same maps, (normal, albedo and alpha), all within ZBrush:
1. To create the NORMAL map, crop the canvas so a square size (the size of the texture you want).
2. Then select the NormalMatCap from the material palette to render the fibers with this material
3. Select a background colour of R: 128, G: 128, B:255
4. From the FiberMesh subpalette, make sure you increase the number of ‘Sides’ under the BPR settings… The value on this slider will determine the roundness and resolution of the fibers profile at render time.
Since the format of the UV space is a square (hence the size we choose for the canvas), we need to take use as much space as we can. A simple way to optimise the space, is to stretch the FiberMesh to fill the more area of the square space… don’t worry, this is just to create the maps, once we apply the resulting maps to the hair card, there ‘stretching’ will be corrected.
1. Take the Gizmo 3D and stretch the Fibers in the axis corresponding with the horizontal width based on the camera.
Now to render the Normal map, we just need to disable the cast shadows by turning off the ‘Shadows’ switch from the Render Properties subpalette and then hit the BPR button (or Shift + R).
Once you have the BPR render, all we have to do is export the ‘Composite’ pass from the BPR RenderPass subpalette. The ‘Composite’ option is a new addition since ZBrush 2019, so if you have a previous version you could still export the shaded pass… the only difference is that you’ll have to add the background in Photoshop and the shaded pass ignores the canvas background
Now, for the albedo or base colour map we just need to repeat the first few steps we did for the normal and do another render.
1. Change the material to the SkinShade 4 and make sure polypaint is on (you can actually use the Flat material if you want pure colour and no shading information).
2. Change the background colour to something that roughly matches the average colour of your hair clump.
3. Hit BPR to render and save the composite pass as the albedo.
From the same rendering you just did to generate the Albedo map, you can grab the ‘Mask’ pass and use it for the transparency
Here are the resulting maps from this BPR process.
I prefer the results from the xNormal workflow but the BPR also has its advantages.