Tip:
Highlight text to annotate it
X
In the previous movie, we used XGen guides along with groomable splines
to create a punk look for our male head.
In this movie, we’ll work on creating a more complex long hairstyle for our female character.
Make sure you set your project folder to the provided scene folder,
then open the file “01-XGen_hair_part3_start.mb”.
Create a new XGen description on the scalp geometry.
Name this one “XGen_female_long_hair”
and add it to a new collection named “XGen_female_long_hair_collection”.
We'll generate primitives based on guide location, while randomly placing them around the scalp.
The hairstyle we’re going for this time can be broken into a number of sections.
The main body of hair will be split asymmetrically, flowing down each side past shoulders length.
In the front, we’ll aim for a couple of dramatic side-sweeping bangs across her forehead.
In the back, we want the hair to hug the scalp closely down to the neck
before opening up further down.
To start, create eight guides here along the scalp.
We’ll place these roughly on opposing sides of our hairline,
which we want positioned asymmetrically on the head.
We’ll also add ten more guides to the back of the scalp to guide the hairs in the rear.
Because the part is asymmetric, we'll need another line of guides here
to ensure there are no bald spots on this side of the head.
Start shaping your initial guides by stretching them out to either side of Emma’s head.
While doing this, you’ll notice that at this length
the default four control point setup on each guide limits our ability to shape them.
We can increase the number of control points by selecting the guide
and clicking the Rebuild button in the Primitive Attributes section of the XGen window.
Set the CV Count to 7 instead. This adds more definition to the guide without changing its shape.
Once you've shaped the guide,
click the Normalize button in the Primitive Attributes section.
This equalizes the size of each span of the guide.
You'll find that manually reshaping each of these short guides can quickly become tedious.
Luckily we can make use of XGen’s Copy Guides utility to make our job a little easier.
Select the already shaped guide and click the Copy button.
Then select one or more guides and click the Paste button.
Notice that Maya copies over the guide’s shape as well as its number of control points.
At this juncture, you could tweak the guides manually as we've done before.
You could also use the Joint Groomer utility to shape hairs along a spline
determined by a set of joints.
Or you could even adjust multiple guides at once by creating a lattice around them
with the Lattice utility, then manipulating the lattice points.
We’ll leave the exact styling of the guides up to you.
Feel free to add more guides as needed, but just be sure to keep the front of the scalp clear
for our swooping bangs later.
For your convenience, we’ve provided a finished scene file
with our own interpretation of the guide shapes.
If you generate a preview you’ll notice a few problems.
First, the hair is penetrating the scalp.
You’ll recall from part 1 of this series that this is due to the low Modifier CV Count attribute.
Let’s increase this value to 15.
Set Density to 20, Taper to 0.8, Taper Start to 0.3, and Width to 0.08, to better emulate real hair.
Next, notice that while we’ve tried to separate the body of hair here
using these opposite-shaped guides, the end result is still not as pronounced as we’d like.
To fix this, let’s use a region map to really delineate one side from the other.
In a region map, primitives will only be interpolated
based on guides within their own region.
In the Region Control section of the XGen window, first set the Region Mask attribute to 1.
This tells Maya that our Region Map will fully affect the entire scalp.
Click the “Create Map” button next to Region Map.
Name this region “XGen_female_hair_region.”
Set the Map Resolution to 15 and leave its default color as "Red".
Maya creates a PTEX file with a resolution of 15 texels per face.
In the viewport, it colors the entire scalp red,
meaning all the primitives are affected by all guides created so far.
Double-click the 3D Paint Tool in the Toolbox to open the Tool Settings,
then set the color to the “blue” swatch and switch to a hard brush.
Paint one side of the scalp blue. Make sure to fill in every spot on that side, then save the map.
Now the hairs on the red side of the scalp will only be affected by the guides on the red side
and vice versa.
However, we don’t really want the part going all the way down the back of the head.
That wouldn’t look very natural.
So rather than using the current Region Mask value of 1,
we'll instead paint a new mask on the scalp
to remove the back of the head from being affected by the region map.
Name this new mask “XGen_female_region_mask”.
Like the hairline mask we created in part 1, white marks the areas affected by the region map,
while black marks the areas exempt from it.
Since we want the hairs on the back of the head to ignore the regions,
use the 3D Paint Tool to color the back of the head black.
The asymmetric hair division is much more pronounced, while the back remains even.
Next, we need to add the swooping bangs.
Create three more guides in the front section of the head.
You can use the middle-mouse button to create default guides rather than interpolated ones.
Shape them so they curve across Emma’s forehead.
Regenerate the preview.
This gives us bangs, but they aren't pointed. They just seem to fall into the model's face.
To fix this, let’s update the region map we created earlier to place the bangs in their own region.
That way, they won’t be negatively influenced by the hairs of the regions around them.
Click the Paintable Texture Map button next to Region Map to bring up the region map again.
Let's use the "green" swatch this time to denote the region for the bangs.
Remember to save your region map when you're finished.
The bangs swoop a little more accurately than they did before
since they're no longer being influenced by side and top guides.
However, they still aren't shaped as pronouncedly as we'd like.
As in part 2 of this series, we can fix this by adding a Clumping modifier.
We'll set up our point maps at each of the guides just like before.
This sharpens the hair around each guide.
However, this isn't quite what we want. While we do want the bangs to be this sharp,
we'd like the effect to taper off towards the middle and back of the head.
We can create this effect by masking out the areas we want less affected.
Click the Create Map button beside the Mask attribute in the Clumping Modifier section.
Name this mask "XGen_female_clump_mask".
Set Resolution to 15 and Start Color to White.
Since we want the bangs to remain sharp, we'll leave the mask in the front area white.
We'll replace the side mid-sections with a light grey,
since we'd still like them to retain some shape, but not quite as much as the front.
We'll replace the upper-mid section with a darker grey,
since we'd like the hair to loosen up at the top.
And finally, we'll replace the back with a very dark grey,
since we'd only like them to clump up a tiny bit for texture.
Save the mask and regenerate the preview.
Now the hair clumps up the way we want.
Now that we've taken care of the overall shape, we can work on adding a little bit more volume.
Let’s add a second clump modifier for more texture.
When layering modifiers like this, it's important to note that Maya calculates them bottom-up.
That means that layer modifications that are higher in the list
are actually performed on those lower in the list.
It's also important to note that because of this,
modifiers higher up in the list must have denser point distributions than those below them,
so as not to simply overwrite the modifications performed before.
In our first layer, we placed a point at each guide.
In this case, let's set the Density value to 15 and then use the Generate button
to automatically generate points around the head.
As you can see, this is already a much denser spread than that of our first modifier.
In the Clump Effect section, the default Clump attribute value can make the hair look waxy.
Since this modifier is only meant to give the hair a little texture,
let's not only reduce but randomize it a little just like real hair.
Use the expression "rand(0.2,0.8)" to assign each primitive a random value from 0.2 to 0.8.
Now the hair looks a little more realistic.
While we’re at it, let’s add a Cut modifier.
This modifier trims a specified amount off each hair primitive starting at the tip.
Let’s assign it a randomly generated number from 0 to 3, giving each hair a slightly different length.
Maya will always place modifiers like this above clump modifiers,
which must always be at the bottom of the list so they're evaluated first.
Finally, let's add a noise modifier for even more variation per primitive.
Set the Frequency and Magnitude to 0.5 to create a subtle wave throughout the hair.
This simulates the way individual strands of real hair wrap and tangle within clumps.
While the techniques we've shown you look great in still renders,
you may also want to let the hair settle naturally using physics, or deform during animation.
you may also want to let the hair settle naturally using physics, or deform during animation.
In the next movie, we'll show you how to animate XGen hair using nDynamics.