Introduction
This tutorial shows how to use simple texture mapping techniques to create nice 3D hair. It assumes
you have a basic understanding of 3D texturing and modeling as well as a 2D paint program like photoshop.
This tutorial utilizes 3D Studio MAX, but the idea is pretty much usable to almost any standard 3D program.
This technique is exactly how I modeled and created my 3D anime hair, the only exception is at the time I used loft objects will allow you to auto create UVW mapping down their length, kind of like nurbs. And of course, I had a different color.
Making the Hair
Step 1. Model your character. In this case I am using a simple stand in head model which I will
add hair to. You may wish to add some basic lighting with shadows as I do later on in this
guide.
Step 2. Create a box object. It should be relatively thin, and have several vertical segments,
here I used about 6. You should probably also add one extra middle segment from top to bottom so that
later you can add a nice curve to the hair. I didn't do that here though. This box will become a
wedge of hair that can later be copied and pasted to create multiple hair shapes. It will be smoothed
by applying meshsmooth, which is why you can use a low poly box with only a few segments.
Step 3a. Open your 2D paint program. Make a nice sized image. Here I used a 300x600 size image map.
Pick a color, and with your drawing tablet or mouse draw a bunch of vertical lines at different pressures.
This should give the illusion of hair. I tend to pick 2 shades, a ligher and a darker and simply and quickly
draw these lines. The image on the right only took a few seconds to do with my Wacom ARTZ tablet.
Step 3b. Next, take a large black smooth falloff type brush and fade out the bottom of the map.
This completes the illusion of the hair strands. It's important to make sure the bottom of the map
is totally black.
Step 3c. Take your box object, and first apply a simple UVW Modifier to it...use the regular
Planar mapping type. The planar map should be applied along the main faces which should be the default.
Then SCALE UP the planar map vertically in sub-object mode so that the bottom edge is a little bit beyond
what is needed for the hair object. If you don't do this, you may end up with a thin line at the bottom of
your hair later, when you want it to be transparent.
Next, apply a basic blinn material to your hair box object. Then take and apply the color map into the diffuse color channel of the material.
Here you can see the box object with the color map we just painted applied to it.
Step 4. Now add an Edit Mesh Modifier (this will be ABOVE the UVW mapping on the hair box). Then edit the
mesh to be in a bent shape. Next, take and place your hair object somewhere on your model. It should
look similar to what I have on the right. You may want to use a bend modifier first to get a basic
bend, and then edit mesh it by hand after that. Try to keep the same relative distance between the vertical
segments so that the texture doesn't stretch.
Also, take your hair material and increase the shininess and specularity a little so it has some shine.
After rendering you should have a box with a hair color map on it. There are two main problems you will
now notice. One, is that the hair isn't transparent in the black areas. The second is, even if it was,
it is also shinning (i.e.: has a specular level) in the black areas. In the image on the right, this
is why the bottom right corner is turining whitish.
Step 5a. To fix the shininess problem, we will make a map for the Specular Level. Simply load
up your color map. Convert the image to grayscale. Then adjust the levels/brightness so that it goes
from black to white as much as possible.
Next, take a large, soft, black brush and at the bottom of the image, increase the black area a little bit more.
This is very important to make sure you have a totally black area towards the bottom of the image.
Generally you have to go back like this and increase the darkness to be larger and fall off over a larger
area for the specular map as I mention.
Step 5b. Now in your material, apply this new map to the Specular Level map area. If you rerender
your hair now, you will see it is only shining in areas where the hand painted strands are, as shown on
the right.
Note that you can still adjust the shininess value in the material. You can also set the old specular
level to 0, and then in the map percentage amount, adjust that from 100 down to any value you like to
lower the specularity of the hair as you desire. Another alternative would be to simply darken the
hair specular level map if you didn't want it as shiny.
Step 6a. The final map to create is an opacity map, which is used to set the transparency of
the hair to the strands. Once again load up your Hair Color map, and then convert it to grayscale.
Next, darken up the bottom again to make sure the very bottom of the map is black.
Then, with a white brush, whiten up the top of the hair map. This will make the top of the hair totally
solid, with the darker open areas looking more like darker areas of hair when rendered.
Step 6b. Take your Hair Opacity map and apply it to the Opacity map channel of the material.
By default 3DSMAX makes black areas transparent and white solid. You should now have one perfect
hair wedge on your model.
Step 7. Now take your hair wedge, and make copies, and use the individual edit meshes to make
variations to the bending. Place these at different orientations and locations.
Next, take all the low poly hair objects, and apply a Meshsmooth modifer to them. This will round out the hair and thin it up so it doesn't look too thick. If you render, you should have something similar to what is shown on the right.
One problem you may notice is that with regular Shadow Mapped lights, the hair objects cast box
shadows. This is a 3DSMAX limitation. Shadow maps work based on the object geometry, not mapping.
Therefore, even thought the hair is mapped to be transparent, you will have solid shadows.
Step 8. The obvious way to fix this is to render the image with Ray Traced shadows for
close up shots where you want to see individual strands casting shadows.
You may want to make 1 or 2 variations of the Color/SpecLevel/Opacity maps so that you have a few wedge variations. You can also make a thinner map and hair object with only 2 or 3 drawn strands for giving your character the few individual hanging hairs type look.
That's basically it. The only other thing to do would be to make a copy of the head object, and
make a "cap" around the top back of the head based off of the original head mesh. This cap would
be textured a dark color similar to the hair color. This way, even if you see through the hair
wedge objects, there is a darker hair color underneath. You can texture map that with a hand
drawn map with regular techniques.
Animation: One trick with MAX 3 is that you can take each individual hair wedge object, and apply the "Flex" modifier to each one individually. (This is like Soft Bodies in Maya). You can do this on the low poly object, just before meshsmooth. Set it up so the base of the hair is rigid and the end of it looser. Then, when the head of the character is animated, it will automatically wiggle. By adjusting the flex parameters slightly differently for each hair wedge, you will get a nice secondary action for the entire hair set. This is how I animated the hair in the "Anime Chance" movie on my Anims Page.
Special Thanks
This basic approach is pretty much inherited from what I got from a quick little interview I read
with Steven Stahlberg on www.raph.com a while back.
He was basically doing the same thing with a hand drawn hair map or photo hair map on several nurbs hair
shapes in Alias PowerAnimator. Just because you don't use the same software doesn't mean you can't
pick up useful techniques! hehehe. :)
About the Author
Michael Comet is currently a Rigger/T.D. at Blue Sky Studios in New York.
Previosuly he was Video Team Lead Rigger and a 3D Animator/Artist at
Big Idea in
Lombard, IL where he is worked on 3-2-1 Penguins and Veggie Tales.
Prior to that he was lead animator at the video game company
Volition, Inc., where he animated most of the cinematic
sequences for Descent: Freespace, and headed up much of the realtime character animation and
cinematics R&D for their RPG title, "Summoner". He can be reached via email
at comet@comet-cartoons.com, and has a
personal homepage at: http://www.comet-cartoons.com/
which has more information and samples of his work
About the Sample Images
This article, all images and text are Copyright ©2000 Michael B. Comet
All Rights Reserved.
This article may be reprinted for personal use only. It may not be packaged or sold in part or in whole, either alone or as part of another package, book, magazine or any other item. Unauthorized duplication is strictly prohibited. This article and related artwork, samples or text, are not to be copied onto other sites without prior written consent from the author. When in doubt, ask.