12 Steps to Hair Heaven -Hair Creation Process Detailed-
“I want to mesh hair!!! ….but I’ve never done it before, and maybe not too much clothing meshing either….”
If this is you, and you are competent but just haven’t tried your hand at hair yet, and think you can safely graduate from the easier tutorials, then read on. If you’ve never used
SimPE before, then ‘go do the ‘easy’ tutorials first’ thats what they are there for and they are good! (Really, they are very good!)
12 Steps to Hair Heaven
This tutorial is going to be big picture overview, helping you put together your first real hair mesh. We will start at the beginning of just putting together a working package and go all the way to color binning, animating, and fixing the genetics! If you've done hair meshes but stopped short of these harder topics, now is the time to improve your hair creating skills! All of the major points that have been covered before in other tutorials are only going to be linked to. This step-by-step is going to assume that you are capable of doing everything those tutorials are asking you to do. If you get stuck on those steps, ask questions in those threads. After you are done with those, don't forget to come back here! Now that that is cleared up, let’s get to it!
First things first, a little heads-up. When everything is all said and done your new hairstyle will have 5 separate packages. One is the mesh package; the other 4 are the standard recolors: black, brown, red, and blonde. When we are first putting everything together we will again have 5 packages, but these will be your starting texture and then a mesh package for each age: toddler, child, teen, and adult. The Young Adult and Elder hairstyles will pull their mesh from the adult version, so don’t worry about them for now. Secondly, there is a set of great articles in the InfoCenter. You don't have to do anything thing with them, but I HIGHLY recommend reading them first, and remembering that they are there and a resource for you.
Linky -> InfoCenter Hair Articles
Step 1: Making the Texture Package
Now, let’s do something! You need a texture package; this is the part that decides what colors things will be. This package also serves another important purpose; it determines how complex your hairstyle can be. This is done with groups. We have to pick a maxis hair (or hair from a creator how allows their work to be cloned) to start with. Pick one with a lot of groups. Unused groups don’t mess up your hair, so having too many isn’t a bad thing, but it is VERY frustrating business to add groups to hair. (I will go over that later, but it’s still very basic, so don’t get your hopes up) Open Bodyshop if you haven’t already, and find the adult female blonde Fly Pigtails hairstyle (if you are making male hair, I don’t care, we will fix that later). I’m sure you can find them; they are the pigtails that defy gravity. Export it with a name that you can remember. A good choice is (whatever you are hoping your hair will look like)-blonde. When I was making my first one (which led me to write this) I named it BabyDollHair-blo. I ran out of space, you probably will too, its okay, we can fix the name later.
Now, (don’t close bodyshop) go into your Projects folder and find the pigtails you just exported. I find that this is a good time to go through with Photoshop, heck Paint will work for this part, and scribble on each hair group of each age with a color. I use purple for toddler, orange for child, yellow for teen, green for YA, red for adult, and blue for elder. Just take a large paint brush and make some large thick lines across them. This will help you later when you are trying to apply your actual texture. I ran into some difficulties with my mesh not picking up the texture I wanted it to and half the time I couldn’t tell which was which. Large scribbles of colors are very obvious so that won’t be a problem for you if you do this. In Bodyshop, click through all the ages to make sure that you have color in places you can see. Once that’s good import it back into your game. Write whatever you want in the tooltip box, we can change it later. (I found this out after typing in “Baby Doll Hair – Mesh by Phaenoh” 16 times….) Now is it in your game? It should now appear in the custom hair bin, crazy colored gravity-defying pigtails. If that’s where you’re at, we are good to go, unless you are making male hair. In that case, read on.
For Gender Switching ONLY: Open your recolor package, click on the Property Set tab. For each age, change the number in the “Gender” line from a 0x00000001 to a 0x00000002. One is female, two is male. The size of the head is different between males and females, so this method only works if you are importing a new hair mesh (which we will be doing here). You also need to change the gender reference in the Hairtone XML. Hit commit after each one and save.
Gender Switching Picture. Go see if it worked. It should now appear in the male custom bin, though the fit with the rest of the head will look pretty bad. Now you are ready to proceed.
Step 2: Making the Mesh Package
Ok, now we have to do a bit of creative thinking. What do you want your new hairstyle to look like? (The best answer is, “kinda like this maxis hair over here, but different”) It’s the best answer because when were are making the mesh it is far easier to combine meshes that to start from scratch. In my Baby Doll hair, I used the child curly pigtails, duplicated them A LOT and added in the adult curls that sit on top of the head, made them smaller and repeated them a couple of times. Take some time, flip through Bodyshop, find all the pieces you want to use. You will need to know what the name of that hair is so you can find the mesh for it later. You can do this two different ways, either go in game and use ‘boolProp testingEnabled true’ in the neighborhood view then enter CAS, Shift N and all the clothing and hairstyles will display their names. Or in bodyshop, export and import the meshes you want, and then open it in
SimPE and get the names that way.
Now would be a great time to put together the second package, your mesh package. Go through this tutorial to get it together. You will have to do it four times, one for each age. Link them to the Texture package like the tutorial says. Do them one at a time, trying to link all four at the same time gets confusing. Come back when you have four mesh packages and one texture package all linked correctly. Now, you won’t be doing the tutorial with the dress, you will need afhairflypigtails also tf and cf. The toddler one is going to give us a headache later so I’m going to let that headache start now. I don’t remember the name of the toddler hair. That’s your first independent task. Open the texture package in simpe. The name is in there somewhere, and figure it out for yourself. Now, get to it! Come back with five working packages! (Remember, one texture, four meshes)
Linky -> Creating a New Mesh Package Tutorial
Step 3: Making the Mesh
Back? Everything linked correctly? Good. If not, go back and do it again. If you skip through this tutorial and miss steps you will have to START OVER to get everything just right. I had to completely start over at least 3 or 4 times when I first did it. Believe me, it is a pain in the behind. That’s why I wrote this so you wouldn’t have the same frustrations I had.
Ok, back on topic. You’ve technically done most of the hard part. Now go be creative! First, just make one age and we will convert them to the others later. Follow the second half of the tutorial you were just at to learn how to export and import your mesh. Take pieces from other meshes, doesn’t matter what age or gender, they are just shapes and building blocks. Play with them! You have three very important rules to remember and follow.
Number 1: Don’t EVER touch the hair group. Don’t add to it, don’t subtract from it, don’t anything. All the vertexes are positioned exactly to match up with the rest of the head and body.
Number 2: If you have two groups that look like they have the same thing on them, don’t delete the duplicate. Double sided things are how you cut them with the alpha.
Number 3: Don’t combine groups. You can break this rule once you get REALLY good and know what you are doing later.
There are many more things you have to take into consideration, read through this article and try to let some of it sink in, I know its daunting, but it will help later if you understand some of it.
Linky -> Hair Layers Article.
Now, once you get into Milkshape you will find that the hair group on the fly pigtails actually have pigtails in it. Don’t panic, just go grab another hair mesh of that age (and of the gender you want your final hair to be for) and use that hair as your base. To avoid random animation issues later, find a rather flat hairstyle that works for all the ages, always use one of those as your base hair group. You will be importing a lot of pieces anyways, just start with a flat hair base import the bones, fix the bone weight when that popup box asks. When you start importing things to make your style, don’t add addition bone structures. Save each age and export them. (You will probably need to edit them later, save this one as ‘AdultMesh1’) The mesh package will be expecting to see five groups when you are done: “hair” “hairalpha5” “hairalpha7” “hairalpha9” and “hairalpha11” make sure your groups match these names when you are done. The comments need to stay unchanged as well. This is what they should be in case you forget or messed it up.
“ModelName: hair
Opacity: -1
HasTangentArray:
NumSkinWgts: 3”
“ModelName: hairalpha#
Opacity: #
HasTangentArray:
NumSkinWgts: 3”
Last thing, when you are almost done with everything, highlight everything but the hair group and assign them to ‘head’ (No complaining about wanting better animation, we will fix that later too) Remember the second half of this tutorial will help you with the technical stuff. Okay, I think that is enough talking at you. Go make some pretty hairs.
Linky -> Meshing Tutorial After that, it would be a REALLY good idea to look at this one.
Linky -> Hair Meshing Tutorial
Step 4: Making the UV Map
Got your hair done? Put them into the mesh package yet? (Go do that if you haven’t) Ok, open Bodyshop….. Do you see it yet? Did it work? How’s it look? Don’t forget, its still in the custom hair bin. Okay, does it look EXACTLY the way you want it? No, probably not. Go play with your meshes until you like it, I ended up making about 16 versions until I got one I liked. It might take you more or less, depending on how complicated or ‘perfect’ you want it to be. I’m gonna go do something else while you are working on that. It could take you days! Though, it might just be 5 minutes, so I’ll be on hand once you are ready.
Ok, back? Finally happy with it? Let’s get that UV Map looking pretty now. Try not to move things too much, try really hard not to scale things, and try to never rotate things. It just makes everything more difficult later. Now that you aren’t allowed to change anything, make sure nothing overlaps. PLEASE try not to rotate things, that’s hard to deal with later. The other two are ‘ok-ish’ but the less changes the better. I’d rather have you move three things than rotate or scale one. Once you think you have everything placed correctly, save it. There is a great trick I use to make sure that nothing overlaps and that I get an accurate UV Map. Highlight everything, group it all together, then go look at the texture map, take a screenshot of it. Nothing should be overlapping now. If it is, go back and do it again. Just don’t save the mesh while its all in one group. Ok, there is a tutorial for how to do it, we don’t need the first part, so scroll to Part 5. Remember my advice as you go through it.
Linky -> UV Map Tutorial
Step 5: Animation
Wait, what? Yeah, animation. You have proven to be competent enough to follow simple instructions, so we’ll go over basic animation. If you had sneaked a peak in CAS at your mesh, and spun the model around, you might have noticed that the hair didn’t move AT ALL. We are going to fix that now. Movement is created by having vertexes assigned to bones. Don’t ever mess with the hair group, its should all assigned to head except for a few ones down at the neck, those need to be assigned 50% to head, 50% to neck. Now, if you have made short hair, as in any hair that is above the shoulders, it’s simple work. The hair bones in the head are: head (no movement), c_hair (pivots on the center of the head), l_hair (pivots from the left), r_hair (pivots from the right, could you guess?), f_hair (from the front), b_hair (from the back). Short hair can be assigned to these in different percentages depending on what you want to do. Longer hair needs to be assigned to parts of the back on the body, I found this handy little
tidbit from HP while I was digging around one day:
Quote: Originally posted by HystericalParoxysm
Don't use the neck bone except for hair that actually touches the sides of the neck. For those back areas, do a smooth transition from head to spine2 - no neck assignments.
Spine2, spine1, and spine0 are all bones in the back. Spine2 is between the shoulders, spine1 is midback (around the bra strap level) and spine0 is around the waist, if I recall correctly.
Smooth transitions from one bone to another (like going 70/30, 60/40, 50/50, 40/60, 70/30, etc. as you move from one row to another closer and then further away from a hair joint) will get you the smoothest animation.
|
Hopefully that should give you a better idea of what is going on there.
Once you have finished assigning all the vertices put the new mesh into the mesh package and this time, you have to test it in game. Sims move around a lot by themselves in CAS, spin them around, you might even take them into a house with it, jumping, running, swimming, all are great things to get them to do. Any very strange movements might look weird, but then again, a lot of Maxis hairs act weird too sometimes. Best of luck, see you next week.
Step 6: Other Ages Meshes
Ok, you have one age that is completely perfectly perfect, right? Ok, let’s get the other ages working now too! For sake of discussion, I’m going to pretend that your perfect mesh is the adult one. Get yourself the teen mesh of the adult one that you took your original hair group from (that ‘flat’hair perhaps? It’s not 100 percent necessary, but it will help you avoid headaches later if you do), then import your completely perfect working adult version on top, it should be at a higher point, scale and reposition all your adult groups so that the hair group matches really close to the one for the new age. Then delete the adult hair group. The teen one should look fine underneath as it was the size that you scaled everything too. Now would be a great time to fix the UV Map for this age, the hair group might be different for every mesh, so you will have to do them each individually. After that’s done, import your new meshes into your mesh packages. You can combine all four mesh packages into one package now if you want, just extract each piece, cres, shpe, gmdc, and gmnd, and import them all into one new file. Save. Don’t do anything else, don’t Fix Integrity, don’t anything. You could have done this step a while ago, but there really wasn’t any need. This package can now replace the old four. Don’t delete them yet, just move them to your desktop, go into Bodyshop and make sure it all still works. You’d be surprised sometimes at the things that go wrong. Once that is all hunky-dory then you can delete the old 4 from your computer. Do they all show up in Bodyshop now? What’s that, the toddler one looks weird? Well, read on!
Step 7: Adding Groups to the Toddler Mesh
It only can support one group right now remember? Right, that’s why it looks weird! Ok, now the tutorial I could send you to is very complicated, and we’ve already done some of the steps so I’ll paraphrase it here. The tutorial was written by our own HystericalParoxysm. Credit/blame her. (No, don’t blame her, we aren’t following her instructions as written, so it’s not her fault if it blows up) Lets add four groups to make the toddler hair consistent with the rest of the ages.
Quote: Originally posted by HystericalParoxysm
For the Mesh Package:
3. Select the GMND resource, and go into Plugin View. In the Blocklist drop-down, select tsDesignModeEnabled.
4. Down at the bottom right, in the drop-down menu, Array should be selected.
Click add to add an array to the list. Select your new item just created, then type the name of the new group you added in Milkshape. You will see it change in the list as you type.
5. Repeat step 4 for each new group you added to the mesh. Commit your changes.
6. Select the SHPE resource. You should still be in Plugin View. Click on the Parts tab.
7. Select the last entry in the list, then click Add. It will clone the last entry. Change the number on the group to the first new group you added.
8. Repeat step 7 for each group you have added to your mesh. Commit your changes.
For the Recolor Package
9. In the GZPS (Property Set) in Plugin View, select the numoverrides line, and change the value to the total number of groups in your mesh – add the number of groups you are adding to the existing value.
10. Look down in the list and find the last override#shape entry. Select it, and then click Add. This will clone it at the bottom of the list. Change the name to add 1 to the number… i.e. if the last item was override2shape, and you cloned that, then change the name to override3shape. Leave the Type (dtUinteger) and value (0x00000000) parts alone.
11. Look in the list and find the last override#subset entry. Select it, and then click Add. This will clone it at the bottom of the list. Change the name to add 1 to the number, to match the override#shape entry you just did. Leave the Type (dtString) alone, but under value, change it to the name of the first group you are adding – if it says hairalpha5, change it to hairalpha7.
12. Now select the last override#resourcekeyidx entry, then click Add. Again, this will clone it at the bottom of the list. Change the name to add 1 to the number, to match the override#shape and override#subset entries you just did. Again, leave the type (dtUInteger) alone.
|
Linky -> HP's Original Tutorial
Ok, done all that? Good. Open Bodyshop. We need to make a new recolor package now, Bodyshop is going to do all that other stuff for us from HP’s tutorial that we skipped. Export it, name it, “somethingMesh2” would be a good name, and import it back into your game. Oh! On second thought, now would be a great time to apply the final textures to your mesh! Don’t import it yet! (We’ll get back to finishing this, I promise)
Step 8: Adding your Texture
Now its time to dig up those screenshots of all the UV Maps that we made! You did save them right? (I’ll pretend you did while you run back and grab some snapshots….) Ok, ready to go! Crop each UV Map to its bounding box, (get rid of all the gray and the rest of the image of Milkshape and your desktop) Scale the image to 512x512 pixels. If its not square, you didn’t crop it very well. Now, go into bodyshop and export all the hair meshes that you used to make your mesh, we are going to the steal alphas and the textures, it is far easier than inventing your own, but you can still do that if you want. In the Projects folder you should see the meshes you exported, if you managed not to move/scale/or rotate the UV Map pieces when you made the mesh, the pieces you need will be in the exact right spot for a quick copy/paste maneuver. Do the alpha first. Grab all relevant pieces and place them in their places, kinda like a really little kid’s jigsaw puzzle. Though, with Photoshop…whatever. Make it work, try to get it as close as possible. Do this once, then copy it to all the other layers of that age. If you are lucky and you didn’t have to move too much around, you might even be able to use some of that to make the other ages’ alphas as well. After you have that done, do the same thing with the texture. Then copy and paste.
60 images later…after you have saved everything click refresh in bodyshop, and all your silly clown colors should be replaced with your new texture. If something went wrong, we know it right away because our helping colors are still there. Make sure you were editing the correct file, your “Mesh2” file. Make sure you saved. Make sure you clicked refresh. Make it work. Once that’s all nice and pretty, import it. Then we can get back to making that toddler mesh display correctly.
Step 9: Adding Groups to the Toddler Mesh Part II
Open up your new recolor package, it will be in your SavedSims folder, don’t open your old one. Go to the Material Definition files for the toddler hair, there should be 5 now. (Assuming you added four like I suggested) All of the toddler hair groups will have its “stdMatAlphaBlendMode” set to “none”. You need to change the alpha layers (the four we added) to “blend”. (The picture shows it as 'none' you need to change that.)
Also in the 'cMaterialDefinition' tab for each alpha group, we need to change it from “SimSkin” to “SimStandardMaterial”.
Now, open up your mesh package and check the GMDC/Groups tab. Click on each group name and check it's Opacity setting. The "hair" group should be 0xFFFFFFFF and all the "alpha" groups should be the same as the alpha group number (but in hex).
Go into Bodyshop and see if that fixed the problems with the toddler hair. After you are done with all this, take it into CAS and make sure everything still animates correctly, sometimes it doesn't for random reasons. If its not working right fix it now.
Step 10: The Other Colors
Now, there are a few last things to do. Go make recolors of red, brown, and black! You know how to make recolors, export yourself yet another version of your blonde version, go get all the same mesh pieces you originally grabbed but in the other colors (a lot of exporting, I know, but it will look good) and get to it. Now, let’s bin these suckers! (It’s really easy, I promise) To make sure that your hair ends up in the correct color bin instead of the custom bin, we need to bin them! Follow the tutorial.
Linky -> Color Binning Tutorial There are a couple other ways of doing it. They can be found here.
Linky -> Other Color Binning Options. If you didn’t bin the colors all exactly right you might have some trouble making sure your eyebrows match the hair color. Read through this tutorial to make sure that yours are fine.
Linky -> Fixing Hair to Match Brows Tutorial
Step 11: Genetics
Got that done? Now let’s fix their genetics so they aren’t always super dominant. Open up each recolor you have made and in the Property Set there is a line that says ‘genetic’ change the 0 to a 1 if it is a black or brown hair, or change it to a 2 if it is a blonde or red hair, for all the elders hair, leave that at 0. This is what Maxis hair is set to.
While you are there, let’s fix the oddity of having 4 identical gray hairs for elders. You can change the ‘flags’ line in three of the hair recolors’ Property Sets from ‘0x00000000’ to ‘0x00000009’, this hides the hair from view without getting rid of it. From looking at Maxis hair, they don’t seem to have a consistent color they use; I’d suggest keeping your ‘best’ color available. If you do this and upload it, be sure to
warn your downloaders that if they delete the color that isn't hidden, they won't be able to pick that hairstyle in CAS or Bodyshop, even though they might have elders who are still wearing it, and other sims who can grow up into it. I highly suggest that you do not do this for strange colors like pink or blue, just let them deal with an extra gray or two in these cases.
Next thing, to make sure that when people are switching between colors of your hair it doesn’t change to a Maxis one instead, we have to make all the hair part of the same ‘family’. In the Property Set there is a line that says ‘family’ there is a really long weird number. Highlight it and copy it. Paste that number in the same place for all ages and for all your other recolors and their ages, it doesn’t matter which recolor's number you use, they are all random. Just don't use mine! Also, as it was pointed out to me, you can only create a 'family' with hair from different bins, don't try to family group two browns together, try making a family group of your darker colors and a separate family group of the lighter versions instead!
Step 12: Final Clean Up
Yay we are almost done! The last things I’m going to cover are just going to make everything just a bit better and easier for everyone involved. First off, find the mesh package. Rename it to YourName-YourHairMesh’sNameMESH.package. Like mine, “Phaenoh-BabyDollHairMESH.package”. Don’t complain, just do it this way. It makes finding it again A LOT easier. Next, find your recolors. Rename them too. Try YourName-YourHairMesh’sName-blonde. Open up your recolor package, if you didn’t give it a nice tooltip last time around, now is the time to fix it. There is one textlist in the package. Find it, and edit the first line, make it say something like “YourHairMesh’sName – Mesh by YourName”.
Congratulations!
You’ve made your first hair! If you want you can upload it and share it with the rest of the MTS2 community, or you can keep it for yourself, that’s okay too. My only request is that you not make it a pay hair, there are already too many of them out there, and I would hate myself if I knew that I contributed to the sick economy of buying and selling virtualwear. It’s a game, you didn’t program it, please don’t try to make money off it. You used Maxis work (or other people’s hard work, mine included) so unless you plan on sending me my cut of your takings, please don’t make people pay for it. Okay, now I have to think of something else to say because I don’t want you to go away with that bad taste in your mouth. Um… check out the hair I made which prompted me to write this tutorial?
Linky -> Baby Doll Hair
If my tutorial was useful, leave me a note telling me so! If you had a problem with it, re-read the step first, then ask questions.
Thanks!
-Phaenoh