- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Body Shop >
- Body Shop - Modding >
- How do I properly link a new hair mesh on Simpe and properly bin it to the correct color?
- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Body Shop >
- Body Shop - Modding >
- How do I properly link a new hair mesh on Simpe and properly bin it to the correct color?
Posts: 1,073
Thanks: 134 in 4 Posts
Posts: 12,927
Thanks: 3 in 1 Posts
The PropertySet in the 3DIR nearly always lists the wrong age, so don't trust it.
As for binning, I suggest you use Cat's binner, because it fixes a couple of other resources and can remove unwanted ages, too. http://ww2.modthesims.info/d/434016
(Tip: I usually save a non-binned, mostly untouched file, in case something goes wrong in the binning process, or I want to rebin the hair. Saves you from having to redo the hair. Cat's binner can make backup files, though)
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
I feel like I'm repeating myself over and over (this question has popped up at least 3 times the past month or so), but you need to look at the Material Definition in the 3DIR you're linking, an compare it to the two age/gender letters in the Material Definition/TXMTs in the file. That's the surest way to link hairs correctly (if the hair resources have been very altered by adding ages and such, there's a slight chance this method won't work, but so far it's worked for me). The PropertySet in the 3DIR nearly always lists the wrong age, so don't trust it. As for binning, I suggest you use Cat's binner, because it fixes a couple of other resources and can remove unwanted ages, too. http://ww2.modthesims.info/d/434016 (Tip: I usually save a non-binned, mostly untouched file, in case something goes wrong in the binning process, or I want to rebin the hair. Saves you from having to redo the hair. Cat's binner can make backup files, though) |
Which one do I look at,the one with all the ages in it or the one with the hair tone xml information? Linking hair is so much more complicated than linking outfits and i'm just trying to test out what the texture would look like on the tweaked EA mesh and find out if the uv map needs some readjecting or the texture or both. I couldn't find a good tutorial that explains how to link new hair or accessories meshes,they're were written for new outfit meshes. Here are my files that i'm working on,i'm trying to get the cfhairpompore mesh to show and i'm just using the meg as a reference. The pompodore hair is originally just meant to be worn by males but i'm trying to make it to where it would look more girly and that's what i'm trying to get to show up on bodyshop.
cfhairpompodore.zip (686.8 KB, 5 downloads) - View custom content | ||||||||||||||||||||||
306362 2018-05-08 21:18 cfhairmegmeshes(unaltered).package 294925 2018-05-08 15:42 cfhairpompodore.package 56292 2018-05-08 15:34 cfhairpompodoremesh.package 370179 2018-05-08 21:12 cfhairmeg (unaltered).package --------- ------- 1027758 4 files |
Posts: 12,927
Thanks: 3 in 1 Posts
I noticed the lack of good accessory tutorials too, and made this: https://www.tapatalk.com/groups/moo...rial-t1979.html (it's without pictures, but if you've linked hairs or clothes before, you should be able to get through this without too many issues). It shows how to make any variant of multi-age and multi-gender accessories, even how to add infants. It doesn't show the meshing process, but it does list things you need to do before exporting from Milkshape (yes, currently you need MIlkshape for it, but I'm sure it can be adapted for use with Blender).
Linking hairs and accessories is basically done the same way, but the resource names and the 3DIRs are different. For accessories they follow a logical pattern (instance numbers are always the same), and for hairs they don't (or maybe they do - there's likely some logic in there somewhere)
Is the hair "cfhairpompodore" binned? The "Hairtone" in the PropertySet still has a random number (needs to be 00000001-0000-0000-0000-000000000000 to be binned as black - 2 is brown, 3 is blond, 4 is red, 5 is grey), so I'm guessing not. It's been ages since I manually binned hairs, so I can't remember if you're supposed to do anything with the "Hair Tone XML" but it does change when using Cat's binner so the answer is probably yes.
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 7,361
Thanks: 2940 in 27 Posts
Posts: 1,073
Thanks: 134 in 4 Posts
Posts: 12,927
Thanks: 3 in 1 Posts
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
Hairs can be a bit, let's say moody. I'd worry about getting it to show up before binning it. Bodyshop tends to fill in missing ages with EAxis hairs when making recolors, so linking first, then recoloring, and binning last may be a good idea (with Cat's binner, to properly remove unwanted ages - you should only delete resources if you know what you're doing, as deleting the wrong resources can potentially screw up the hair). |
I'm still having problems getting the hair to show up. I tried to link the mesh to the 3IDR I got an error saying that the 3dir file is in the incorrect format. I managed to get the hair mesh to show up but only if I didn't change any names in the mesh package but then that would make it a default file which I don't want and changing them would just make the recolor default to the original mesh. Thanks for trying to help me out. Linking hair is just too complicated then what it should be.
Posts: 12,927
Thanks: 3 in 1 Posts
For the mesh, extract the needed files in SimPE, and don't click on any of them, because this may occasionally lead to borkage! Then do "Fix integrity" where you give the resources a new name, using only Aa-Zz and - (avoid using . and _ and don't use any other characters, because Fix Integrity doesn't play well with them). This is absolutely neccessary to make a mesh not default!
* I prefer to then save the file without doing other changes or clicking on resources, close down the file (File -> new) and then reopen it, because I've on a few occasions had issues with the CRES file randomly unlinking from the GMDC if I didn't do this step.
* This is basically how you make the mesh files for most CAS projects (clothes, hair, accessories)
You have to Fix Integrity before you link the mesh to the recolor. If you do it after, you'll have to relink them.
Apart from doing Fix Integrity (which gives all the resources a new name and new instances), you shouldn't change any group or resource names anywhere in the mesh or recolor package unless you know what you're doing and why you need to do it. Changing names in the files will cause issues if you don't do it correctly. It's not really a beginner project unless you're willing to sit down with a bunch of tutorials.
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
Maybe you tried to link the recolor. I've done that accidentally many times... For the mesh, extract the needed files in SimPE, and don't click on any of them, because this may occasionally lead to borkage! Then do "Fix integrity" where you give the resources a new name, using only Aa-Zz and - (avoid using . and _ and don't use any other characters, because Fix Integrity doesn't play well with them). This is absolutely neccessary to make a mesh not default! * I prefer to then save the file without doing other changes or clicking on resources, close down the file (File -> new) and then reopen it, because I've on a few occasions had issues with the CRES file randomly unlinking from the GMDC if I didn't do this step. You have to Fix Integrity before you link the mesh to the recolor. If you do it after, you'll have to relink them. Apart from doing Fix Integrity (which gives all the resources a new name and new instances), you shouldn't change any group or resource names anywhere in the mesh or recolor package unless you know what you're doing and why you need to do it. Changing names in the files will cause issues if you don't do it correctly. It's not really a beginner project unless you're willing to sit down with a bunch of tutorials. |
Yeah I made sure that I had done all of that,I just don't know why Bodyshop doesn't recognize the mesh that I linked it to. I've even tried linking it a custom mesh that I know for sure works and then to an EA mesh,it didn't work. I've tried with a freshly made recolor package and just linked the mesh to the child age group,nothing changed so I linked the mesh to one with the hair tone xml and that didn't change anything either.
Update: Changing the age flag made the mesh just show up for the child age group. I'm not sure why it worked but i'm glad that it did. What I guessed happened was the hair was originally linked to the PU-EF age group. How I found that out is that is by linking the mesh to all the 3IDR files and I guess it linked the mesh to all the age groups including the child age. Then I just changed the age group flag from 5F to 02 to make it just show up for children. I don't know why it works like that,it's still very confusing but at least I got through that obstacle. I kind of still wanted the meshes and hairstyles linked to where the child would wear a different hairstyle whenever she or he grows up but oh well I got more challenges to overcome such as this. As you can see the long part of the hair is completely invisible at the front but it's visible at the front and it goes through the child's back,the mesh also isn't attached to the scalp correctly. So the mesh and the texture definitely still need a lot of work done.
Posts: 12,927
Thanks: 3 in 1 Posts
As for the invisible part, you need a second layer for the back (mark any polys you want visible from the front, duplicate them, and flip the faces), because only one side of the polys shows.
Scalp: Import the original scalp, and have it as the "hair" part (You may need to do some changes), or just don't mess with those parts of the mesh you're currently making. I always make sure to have a face, scalp (--hairbald) and body (--bodynaked) of the age/gender I'm making for in the meshing program, so I don't mess with any vertices that connects the meshes.
Before you continue, have you read these about hair meshing?
http://www.modthesims.info/showthread.php?t=158048 (basics)
http://www.modthesims.info/showthread.php?t=252950 (more advanced)
Some of the info is a little outdated (if the mesh is separate you can use the auto PJSE tool to link), but a lot of it is the same.
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
Not a good idea to messs with the Hair XML if you don't know the why and how of it (the age here is ususally set as 5F for all age groups). It has to do with other things, and messing with it can potentially cause scalps (the back of head) on other hairs to get a very ugly hair overlay. Age should be set in the PropertySet, and there only. You'll be better off fixing the linking in the 3DIR. As for the invisible part, you need a second layer for the back (mark any polys you want visible from the front, duplicate them, and flip the faces), because only one side of the polys shows. Scalp: Import the original scalp, and have it as the "hair" part (You may need to do some changes), or just don't mess with those parts of the mesh you're currently making. I always make sure to have a face, scalp (--hairbald) and body (--bodynaked) of the age/gender I'm making for in the meshing program, so I don't mess with any vertices that connects the meshes. Before you continue, have you read these about hair meshing? http://www.modthesims.info/showthread.php?t=158048 (basics) http://www.modthesims.info/showthread.php?t=252950 (more advanced) Some of the info is a little outdated (if the mesh is separate you can use the auto PJSE tool to link), but a lot of it is the same. |
How do you flip the faces on the mesh? I tried to link a different hairstyle to each 3DIR file but i'm still confused about how they work. Maybe I'll mess with it later and try to fix it later but fixing the mesh and the texture is my first priority at the moment.
Posts: 12,927
Thanks: 3 in 1 Posts
In Milkshape, select the faces and duplicate (Edit menu), I think this makes a new group. Then make sure the faces in the new group are selected, and select "Face --> Turn Edge" OR "Face --> Face to Front" (it's one of them). The mesh turns black (Milkshape's awful handling of normals), but in most cases, "Vertex --> Align Normals" will fix that issue (only if the mesh parts are meant to have the same smoothing, though - if not, the process i a little more involved). The mesh parts you're working on need to be selected through the whole process, or you may end up smoothing other parts of the mesh.
The 3DIR references the SHAPE and CRES (Resource node) found in the mesh it's linked to, and it's basically what holds the mesh and recolor together. They also make sure the different ages uses the right materials/textures, which is why I use them as a guide when linking hairs.
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
In Blender you select the polys you want to duplicate and turn, then click "duplicate" in the Tools menu (left side), and without touching the mouse click "enter" (so you don't accidentally move them). You may have to click "P" to separate the duplicated parts. Click "W" and select "flip normals". Sometimes the normals get screwed up, so go to the "Shading/UVs" menu (left side), and click "recalculate". This usually fixes issues with normals. In Milkshape, select the faces and duplicate (Edit menu), I think this makes a new group. Then make sure the faces in the new group are selected, and select "Face --> Turn Edge" OR "Face --> Face to Front" (it's one of them). The mesh turns black (Milkshape's awful handling of normals), but in most cases, "Vertex --> Align Normals" will fix that issue (only if the mesh parts are meant to have the same smoothing, though - if not, the process i a little more involved). The mesh parts you're working on need to be selected through the whole process, or you may end up smoothing other parts of the mesh. The 3DIR references the SHAPE and CRES (Resource node) found in the mesh it's linked to, and it's basically what holds the mesh and recolor together. They also make sure the different ages uses the right materials/textures, which is why I use them as a guide when linking hairs. |
Thank you for helping me out. Do you know any way how I could fix the white spaces in the mesh?
Posts: 12,927
Thanks: 3 in 1 Posts
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
It's probably the way you edited the mesh. Looks like the end hairs on the texture. You'd probably have to do some remapping and/or retexturing. |
Yeah I think that's the problem. It's the cmpompodorehair texture. I'll edit the texture in Photoshop when I have the time. I'll probably have to remap it too. From remapping you mean UV mapping right?
Posts: 12,927
Thanks: 3 in 1 Posts
Also, did you change any resource names in the last files you posted (like cmhairpompodore to cfhairpompodore), or any other name changes? That could explain some of the issues, because some resources are very sensitive to renaming unless done correctly.
Considering the mesh linking issue, you may want to make a new recolor file and relink the hair properly, and using Cat's binner to bin it and remove ages. Sounds like there's been a little too much messing around with the hair recolor file to be fixable. It's also possible the hair won't play nicely ingame the way it is now.
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
Yep, UV remapping. Also, did you change any resource names in the last files you posted (like cmhairpompodore to cfhairpompodore), or any other name changes? That could explain some of the issues, because some resources are very sensitive to renaming unless done correctly. Considering the mesh linking issue, you may want to make a new recolor file and relink the hair properly, and using Cat's binner to bin it and remove ages. Sounds like there's been a little too much messing around with the hair recolor file to be fixable. It's also possible the hair won't play nicely ingame the way it is now. |
Thanks i'll do that after i'm finished fixing the mesh and the texture up. Do you know how I could extract the scalp,face and body from so I could use it to fix the mesh up,the front side still shows up invisible after you showed me how to fix it?
Posts: 12,927
Thanks: 3 in 1 Posts
For the back of the mesh, did you give it a new name? You don't really have to, as long as it's layered to show before the other one. You have to make sure the "opacity" number for the inner layer is lower than the outer layer (usually goes from -1 for the "hair" layer, to 1 or 3, to 5 for the outer layer. If you take a look at a multi-layered mesh, you'll understand this better.
In your case, you can use the Hair_alpha3 for the new layer and Hair_alpha5 for the outer layer (the hair itself) if the hair you used as a base has those two layers, of course. That way they'd be layered correctly. You can also add layers (explained in the 2nd tutorial I linked a few posts ago).
Extracting face/head/body:
--bodynaked
--hairbald
--face (extract the face OBJ, the GMDC usually gives errors)
(with these prefixes depending on age/gender: bu, pu, cu, tf, tm, af, am, ef, em)
Make sure you don't import a second or third skeleton if you use Milkshape (answer "no" to that question), because this will screw up your mesh.
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
Every time you change a mesh or recolor and load it up again in Bodyshop, delete the cache files. They can make the old version of the files lag behind. For the back of the mesh, did you give it a new name? You don't really have to, as long as it's layered to show before the other one. You have to make sure the "opacity" number for the inner layer is lower than the outer layer (usually goes from -1 for the "hair" layer, to 1 or 3, to 5 for the outer layer. If you take a look at a multi-layered mesh, you'll understand this better. In your case, you can use the Hair_alpha3 for the new layer and Hair_alpha5 for the outer layer (the hair itself) if the hair you used as a base has those two layers, of course. That way they'd be layered correctly. You can also add layers (explained in the 2nd tutorial I linked a few posts ago). Extracting face/head/body: --bodynaked --hairbald --face (extract the face OBJ, the GMDC usually gives errors) (with these prefixes depending on age/gender: bu, pu, cu, tf, tm, af, am, ef, em) Make sure you don't import a second or third skeleton if you use Milkshape (answer "no" to that question), because this will screw up your mesh. |
Where could I find the files? Do I use Bodyshop or do I have to extract them somewhere from the game files like the base game?
I also have a problem getting the texture to show up on the mesh in Blender and i'm sure I followed the tutorials on how to do them correctly.
Posts: 12,927
Thanks: 3 in 1 Posts
Textures is Blender are very weird. You need to mark select the whole item in Edit mode, give it a material (set to UV coordinates instead of "general"), then a texture ("Image/movie"), and then an UVmap where you select a texture, and first then the texture shows up.
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
Use teh "extraction tool" (same place as the linking tool) in SimPE, under PJSE. You only need the meshes, so you don't need to involve Bodyshop. Textures is Blender are very weird. You need to mark select the whole item in Edit mode, give it a material (set to UV coordinates instead of "general"), then a texture ("Image/movie"), and then an UVmap where you select a texture, and first then the texture shows up. |
What I meant was where could I find the files but that's all right I'll try to figure that out myself.
Posts: 12,927
Thanks: 3 in 1 Posts
Use the "extraction tool" (same place as the linking tool) in SimPE, under PJSE. You only need the meshes, so you don't need to involve Bodyshop. |
"File/new", then "Tools/PJSE/BodyMeshTool/Extraction Stage", to be precise.
You should probably read the Unimesh tutorials before you continue. http://www.modthesims.info/forumdisplay.php?f=445
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
Posts: 12,927
Thanks: 3 in 1 Posts
My stories: Anna's diary - Memories are forever - Little Fire Burning
Who Posted
|