Tutorial: Handpainting Hair Textures

Mar 08, 2009 23:08

(Note: I'm aware this didn't win my poll, but I already had the screencaps, and I figured I'd knock it out. Don't worry, I'm going to append and amend the genetics tutorial next.)

First off, a word of caution. This tutorial is not for a complete and total beginner. I am going to assume a very basic knowledge of bodyshop (creating and importing project files) and a basic knowledge of your image editor of choice. However, you will not need a huge amount of base knowledge.

You will need:
- A hair you want to retexture
- An image program that has layers (I am using Corel Paintshop Pro XI--older versions down to about 8 have a similar interface, older ones than that have the functionality, and other programs like GIMP and Photoshop also have the important tools)
- An input device that YOU can control for detail work--I'm not going to say you have to have a tablet to be able to do this, but it will take much more patience to do this with a mouse. I bring this up because I wouldn't dream of attempting things with a touchpad.
- Patience

If you follow this tutorial, I promise you will have a new texture that follows the original alpha. I don't promise you perfect results the first time, it will take time to perfect your own style and technique.

I capped the pictures for this tutorial while creating this retexture for Flora's Female Hair 13 from XMSims:


As you can see, it's a wavy/curly hair texture. I did that on purpose to show that it's possible to create your own curls from scratch, but this method is applied somewhat more easily to a straight mesh/alpha.



1. Let's start. First of all, load up bodyshop. You'll want to create a project based on the hair you want to retexture. Now open up the folder in your EA Games\The Sims 2\Projects that corresponds to the project you just started. It should look somewhat similar to this:


If you're not all the familiar with hair, a good proportion of hair meshes will export with what looks like three copies of the same texture and alpha. The texture names will be along the lines of "afhair_Casual1~hair_alpha3~stdMatBaseTextureName.bmp", where the bolded part of the name is along the lines of alpha1, alpha3, and alpha 5. If these textures are all identical, we only have one to worry about repainting ourselves, and we may just resave our new file under different names. If they appear different, then we have more than one texture file to redo.

2. Go ahead and open the texture file in your image editing program. What is the easiest way to make a new texture that fits the mesh we were given? Paint on top of the old texture!

Here is where I'm going to let you in on a little secret. While BodyShop may pitch a fit if you try to import a texture of a different size than the original textures it exported, your results will be much nicer if you paint at a higher resolution and then size it back down to that original resolution. I generally resize the picture UP so it is twice as big at least, but the bigger you start, the more control you have while working...and the smoother your results.

There is obviously a limit to the size you want to work at. Remember each layer is a fully uncompressed image's worth of information, and good programs store several (if not an infinite number of) undo points, so there is a point where your system's processor and RAM will limit you. I don't like working bigger than 2056x2056, but if you scale an image that was 512x512 up to 1028x1028, that in itself is a big improvement without making your computer too angry.

3. Using the Layer Palette or Layers Menu of your paint program create a new raster layer.


OR



4. If you aren't going to fiddle much with the alpha, the easiest thing to do is start with a base color and paint detailing on top of that. Fill in the new layer with a good base color. What makes a good base color? Well, since we don't want to repaint an entirely new texture for every new color we make, it's best to start out with a base color that has high saturation (more vivid, like a deep gold or reddish brown) and high contrast (meaning we can make many distinct shades of highlights and lowlights on our base).

I personally have had better luck starting out with reddish browns, so here we go:


Fill your new layer with your base color of choice using the fill tool. Keep this color as your tool color for now.

We are going to paint on top of this base color, so make another new layer on top of the current one. Since we are going to use the original texture for a guide, make the base layer invisible.

5. Now, we should have three layers. On the bottom is the original hair texture, next is your (invisible) base color, and on top is a new layer that we are going to paint on. Make sure you click and make it your active layer, too.



6. Is your top layer your active layer? It's time to paint! But...wait a minute. Our current tool color is our base color. If we paint using that color, it won't show up over the base. For now, the easiest thing to do would be to paint some strands at a slightly lighter color than our base. I tend to open up the color selector (it's under material properties in PSP--just double click the tool's color on the palette) and choose a color that is both a bit lighter and a bit more saturated...you'd be going down and to the right in a square color selector like this:


7. We're going to start on the straight part of this texture to give you a basic idea of the technique.

First of all, tool settings are completely arbitrary at this point. The size could range from a 2-10pt, depending on your image's size, your pressure settings, and the type of texture you want to create. More Maxis-matchy/handdrawn looking? Go with a larger, chunkier brush. More shiny/realistic, go as fine as you can go and look steady. Just keep in mind, you will probably want at least one finer size for some more detailed strands. Opacity/softness is also up to you, but for the first go, I like to be pretty opaque and hard with my brush choice. I also prefer the normal brush tool to the airbrush here--but use your own experience or some trial and error. See what works for you!

You'll want to zoom in close enough to see the detail of your strokes, but you want to stay far enough out to be able to get an entire strand/stroke in one fluid movement. Here is where a tablet is an advantage--depending on how its mapped, you can move one stroke in a smaller movement, allowing you to make longer strokes with the tablet. Don't settle for "okay" if you're using a mouse--the undo button is your friend! If a stroke looks funny, go back and do it over.



You will have some margin for error. In fact, if you think you will adjust the alpha later, make sure you paint a bit beyond where the old limits were.

8. Keep on filling in with strokes until you've done an entire section or chunk of hair. Since it's going to be one collective piece in your finished project, it's best to do it all at once.



Keep in mind, even if you are doing a super-straight hair...hair is NOT parallel lines. That looks goofy and unnatural. This is one reason why textures that are simply made up of noise pushed through a motion blur filter look like...ribbons, and completely bizarre. Motion blur can have its uses, and my first retexture was even made up of "filterfucked noise," but we're handpainting for a reason. Leave a little irregularity...a little overlap...just let your hand flow a bit.

9. Before you get too far, toggle your base layer back to being visible and check how your strokes look against the base color.


I'm happy with this. It looks straight and smooth, but it's not perfectly regular. There are a couple of places where the base color shows through more than others. We will come back later and do some more filling in, but that's a good first pass. Now let's move on to something a little bit more tricky...

10. Yep, let's do a wavy part. You can see the first lock on the right hand side was pretty easy. The same principles apply, trying to get as many one-stroke strands in there as we can. However, sometimes you can't accomplish that and get the fullness in a curl or wave.


You will need to carefully add to curls. Beware of ending up with something like this:


See how the curl is just a bunch of careless curves? See how you can see both ends of those curling strokes? A curl isn't a separate entity floating on the end of a lock of hair like that. It needs to blend seemlessly into the straight part of the hair. Get rid of all that!


I even took it a little further back than our first shot. Now, the trick to adding fullness is adding actual depth, sometimes. To take care of the curl in this part of the hair, I actually drew what I thought were the "underneath" layers of this curl, and then I made a new layer and painted the top strands on their own layer. Not only is there actually depth there, when I go and fill in with some highlights or lowlights, I'll have layers here to do some of the blocking work for me:


11. Let's check our progress:


It's not perfect, but I was happy with the results at the time.

12. All right, at this point you are going to want to continue doing what we have been doing, sketching in some basic chunks of hair, until you've finished every area of the texture. Final check with the base color made visible again:


At this point, there shouldn't be a lot of depth or shading. It should definitely look chunky. It should definitely also look like hair, every last bit of it. If you have a portion that looks a bit strange, don't hesitate to select it all and delete it! That's the point of having layers, so it's easy to go back and paint it in. It shouldn't absolutely perfectly sleek, but don't let there be too much chaos in your strokes--those will end up looking like tangled messes in your finished texture.

13. We don't need the old texture as a guide anymore. Leave the base texture visible, and go back to the layer you painted your hair strands on. It's time to start filling in your basic texture with some finer strands, highlights, and lowlights. I generally just paint on the same layer, but if you like having everything separated, make a new layer. At this point, I reduce the size of my brush slightly, and I make the color lighter and brighter again.


Don't go overboard--we don't want to cover up all of what we just painted...we just want to fill it in and accentuate it. Also, if you look at the top of the texture window in this picture, you'll see that I've started a palette. I put a dot of each color I use on a blank part of the texture, so if I want it again, all I have to do is use the eyedropper.

14. Rinse and repeat. I tend to go up three or four times in lightness, and at some point before the last highlight layer, I may go back with a darker shade (either the base color or slightly darker) and every so slightly dab in some more lowlights. It just depends on how dense and bright I get while filling in.


The depth you add is pretty noticeable.


15. A small note: Don't worry about using rather light and bright color as your final highlight. Use the finest brush you can get away with, and use it to add some random highlighted strands, and perhaps emphasize a few areas of the hair where light will be hitting it. The effect will be subtle, but worth it:


16. Once you've got everything filled in, congratulations, we've got our basic texture. Here comes one of the most important steps, ever.

SAVE YOUR FILE IN LAYER-PRESERVING FORMAT. .PSP, .PSD, SOME MYSTICAL GIMP EXTENSION, I DON'T CARE, BUT SAVE IT NOW AND SAVE IT GOOD.


17. Now it's time for an initial preview. Before you do anything, make sure you have Bodyshop up and your project folder loaded. Sometimes Bodyshop gets pissy if you start resaving .bmps when the project isn't up.

Next, return your texture to the original resolution, if you upped it for more precision. Hit Save As, change the file format to .bmp, and save over your base texture. In this case, it's af_alpha3~whatever. If your paint program prompts you about saving things as a merged image, don't worry about it and hit "Yes/Okay." We saved a layered copy in step 16!



18. Moment of truth? Go to Bodyshop, load the Adult age (or the age of whatever texture you just saved), and hit the little arrow by the tooltip box that is "Refresh."



19. Wait, where's my texture? Actually, look very carefully behind mannequin sim's head. It's kinda red, isn't it?


Actually, this is a demonstration. Often, when there are many identical textures for one age, one texture makes up the literal underside of the hair, one takes care of the scalp, and one's the outside layer of the hair that is most seen.

20. My trick (it's probably everyone's trick) is to save my texture file as every single texture for a particular age group, and then refresh the sim.


That's better. Now check out your texture. It's probably simultaneously a tad bright and a tad flat. We're just checking to make sure we didn't forget to paint a part of the texture, to make sure all of the hair got painted into the part, the end of the alpha. Better to fix it now than to notice it after we added highlights, shading, and made fifteen recolors of the texture.

Depending on the hair, you may want to use the elusive Bodyshop hotkeys and rotate your mannequin...


(As you can see, I've yet to modify the lighting in my Bodyshop, so I operate on hope and faith when evaluating this type of thing! :P)

21. Once your texture is covering the hair mesh in the way you'd like it to, it's time to decide on your highlights and shading. Loading the project in Bodyshop had one more purpose besides checking your work, you can also see where certain parts of the texture lie on the mesh, to help you decide which portions will have light hitting them, and which may be in shadow.

There are many ways to go about doing your highlighting/shading. I think the easiest way is to use layers with special functions. Now, whether you use lighten/darken or dodge/burn or some other combination is up to you. I prefer using dodge/burn and an airbrush to do mine, so that's what you'll see here.


You'll want to make a new raster layer and then change the setting of it to dodge.

22. I often use the lightest highlight color and a large sized airbrush on my dodge layer. So let's say we're going to do the highlights on the bangs, one last glance at the model to see how the light should hit...


Then some drawing in...


It WILL be fucking bright and vivid and you will probably go OH MY GOD. You'll want to damper the effects of this. There are two ways go go about this...

23. In the previous picture, the menu is set to show you method one...using gaussian blur on your dodge layer (or a selected portion of it).


The larger the radius, the farther your airbrushing becomes spread out and diffused over the texture/selected area of the texture.

The other method of adjustment is pretty obvious: the opacity of the dodge layer itself.


Use these two controls in tandem until you come up with the blend that makes your highlights look the way you want to. Depending on the texture, you may want to paint all your highlights at once and adjust them. You may want different highlight layers...this is another area of trial and error, and I definitely haven't perfected it myself! Doublecheck in Bodyshop often, and tweak a lot.

24. Repeat the above process with a burn or darken layer, if you need to add some shading to your texture. You may not find this necessary, especially if you added lowlights when you painted, or if your highlights are quite a bit brighter than the rest of the hair.


Once you get some shading that you are happy with, do the save as .bmp thing again and look at your hair in Bodyshop.


If you are satisfied with where the shading hits, and that it is strong enough for the style of the texture (I would say you would want realistic textures to have more contrast in shading than Maxis-match for optimal "shiny"), then your base texture is done!

25. SAVE YOUR LAYERED VERSION AGAIN FOR THE LOVE OF GOD.

26. If you followed my instructions when choosing the base color and subsequent paint colors, your base texture is more than likely way too bright to make a realistic hair color. But it will be perfect for adjusting for all those realistic and unrealistic hair colors you want to make. I use adjustment layers to recolor my textures.

In PSP, one of the options under the layer menu or the layer palette when making a new layer is to make an adjustment layer. Hue/Saturation/Lightness is my layer of choice for this sort of thing, though I occasionally tweak using other types.


27. This is what the options on the H/S/L adjustment layer look like. The hue wheel changes the color, the saturation reduces the vividness of the color, and the lightness changes how light or dark things are. In this case, to go from a bright red to a dark brown, I made the hue slightly less orange/yellow, reduced the saturation by nearly half, and made it a bit darker.


The trend is good to remember, for how to go from red to brown, but it's not a perfect formula.

For all colors, there isn't a perfect formula. Especially since you're painting from scratch in this case, there are differences in hues and constrast that may vary between, say a straight or curly texture that you painted nearly identically. Keep in mind that you may also want to tweak your shading layers after you change your colors...I find that blacks and blondes usually require some tweaking to change the strength of the highlight or shading layers.

28. Save your final texture to every age that the mesh applies. I make my elder gray at this time, too. That way I have a complete "set" from the get-go. Once you've got your first completed color, RENAME THE TOOLTIP TO SOMETHING SENSIBLE AND INFORMATIVE, and Import to Game.


How you complete the other colors in the set is up to you. I prefer to set up multiple project folders, so I clone all my new projects off of my first completed hair. Others keep changing the textures in the same project, rename the file after every import, so on and so forth.

Once you have everything in your set completed, bin your hair. As jfade has not yet implemented a way to REMOVE extra textures using the Wardrobe Wrangler (it merely hides them), if you want to have only one gray in your set, or you have unused ages to remove, I highly recommend you use Theo's Binning Tool plugin for SimPE to bin them. Don't know how? I already wrote a tutorial for that here. ;)

I hope this tutorial was helpful and informative. Remember, though, the amount of time it will take and the amount of success you will experience probably depends on the amount of time you've spent in the past on both texture drawing of some type (like pencil sketching) and digital art. While I can't magically impart skill level on you, if you get lost at any point in the tutorial, or something is unclear, feel free to ask me for a clarification!

hair, tutorial

Previous post Next post
Up