Quick Reply
Search this Thread
Forum Resident
Original Poster
#1 Old 29th May 2023 at 2:23 PM Last edited by CardinalSims : 19th Dec 2023 at 2:57 AM. Reason: Added Part 2 Link.
TUTORIAL: Hair Creation Start to Finish (2023)
PART ONE: Mesh and Texture Starting Point

NO MILKSHAPE OR TSRW REQUIRED. Welcome to enlightenment.

Requirements
Blender 2.8-3.x (tutorial is written with 2.93 )
GEOM Tools
Photoshop + DDS Plugin or GIMP
S3OC
S3PE
SimGeom Editor
MeshToolkit


Process Index
  • Import Mesh to Blender
  • Add Material Properties
  • Remove Unwanted Geometry
  • Optimize Texture and UV Map
  • Edit Mesh
  • Create Underside
  • Clone an EA Hair
  • Prepare for Export with GEOM Tools
  • SimGeom Editor Fix
  • Bone Assignment in MTK

The most basic components you will need to create a fully functional (game standard of quality and completion) hair are
  1. Any Blender compatible mesh saved as .obj, or an existing GEOM
  2. The texture it is mapped to.
  3. To trust me that it may be intimidating to learn, but this combination of new and overlooked tools is the easiest to master and provides the most reliable results. The tutorial is only so long to provide all valuable information.
Because any OBJ can become a hair with these steps, the following steps can be universally applied to any major hair edit. You can follow these steps with a mesh you created from scratch, an .obj extracted from other games, and existing TS3 GEOMs that require an update or an age-gender refit. If you want to make a MESH from scratch, learn from any (non-TS3 specific) modelling tutorials before starting here.

DISCLAIMER:
The only thing this part of the tutorial doesn’t cover is multi-group hair ie Hat Hair. There will be a tutorial on hat hair assembly after this one. Please only use meshes where every piece is hair.
Appropriate Mesh Details:
10k Faces/Polygons is the higher limit for playability. You are free to use far denser meshes for your own purposes, just be aware that Sims with high poly CASParts will take noticeably longer to render out of their lower detail meshes. There is an upper limit to vertices that 'explode' meshes when passed. Keep in mind, undersides will near double the polycount.
Appropriate Textures:
Greyscale. DDS format, 1024x1024, DTX5 compression is the standard. TS3 supports scaling, so you can use 512x for performance or 2048 for HD, etc.

I will be explaining this tutorial with RaonJena’s Hair25 for Adult Female (converted to obj, for proof of concept) for a number of reasons.
  1. Original download completely unavailable with no known archives. Badly in need of saving from being lost to time!
  2. Poor UV layout.
  3. Never had morphs.
Preparing Foundation Diffuse and Mesh
The basic greyscale texture and your main hair mesh are closely connected and will form the majority of the work that every other stage will cleanly build from. There will be two more parts to this tutorial- creating LODs and Morphs from LOD0 + making a full texture set from the diffuse.

Starting out, create a folder to contain all of your work. Move/Export your mesh and texture to this folder. You can also go ahead and make two sub-folders- EA and New. This will help keep your bearings with all the files that pile up.


Import Mesh to Blender
If you didn’t come here from “Part Zero”, visit TUTORIAL: Prepare Blender 2.8+ for CAS Creation and come back when you have prepared your project template.

Open the prepared .blend file.
File > Import > the .obj or .geom of your mesh.


Add Material Properties
Hairs have unique alpha transparency that means you won’t have an accurate visual of what parts of the mesh are visible without applying the texture first.
Change render mode to Material Preview.


Open the Material Properties tab.
Some meshes will already have a material assigned. Remove this with the minus button.
Click the + New button to add a new material.


Click the dot icon beside Base Colour and select Image Texture. Click Open and import your texture.



Transparent areas will be black.
Scroll down to Alpha. Click the dot icon, and select Image Texture again. The list of options may be so long that you have to scroll up to find it. This time, click the dropdown arrow and pick the same texture.



Scroll down to the Settings menu and change the Blend Mode to Alpha Clip. The parts of your hair that need to be transparent should render properly in viewport now.


Remove Unwanted Geometry
Optional/As Needed.

Optimize Texture and UV Map
Optional/As Needed.

Edit Mesh
Now that the ‘troubleshooting’ is taken care of, or if you and a suitable mesh skipped ahead, it is time to make all desired changes to the hair itself. Revisit the setup tutorial for examples of useful Blender tools.
You might start with something like this.

The mesh I am working with is set too close in the back and too far in the front. I’ll also be making smaller edits- making sure the hairline is flush with the scalp, hiding incomplete geometry, and pushing a clipping hairstrand into place.

General Suggestions:
In Edit Mode, utilize the Select Circle (C), Scale (S), Grab (G), X Y and Z, and Proportional Editing to fit the mesh to the TS3 head. Use these tools for the large and obvious changes. Select individual verts to tweak clipping, smooth sharp edges.
If you are making any changes more advanced than scaling, please remove undersides by following the steps in Remove Unwanted Geometry.
Stay alert for stray selections, as selections ‘see’ through inactive objects (ie. the reference body). Toggle X-Ray (Alt Z) to catch orange verts you don’t want.

Diagonal sections of mesh, particularly chest-length sections of hair, that need to move in natural gradients will benefit more from being moved in Sculpt Mode with the Elastic Deform tool. Use Grab for sharper movements, and press F to change brush size on the fly by moving your mouse. The default strength is usually fine. Push geometry into place.
If you need to sculpt one part of the mesh separately, select it with L in Edit Mode, right click, Separate > By Selection. When you are done, in Object Mode Ctrl click on both pieces, right click, Join.
Take care not to separate anything less than an entire ‘linked’ piece. Splitting geometry shears vertices and separates normals that require advanced welding and fixes to put back together.

Example:

If you’re all done, the last thing to check off your list is to switch to Object Mode, select the mesh, Alt + A in the viewport and Apply All Transforms. Repeat on any and all meshes you worked on because if you accidentally made changes in Object Mode (or if you imported an obj) there will be values that aren’t saved until applied.

When you are done and everything looks how you would like it ingame, it is time to make an underside.

BEFORE

AFTER


Create Underside
If you were working with multiple meshes for any reason, join them with the same technique as above. Turn on Face Orientation to see what is going on.
See Remove Unwanted Geometry section if you don't know what undersides are, or are unsure if your mesh has them already.
Switch to Object Mode. Select your mesh in the hierarchy. CTRL + C then CTRL + V to duplicate.


Hide the first mesh and select the duplicate. Switch to Edit Mode, press A to select all faces. Open the mesh menu, navigate to Normals, and select Flip. This duplicate is now a mirror image for viewing faces from the other side.


Unhide your main mesh. You will notice that the faces are now magenta and purple for both normals existing in the same place. You can leave this as it is, scaling the duplicate is entirely a matter of taste. It can make separating the sides easier in the future to scale the duplicate by 0.999 or whatever value turns the faces blue with no purple flicker, so you might want to do that if you aren’t yet confident in removing undersides.
Object Mode > click both meshes > right click Join.


If there are parts of your mesh where you cannot see the backfaces from any side (on a bun, for example), feel free to select those faces on the underside and delete them.

Take a deep breath and relax- you’re at the biggest milestone in the process. The outright mesh preparation is complete and all that remains is making it game-ready. This is an important stage to remember to save your work, take a break, have a snack and hydrate, and maybe remember that you put your headphones in but didn’t turn on music for the past hour of work.

There are some little finalizations to have your pair of resources ready to move on.

Clone an EA Hair
Open S3OC, select Clone > CAS Part.


When it loads, click the Name header then the EP/SP header to sort.
Scroll down to the hairs for the age and gender you are creating a hair for. For general GEOM reference, it doesn’t matter what one you pick. If you need a reference for bone assignments (ie. your mesh wasn’t a GEOM to begin with) pick a hair of the most similar style, in terms of length and position of the hair. NO HAT HAIR.

I make default replacements, so I’m lucky in always having a specific hair in mind to clone. In this case, afHairLongStraightSidepart.
Click the hair you want to use, then Clone or Fix.


Check Deep Clone. If you want to make a default replacement later, check Include Thumbnail and uncheck Renumber. Click Start and choose your project folder to save it in (I put it in the EA folder).


Open the package with S3PE. Sort by Tag.
Scroll down to the GEOMs and export the LOD0 to the same folder. I name this ‘Reference.simgeom’.


If you don’t have scalp and face textures for your hair yet, you might want to look through the _IMG resources and export those too- but I will go into more detail on that in Part Three.

Prepare for Export with GEOM Tools
Return to Blender and Import the Reference.simgeom into your project. With GEOM Tools installed correctly, the option is both under File > Import and Scene Properties.


Select the reference and Shift+Click your completed hair. In the Scene Properties tab, click Transfer GEOM Data. You can delete the reference.


Select your hair. In the same GEOM Tools, select Recalculate IDs.


Then select Export GEOM. I name this one LOD0 and save it in the New folder of my project.

SimGeom Editor Fix
This section was originally ‘Necessary Milkshape Tweaks’, but I ironed it out of the process last minute.

One chunk of data doesn’t export out of Blender correctly, but that can be fixed with Delphy’s SimGeom Editor.
Open the program. File > Open the Reference.simgeom. File > Export MTNF. I just call it ‘MTNF’.

File > Open your new LOD0. File > Import MTNF.
File > Save.

Most hairs seem to have identical settings, it may be ok to use the same exported MTNF every time.

Assign Bones
Simplified here, you can also do them manually with Weight Paint. Open MeshToolKit, Auto-tools for GEOM, Assign Bones. Pick your LOD0 for the first box.

If you edited an existing hair, you can use the original as the reference (if it’s still for the same age and gender). Otherwise, use the EA hair you cloned.

Click Do Assignments and Save and overwrite your LOD0.

PART ONE COMPLETE
You now have the two most important ‘parent’ files that will expedite the creation of every other resource (LOD0 to all morphs and LODs, the diffuse to the specular, control, and normal map.)

Changelog:
6/06/23 - Images resized where possible, optional sections contained in spoilers, and formatting/spacing improvements.

When it is available, this tutorial will pick up from:
PART TWO: Hair Morphs and LODs from LOD0 in Blender + Final Assembly
7 users say thanks for this. (Who?)
Advertisement
Forum Resident
Original Poster
#2 Old 29th May 2023 at 2:23 PM
[reserved]
Test Subject
#3 Old 25th Apr 2024 at 5:36 PM
https://media.discordapp.net/attach...1211&height=681

can you help me with this the mesh looks extremely wonky :/// (i didnt import the fat mesh yet but)
Forum Resident
Original Poster
#4 Old 26th Apr 2024 at 5:53 AM Last edited by CardinalSims : 2nd May 2024 at 2:10 AM.
Quote: Originally posted by Ard4x


can you help me with this the mesh looks extremely wonky :/// (i didnt import the fat mesh yet but)


Hi there
I'd be glad to take a look and see if I know what happened- if you put the .package in a zip file you can attach it to a reply here, or alternatively upload it somewhere like Google Drive and send me the link.

[Edit:] The issue was resolved in this thread

Cardinal has been taken by a fey mood!
Test Subject
#5 Old 27th Apr 2024 at 4:37 PM Last edited by Ard4x : 27th Apr 2024 at 6:01 PM.
Quote: Originally posted by CardinalSims
Hi there
I'd be glad to take a look and see if I know what happened- if you put the .package in a zip file you can attach it to a reply here, or alternatively upload it somewhere like Google Drive and send me the link.


Hi, so i swapped that mesh to some other one because i didn't really like it but not i'm having another issue. I made the mesh and all that (except for the fat morphs and the lod) but now it doesnt show up in game and in tsrw it gives me this error:

https://imgur.com/nhP9E6l

Here's the zip for the package, and thank you for making me learn blender u really helped a lot

https://drive.google.com/file/d/1WI...iew?usp=sharing
Lab Assistant
#6 Old 19th Jul 2024 at 11:06 PM Last edited by thornowl : 19th Jul 2024 at 11:22 PM.
I'm yet to follow this workflow myself (I've only made hair in TSRW). It seems like you export a geom only to run it through Delphy's editor and MTK, then import it into Blender again to make morphs.. But I'm pretty sure that if you export as obj and convert it to geom using MTK, it will inherit all of the reference's data including MTNF, simplifying this process a bit. I've only tested that on accessories, but all simgeom files are technically the same no matter the category, so I don't see why it wouldn't work for hairs.
Forum Resident
Original Poster
#7 Old 20th Jul 2024 at 4:54 AM
Quote: Originally posted by thornowl
But I'm pretty sure that if you export as obj and convert it to geom using MTK, it will inherit all of the reference's data including MTNF, simplifying this process a bit. I've only tested that on accessories, but all simgeom files are technically the same no matter the category, so I don't see why it wouldn't work for hairs.

Interesting, thank you! That makes perfect sense, I'll note it down for later revisions.

The end part of this gets a little messy as I started with auto-bones in mind, but personally do them manually and so do need to rely on GEOM Tools to retain them. I even discovered that it only needs to be opened and saved in SimGeom editor to fix the MTNF, then went down a slight rabbithole of trying to fix the Blender plugin itself But I can more readily consider geom export to be broken for now with that alternative in mind, as I can always just use the broken geom as auto-bone ref.

I've been intending to redo the entire tutorial sometime to better match where my workflow went after I made it, 100% in image form this time so that it's visually easier to follow. The time for all that formatting and graphic design just escapes me, but perhaps one day soon
Test Subject
#8 Old 22nd Aug 2024 at 7:48 PM
so, i did exactly as it says, but the hair now turned into a geom file ends up into a 90 degree angle whenever i import it into a new blend file, i tried manually changing it but it keeps the same
Forum Resident
Original Poster
#9 Old 23rd Aug 2024 at 1:41 AM
Quote: Originally posted by Corujitto
so, i did exactly as it says, but the hair now turned into a geom file ends up into a 90 degree angle whenever i import it into a new blend file, i tried manually changing it but it keeps the same

Hi!
The most likely cause of this are unapplied transforms, left over from being an .obj or changes you may have made in Object Mode.
The fix for this is right before the Before and After images on the tutorial:
Quote: Originally posted by CardinalSims
If you’re all done, the last thing to check off your list is to switch to Object Mode, select the mesh, CTRL + A in the viewport and Apply All Transforms. Repeat on any and all meshes you worked on because if you accidentally made changes in Object Mode (or if you imported an obj) there will be values that aren’t saved until applied.

Basically, any transforms listed in the Object Properties tab are temporary and will not be preserved when the mesh is exported.
There was also a typo for the hotkey that I have just fixed
Scholar
#10 Old 15th Oct 2024 at 8:54 PM
Hey! I've bbeen working on some crazy stuff lately, that involves hair... I was wondering if you ever used "afHairBun" as a base? TSRW opens with similar properties to a hat/hair, but no multiplier, and only has a hair mesh.

Shiny, happy people make me puke!
Forum Resident
Original Poster
#11 Old 16th Oct 2024 at 3:18 AM
Quote: Originally posted by LadySmoks
Hey! I've bbeen working on some crazy stuff lately, that involves hair... I was wondering if you ever used "afHairBun" as a base? TSRW opens with similar properties to a hat/hair, but no multiplier, and only has a hair mesh.


Yes, this is a weird one!
A couple of base game hairs do this, but the bun is notable because it also has a separate version for all ages. Makes me think it was the first hair they made for the game.
I think cloning software trips over textures that are reused too often or don't appear to 'belong' to a specific part, detecting it as generic and only referencing it instead of including it.

This can be worked around by using S3OC's 'Deep Clone' option which will force a copy of all resources referenced to be included in the package. That should then be able to be opened in TSRW and contain all of its parts.
Scholar
#12 Old 16th Oct 2024 at 4:06 PM
Quote: Originally posted by CardinalSims
Yes, this is a weird one!
A couple of base game hairs do this, but the bun is notable because it also has a separate version for all ages. Makes me think it was the first hair they made for the game.
I think cloning software trips over textures that are reused too often or don't appear to 'belong' to a specific part, detecting it as generic and only referencing it instead of including it.

This can be worked around by using S3OC's 'Deep Clone' option which will force a copy of all resources referenced to be included in the package. That should then be able to be opened in TSRW and contain all of its parts.


Yes, a very weird one! I did compare TSRW to deep clone, and resources appear to be the same. I also checked a couple of TSRW versions. What sticks out to me, as a TSRW user is that non-hat/hairs usually use a different format. but this one uses hat/hair format, with "is hat" NOT checked, and only the hair mesh, with no hat or accessory mesh. Although, I havven't done that many hairs. Makes me think it might be more suitabble for hair clones than the pigtails? Hmmm...

Shiny, happy people make me puke!
Back to top