Proven Tips for Creating Great CG Hair for Any Project

There are many different tools and methods to take in order to create hair for your CG characters. The tools and workflows used for creating great looking hair are improving and what was once one of the most difficult things to tackle in 3D has become achievable for any CG artist. Whether you want to take the more traditional and often times quicker approach of polygon hair, or you want to create a hair system influenced by dynamics, this article will give you a strong understanding of what method is right for your project, and how you can begin creating great CG hair.

Types of Hair

In most 3D applications you've got the ability to create a dynamic hair system that can simulate natural movements and collisions like hair blowing in the wind or simply behaving naturally to the animation created for the character. In Maya you can achieve this with nHair, which creates a collection of hair follicles, the same as human hair. However, in Maya each hair follicle hosts a hair curve. There are many different attributes that can be adjusted on the hair system to create the desired look and behavior. This type of dynamic hair system is great for creating realistic hair that is affected by gravity, and other elements. However, it can be very taxing on your system, and increases render time. A great example of a dynamic hair system at work is in just about any animated movie recently. For instance, in Monsters University Sulley had 5.5 million individual strands of hair. This method is also beneficial if you're creating a single render because you can get photorealistic results fairly quickly. The more traditional method of creating hair is to use actual textured polygons. While this method is definitely not as realistic as a dynamic hair system, if your project doesn’t call for Pixar-quality characters and you are in a time crunch polygon hair can be a good route to take. This method is often referred to as “game hair” because it’s a common method still used today for creating hair in-game. The primary reason this technique is used for creating hair in games is because games are pre-rendered and it can be taxing on the system to have dynamic hair simulations calculated. Of course, since this method isn't using a dynamic system it won't react or move with the character as they animate. In order to get around this, often times game studios will incorporate things like ponytails, or clumps of hair that can be rigged, so the animators will have a way to still add movement to the hair, and not have it feel so static. This polygon or “game hair” is made up of lots of individual polygon strips that have a texture with a transparency map applied to it. These polygons are shaped and placed to create the hair style needed. This won’t necessarily produce the realistic results that you'd find with something like nHair, but it’s simple and faster to render and setup. With a dynamic hair system it can take an extensive amount of time to adjust the attributes to get it to behave and look how you want, and if you’re not familiar with dynamics it can be quite a challenge.

Setting up Polygon Hair

This quick tutorial will walk you through how you can begin to setup polygon hair in Maya, however this method can be used for any program. After this you should have a basic understanding of how you can start creating simple hair for your characters. One method you can use to create polygon hair is to first create a surface that you can basically trace over. It can be hard to create a smooth polygon that follows with the contours of the face. This method is great for creating long hair, but a simpler method of duplicating polygon patches can be used for short hair as well. GameHair_Screenshot1 Using the EP Curve Tool you can start creating the basic shape for the hair using curves. You can see what this looks like in the example image above.   GameHair_Screenshot2 Once you have the basic shape you want for the hair you can select all of the curves and go to Edit Curves > Rebuild Curve > Option box.   GameHair_Screenshot3 With the rebuild curve options opened you will need to adjust the number of spans, something like four spans should work. This sets each curve to have four CVs, this is needed in order to properly loft the curves together.   GameHair_Screenshot4 Now you will need select all the curves you created, and go to Surface > Loft > Option box. With the options opened you need to set the output geometry to polygons and the type to quads. This should give you similar results to the image above. Make sure you have the smooth mesh preview enabled to get a more accurate representation. With this new hair shape created you can start the tracing process. This hair will be used as a guide for how you want to place the pieces of geometry. In order to make this a little easier you can select the surface and apply a material with some transparency, so you can see the underlying mesh.   GameHair_Screenshot5 When you're happy with that, select the surface and go to Make Live under the snapping tools option. Now when you create a new EP curve it'll automatically snap to the surface. You can use the same method you did earlier by using the EP curve tool to start following along with the lofted shape you created earlier, however you will want to try and create smaller sections so you can create a layered look with the polygon pieces.   GameHair_Screenshot6 You can see in the image above how the first curves were created for the bangs on the character, and lofted as polygons to create the new surface.   GameHair_Screenshot7 Continue this procedure of creating small polygon trips to follow along with the surface to create the look of the hair. When you’ve created all the individual pieces of geometry now all you have to do is create the UVs. Since these are simply polygon strips this process is very easy.   GameHair_Screenshot8 With one of the polygons selected go to Window>UV Editor. This will open up the UV Texture Editor and you should see something similar to the image above. In this case the UVs are far outside the zero to one space.   GameHair_Screenshot9 To fix this go to Polygons > Layout > Options and set the scale mode to Stretch to region and this will properly fit the UVs into the zero to one space. Now the only thing left to do is create a hair texture, the easiest way to do this is to find a hair texture online that you think will work well. One thing to keep in mind is that you'll need to save it out with an alpha channel, so a TGA should work well. In Maya you can create any new material, for example a Lambert, and plug in the hair texture you created in Photoshop.   GameHair_Screenshot10 Now you have some decent looking hair that didn’t take very long to set up!  

Setting up nHair

As mentioned before, the technique in the tutorial above isn't going to give you very dynamic hair. If you need dynamic hair, you'll probably want to create a system with something like Maya nHair. When using nHair, there aren’t very many tools to actual style the hair to get it to look how you want, so a similar method of creating a surface to trace can be used to create the style of the hair. DynamicHair_Screenshot1 You can use the EP Curve Tool to create the shape and style that you want for the character.   DynamicHair_Screenshot2 When all the curves are creating you can apply a loft to create the surface for the hair.   DynamicHair_Screenshot3 Now you can trace over the surface with the CV Curve Tool, placing new strands of hair that will follow along with the basic shape. These curves are what will be used to create the actual dynamic hair.  You can start to shape these strands into the style that you want.   DynamicHair_Screenshot4 To create the hair system you will need to create a new NURBS plane, with the plane selected go to nHair > Create Hair.   DynamicHair_Screenshot5 Then select all the curves you’ve created and go to nHair > Assign Hair System and assign the hair system that you just created on the plane.   DynamicHair_Screenshot6 Now the curves are converted to a hair system that keeps the same style you created.   DynamicHair_Screenshot7 With the hair selected you can go into the hairSystemShape1 node and start tweaking the different attributes to get the desired look. For instance, you can adjust the Hairs Per Clump to increase the density of the hair. Play around with the different attributes to get a better understanding of the type of effect that it has on your hair. You can see right away this nHair has much more realistic results than traditional polygon hair like what was created earlier. Keep in mind if you want to have this hair affected by dynamics, like wind or the characters head moving then you would need to spend a lot of time fine tuning the attributes to get the desired results. You can learn more about how to setup this type of hair system with this in-depth tutorial.   Now that you have an understanding of CG hair, try using one of these methods in your next project. Whether you need to create some decent looking hair quickly with polygons or want to get more realistic hair with a dynamic hair system these quick tutorials should give you a basic knowledge of a few of the ways you can go about setting it up. To continue learning and go even more in-depth with different hair techniques check out Creating Hairstyles with Maya Hair and Creating Hair for Next-Gen Game Characters in Maya.