In the previous movie, we used XGen guides to generate a basic haircut.
In this movie, we'll use guides in conjunction with groomable splines
to create a mohawk style haircut and beard.
Make sure you set your project to the provided scene folder,
then open the file "02-XGen_hair_part2_start.mb", or use your own file from the previous lesson.
We're going to create a new XGen description for our mohawk on top of the existing hairstyle.
Before we do that, let’s add the existing basic hair collection to a new layer
named "xg_basic_hair_LYR", and turn off its visibility.
Select the scalp, then go to XGen > Create Description.
Name it "XGen_male_mohawk" and instead of using the existing collection,
place it in a new collection named "XGen_male_punk_collection".
Like before, we'll generate spline primitives for the hair randomly across the surface
and use guides to shape it.
However this time, instead of placing them down manually,
let's use a NURBS plane to more quickly create our guides.
Go to Create > NURBS Primitives and turn off Interactive Creation.
Create a NURBS plane. This will act as the template for our guides.
Rotate it -90 degrees in Y and 90 degrees in Z,
then position and scale it as shown so it roughly resembles a mohawk.
Under Inputs > makeNurbPlane1,
set Patches U to 5 to divide the plane into what will become our mohawk guides.
We'll also adjust some of the lower control vertices to fit the contour of the head a little better.
Now in the XGen window, click the Utilities tab and then the Guides To Surface utility.
The selected utility appears in the space below.
Click Convert Surface To Guides.
Maya automatically generates six guides which stretch from the scalp to the top of the plane.
It's not perfect, but we can make some manual adjustments just as we did in the previous movie.
In fact, this time let's try manipulating these XGen guides as curves.
There are two utilities that allow us to do this: Guides As Curves and Guides To Curves.
Both give us the option to create temporary curves from our existing guides,
while the latter gives us the additional ability to convert the guides to NURBS curves entirely.
Let’s try that. Select all the guides.
Choose to hide the existing guides,
in case we make a mistake and want to go back to what we had.
We'll also turn the Lock Length option on, to keep our curves even with each other.
Maya automatically hides the guides
while creating a series of temporary curves to represent them.
Because we locked the length, you can now use the Edit Point option from the right-click menu
to manipulate the vertex at the end of each curve,
and the rest of the curve will compensate automatically.
This greatly reduces the number of control vertices we need to manipulate.
In more complex hairstyles, modifying guides this way gives you access
to all of Maya’s NURBS curve tools and shaping techniques as well.
Once you've shaped them adequately, select all the curves,
then select the Curves To Guides utility.
Make sure Delete Curves is turned on, then click Add Guides.
Maya converts the NURBS curves back to guides while retaining their shape.
Since we’re happy with the look, you can also delete the old guides that we’d previously hidden.
Update the XGen preview. Our hair looks a little thin,
so let's add some volume by increasing the density as we did in the previous movie.
In Primitive Attributes, set Taper to 0.8, Taper Start to 0.3, Width to 0.08,
and turn off Tube Shade to clear up the look in the viewport.
The default shading in Viewport 2.0 makes our preview a little difficult to see
so let's switch back to the default viewport for now.
This brush style mohawk is just one style of mohawk.
Let's use a clumping map to create a more pointed version.
Clear the XGen preview then go to the Modifiers tab.
Modifiers allow you to make layered changes to an entire description at once.
Click the Add New Modifier button which opens the Add Modifier Window.
We'll choose a Clumping modifier.
At first the modifier has no impact on the mohawk.
This is because we haven't specified a region for its area of effect.
Make the scalp_GEO object visible again, so we have a surface on which to place our clump map.
Click the Setup Maps button. This opens the Generate Clumping Maps window,
which lets you configure the clumping points and map settings.
Now if you click the scalp within the Mohawk area,
Maya places down point maps indicating focal points for the clumping effect.
Try experimenting by placing a few random points, then clicking Save.
Maya regenerates the hair by clumping it together in bunches
at each of the points specified by the point map.
Notice that the first point we placed doesn't actually cause any clumping
because it falls outside of the area in which primitives are generated.
Turn off the preview, then return to the Generate Clumping Maps window.
To try a different set of clumping, you can CTRL + click the old points to remove them,
or press the Clear button to remove them all.
In this case, we'll use the Guide button to generate one point at each of our guides.
Now our model has a much edgier looking "spiked" mohawk style.
The Clump attributes let you adjust the intensity of clumping over the scalp...
...while the Clump Scale ramp controls the magnitude of clumping from the hairs' root to tip.
You can even paint a mask to include or exclude specific areas of the scalp
from being affected by the modifier.
Now that we have styled the mohawk, let's create a beard to go with it.
In the Layer Editor, make the jaw_GEO_LYR visible.
In this example, the duplicated jaw mesh is parent constrained to the head group
just like the scalp mesh.
However, for animation, you need to create a wrap deformer between it and the head
so the beard follows the mouth's movements.
Select the jaw mesh and create a new description. Name it "XGen_male_beard".
Place it in the same collection as your mohawk.
This time, select a Groomable spline type and click Create.
Maya creates splines all around the jaw without the need for any guides.
Notice that when you create groomable splines,
Maya turns off the Update Preview Automatically option.
This is to increase interactive performance
as the splines should be your main point of reference for styling
Like before, let’s thicken up the hair a bit using the Density attribute.
Now we're ready to groom it using the tools in our Grooming tab.
First notice that there aren't that many splines right now.
We can thicken them up just like the primitives, by increasing their density.
Instead of a full beard, let’s make the hair more stubble-like by reducing Length to 0.05
and Width to 0.03.
To preview groomable splines a little more clearly, turn off the Visibility attribute.
You can also hide the jaw_GEO geometry.
Let’s add a handlebar mustache to that five o’clock shadow.
Turn off the preview and turn the Visibility of the splines back on.
Select the Length brush.
Set Increment to 0.5, then paint under the nose and along the side a few times
to increase the hair length where we want the mustache.
Use the Pose brush to comb the splines along the mouth.
You can also use the Part brush around the upper lip where it’s more difficult to separate the hairs.
If you ever make any mistakes you can use the Eraser tool to remove them.
Now turn off the splines’ Visibility and manually generate a preview again.
Finally, we'll want all the hair colors of both the Mohawk and beard to match,
so go to the Hypershade and select the two phong shaders that Maya created
for each of them.
Open the Node Editor and show the connections.
To ensure these shaders always match, connect the mohawk's Out Color attribute
to the beard xgen shader group’s Surface Shader attribute.
Now if you switch to Viewport 2.0,
you can change both the hair color and beard color at the same time,
by adjusting the attributes of one phen shader.
In the next movie, we’ll look at how to generate and style long hair on a female model,
including how to use region maps to set up complex hair parts.