Tutorial:Sims 3 Hair Basics
Introduction
|
This is a VERY BASIC overview of how to make TS3 hair. It is NOT a full idiot's guide tutorial and is geared toward people who were already working on hair for TS2 and just want to convert their stuff or get started on making new stuff for TS3. It has no hand-holding, no pictures, and no big red arrows. Yes, it's complicated. Yes, it's hard. But it's worth it in the end. If the challenge doesn't scare you, read on. If it does... wait for other people to figure this stuff out and explain it better. ;)
Required Stuff
You need to get and install ALL of this before you start. Yep, there's a lot of it, but they're all pretty small.
- DABOOBS - For packaging up your hair mesh and making it unique.
- .NET 3.5 - Required for DABOOBS.
- Milkshape - You will need the 1.8.5 BETA version.
- Q-Mesh GEOM Plugin for Milkshape - To be able to import and export .simgeom files.
- msAlignNormals Plugin for Milkshape - To, um, align normals.
- Unimesh Plugin for Milkshape - For multi-weighting if you're doing a hair that's any longer than the back of the neck.
- Example Bodies and Faces - To use in scaling and aligning your mesh.
- DDS Plugins for Photoshop, GIMP, Paint Shop Pro, or whichever program you use to edit graphics - For creating and editing the textures you will need to make.
- CTU - To grab one of the game's meshes to import so you have a basic skeleton, and to look at the game's original textures.
- SimPE - If you are converting a TS2 mesh to TS3.
- S3PE - To peek inside files you've already made to get the instances for existing DDS files, so you don't have to duplicate them for other ages/genders.
Extract (For Converting - Optional)
If you're transferring a mesh from TS2 to TS3, you'll need to extract it first.
Open the mesh file in SimPE. Click on the GMDC (if there are multiples, pick the adult one), and in plugin view, look at the list of subsets listed under Models at the bottom left.
Note: If there are duplicates of the same exact name (as some meshes have) you will have to rename them so they all have unique names. To do this, click on the Groups tab, select each group in turn, and give it a unique name in the "Name" field - i.e hairalpha7-1, hairalpha7-2, hairalpha7-3, and so forth. If you don't do this, the separate groups will all be combined when importing into Milkshape. Switch back to the cGeometryDataContainer tab (first tab) when you're done.
Tick all the little boxes beside the part names, and then click Export. Leave the file format as the default, .obj, and save it somewhere you can find it.
Get a Base Mesh
Run CTU. File - New. In the dropdowns, choose age, gender, and Hair. Choose the mesh you want to use as a base. I usually use AMHairBalding - it does not matter if you use a different age/gender than what you're making!
Choose Extract Meshes and save 'em somewhere you can find them.
Edit in Milkshape
Getting Started
Run Milkshape. File>New. File>Import>QMesh Sims 3 Geom Importer.
Choose the LOD0 file you extracted with CTU. You'll get a message about the default skeleton being used. Ignore it and click OK.
File>Import>OBJ and choose the example face/scalp/body obj file appropriate to the age/gender you're creating for.
File>Import>OBJ and choose the hair you're converting that you extracted with SimPE (if you're doing a conversion).
Editing Your Mesh
Now you need to edit. If you're doing a conversion, delete any duplicate groups that were the undersides for TS2. Shape the hair to fit the head and body. You can use Coloured Groups to make sure nothing pokes through. The hairline shouldn't be right where the scalp starts, but about an inch forward of that.
All TS3 hair meshes are ONE group and the scalp is always present and always the same shape, though you can change its texture. So you will have to adjust your mapping so all the hair parts can fit on one 1024x1024 texture.
Get your mesh all nice and shiny and ready, and then save a copy of it all separate in MS3D format, so you've got it if you ever need to do a major edit.
Then regroup it all together and delete the scalp/face/body so all you have left is your single group hair, and the original hair (you can keep the original hidden).
Select the whole hair, and do Vertex>Sims 3 Extra Data Tool. Fill in 255 in all the boxes and then click all 4 "To All" buttons and then finally Commit and Save All. This makes it so you can recolour the hair properly in game. You can use other settings than 255 and not select the whole hair, for different effects.
With the whole hair still selected, duplicate it. Face>Reverse Vertex Order to flip it inside out. Then scale the whole thing (XYZ) by .999 to make it slightly smaller, and Vertex>Align Normals. With this duplicate still selected, do Vertex>Sims 3 Extra Data Tool. Fill in 240 in the first 3 boxes (0, 1, and 2) and 255 in the 4th box (box 3). Again, click all the To All buttons, then Commit, Save All. Now you've got the underside of the hair made, and it will be a little bit darker than the top of the hair.
Select All again and flip to the Joints tab. Scroll through the list till you find b__HeadNew__ (a little more than halfway down) and click Assign. This will attach the hair to the head. If you're doing a longer hair, you may need to get the Unimesh tool to do more complex multi-weighting to more bones than just the head, but a flat basic assignment to HeadNew is enough for short hair to work fine.
Now click on the Groups tab. Click the name of the original mesh (probably GEOM-00) and click Comments. Select everything in the comments box and copy it. Regroup the underside and top side together into one group, and paste the comments from the original mesh into the comments box for your mesh. Now you can delete the original mesh.
File>Export>QMesh Sims 3 Geom Exporter and save your file with a descriptive name. Make sure to put LOD0 somewhere in the filename.
Make your LODS
Now you also need to create 3 lower-detail versions of the same mesh. While you can remesh the whole thing from scratch with lower detail, there's a quick and dirty way of doing it that works okay... Tools>DirectX Mesh Tool. Drag the slider over to the left and you'll see how the number changes. That's your poly count. Click the floppy disk icon to apply changes. It may look kind of ugly, but the only ones that really matter is the LOD0 (used in high detail) and LOD1 (used in low detail and in the portrait pictures) - the others are only used when zoomed WAY out so as long as the overall shape still resembles your hair, it's fine if they're kind of fug.
For LOD1, you'll want about half the count for LOD0. LOD2 should have about half of that, and LOD3 should have no more than about 250 polys.
Reduce your mesh into each of the 3 lower poly versions, and after each reduction, save the result as an OBJ file.
Then, you'll need to do File>New and import your LOD0. Open up the comments and copy them, then delete the LOD0. Import the OBJ for LOD1 (2, or 3) and then:
- Align Normals (it will have gone black)
- Redo the bone assignments (Joints tab, assign to b__HeadNew__)
- Reset the Extra Data (just fill in 255 for all, To All x4, Commit, Save All).
- Paste the comments again.
Then export as LOD1. Repeat for LOD2 and LOD3, making sure to do the normals, bone assignments, comments, and extra data after each.
Age Conversion
If you want to age convert it, you can use the same mesh for teen through elder and only have to size it down for children and toddlers. You can do File>New, import your existing LOD0 and the child scalp/face and scale to fit, retaining the same normals/assignments/extra data, just changing the positioning and sizing. Repeat for all your LODs and save separately. Repeat again if you want to do it for toddlers too, again saving separately.
Gender Conversion
Female and males (teen through elder) can use the same mesh in some cases, but in others will need some reshaping done (a more feminine or masculine hairline, and adjusting for clipping). You can do the same as an age conversion to gender refit - import your existing LODs and scale/reshape. Both genders of child and toddler can always use the same meshes for both genders.
Textures
Because of the way TS3 hairs are constructed, you are basically limited to just a few textures.
- Main: This will be the actual hair part - all the bits that you've meshed in.
- Scalp: A texture which overlays the basic scalp.
- Face: Optional - this can match up with the hair of the scalp texture around the edges for tendrils at the back of the neck, the start of sideburns, whatever.
Each of these consists of three parts:
- Diffuse: The actual texture itself. This should look like a light grey or white version of your texture.
- Specular: A dark grey, almost black, low-contrast version of your texture. This is the shine applied to it.
- Control: This controls the way the highlights, roots, and tips are applied to the hair via RGB channels. Red is roots, green is highlights, and blue is tips.
Additionally, you also have a bump map which can make the hair have a bit more 3D type detail, and a Halo, which seems to affect the way shine is applied overall to the hair. TBH, the bump map doesn't add a whole lot to the hair in most cases, and the Halo only seems to matter in CAS, so it doesn't make too much difference if you use a blank bump map set to fully grey, and use a halo from one of the game's hairs (I use the one from amHair Balding - more on that later).
The best way to learn how to do these separate textures (as I'm not going into detailed texture editing here - I'll try to do that in a later, more in-depth tutorial) is to look at some of the game's existing textures and see how they're done. You can also open up any of my hair files in S3PE or Postal and export the DDS files and see how I did them, as well.
Most files should be saved as a DDS in DXT3 format - don't save as DXT5 if you have an alpha as it will generally pixellate the edges more than DXT3. Bump maps may be DXT5 with an alpha.
DABOOBS
Once you've got all your textures together, it's time to package it all up and see if it works in-game. For this, you'll need DABOOBS. Go ahead and run it.
Start
On the Start tab, type your name into the Creator Name box and click Start!
Step 2 - Mesh Name
Type a new, unique mesh name - the more unique, the better. "Hair" is not a good mesh name but "LongWavyFlippyEndsHP" or "ShortFluffyCurlsHP" are both good - long enough and complicated enough that it's unlikely anyone else will use the same name, plus your name or initials.
Step 3 - Age & Gender
Here's where you set the flags for your mesh. You'll be creating each mesh package separately, so even if you have mesh files for all ages and both genders ready, you need to do them one at a time based on who can share meshes. For example, you'd probably want to start with ticking teen, young adult, adult, and elder under Age, then Male under Gender, so you can make just the male one for the older ages, then come back later and do female, child, and toddler separately.
Under Category, tick everything except Singed unless you've got a good reason to do otherwise.
Under Extended Category, tick Valid for Random (if you want it to show up for random townies and NPCs) and Valid for Maternity (if you want it to work when sims are pregnant).
Step 4 - Mesh Files
Click the little ... box next to each of the LOD# boxes in turn, and select the meshes that correspond to the age and gender you're working on.
Step 5 - Texture Files
This is where it can get a bit complicated. As mentioned above in the textures section, you have three sets of textures (Main, Scalp, Face) and each of those has three textures of its own (Specular, Diffuse, and Control).
You can, of course, make your own textures for all of those by looking at the game's textures and editing accordingly. But you can really shave a lot off your file size by pointing to existing textures - either those already in the game itself, or ones in packages you've already created. That second bit becomes essential when doing multiple ages, since you really don't want to duplicate all the same textures you've already used.
For those that you've made your own, just click the ... and tell it what you want it to use. You can, of course, mix and match - for my hairs I've mostly done my own diffuse/specular/control for the Main hair, and used a game's bump map, halo, and diffuse/specular/control for scalp and face.
If you want to have it use an existing texture, the input is:
key:00B2D882:00000000:5AC6E29A1785DFF3
... You just type that into the box instead of choosing a file. That's Type, Group, and Instance of the resource you want to use. You only need to worry about changing the last bit, the Instance, to the instance of the DDS image you'd like to use for that item. You can get the Instance for game resources using CTU, and you can get the instances of textures you're already using in a custom file by viewing the file with S3PE or Postal.
Useful Keys
You may find the following keys helpful:
Neutral bump map (for if you don't want any bump map):
key:00B2D882:00000000:75AECFABC8FE9704
Halo for AMHairBalding (good basic halo):
key:00B2D882:00000000:9C8F76BE31BAF565
Scalp for AMHairShortFeather (good basic scalp that covers the whole thing and matches up with face detail - works for teen through elder, both genders):
Specular: key:00B2D882:00000000:3B890787BE1DB9AD Diffuse: key:00B2D882:00000000:92C99DF8DE3E1D0A Control: key:00B2D882:00000000:324631309AB8D48E
Face for AMHairShortFeather (good basic light sideburns and back of the neck tendrils - works for teen through elder, both genders):
Specular: key:00B2D882:00000000:E64B453A10B61860 Diffuse: key:00B2D882:00000000:AA3BD199AEA63369 Control: key:00B2D882:00000000:7C2FF8F07ACD5A44
Scalp for CMHairShortCleanCut (good scalp for children, both genders):
Specular: key:00B2D882:00000000:F7B9BE9886B5F828 Diffuse: key:00B2D882:00000000:8443DDCF3D15863F Control: key:00B2D882:00000000:BF21D8071180F0BC
Face for CMHairShortCleanCut (good face overlay for children, both genders):
Specular: key:00B2D882:00000000:E2E91E3913B73EEA Diffuse: key:00B2D882:00000000:E82198778B1ED5F7 Control: key:00B2D882:00000000:29BFB36CB647DE2E
Scalp for PUHairScalp (good scalp for toddlers, both genders):
Specular: key:00B2D882:00000000:BE9EDAC253A16E7 Diffuse: key:00B2D882:00000000:031152C3C770F730 Control: key:00B2D882:00000000:0E7059B8F9908A23
Face for PUHairScalp (good face overlay for toddlers, both genders):
Specular: key:00B2D882:00000000:7EDB84F4D7931D5F Diffuse: key:00B2D882:00000000:D0ACC4782A6C4752 Control: key:00B2D882:00000000:60C717C972A879FB
Step 6 - Generate Hair
Just click Generate! here, and choose a filename. Let it chew on your stuffs and when it's done, you'll have a new file!
Test
Go stick it in-game to test! You can save your project in DABOOBS to come back to later if you need to make changes. Then just flip to the appropriate tab and choose a new file to make any changes. Sometimes you'll need to tweak your mesh or textures, or adjust your LODs. It's MUCH easier to do with DABOOBS still open (or from a saved project) than to rebuild the info.
Other Versions
If you're doing other ages/genders, again, you can load your saved project in DABOOBS and just change the important info - usually the meshes used and maybe some of the texture files. Make sure to flip back to the Mesh Name tab and change the mesh name for other ages/genders!
Remember, don't duplicate your own textures - use S3PE or Postal to check the instances generated by DABOOBS in your existing files and input them as keys. You only need one file to hold your textures and the rest can depend on it.
Test Thoroughly!
Put your mesh in-game. Put it on a sim and move them into a lot. Zoom in and out wildly. Check their thumbnail and portrait on the UI. Go into Create a Sim or Change Appearance and test how the colours work. Look at it from every angle. Have your sim animate - look up, down, side to side. If you notice any major issues, go back to your files and change 'em! Everyone makes mistakes, but don't make crap!
Confused? Have questions?
Yes, we're all still confused at this point. Modding is still in its infancy and there's a lot we don't understand. You can post your questions directly relating to this tutorial on the MTS thread here:
Credit
Tutorial by HystericalParoxysm. Please do not repost elsewhere - this tutorial will be changed and updated as new information is available. Please contact HP on MTS regarding translation into other languages.