Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Mad Poster
Original Poster
#1 Old 1st Dec 2022 at 3:25 PM
Default Hair and neckline not aligning
I decided to try and fix this hair. https://modthesims.info/d/329369/re...sh-recolor.html

The toddler and child ages have a gap between the hairline and the neck. So I extracted a Maxis hair mesh and aligned all the vertices and normals with that and ... the gap is still there. I have very little experience with hair and I don't know what I did wrong. It would have worked on clothing lol.

Can anyone help?
Advertisement
Mad Poster
#2 Old 1st Dec 2022 at 4:22 PM
Try extracting a head mesh (cuhairbald and puhairbald). Also don't do anything to them, just leave them as-is, if that's possible. If you try aligning them to the neck, you are probably doing it the wrong way around (aligning the neck to the head) if they don't turn out the way you want.

If you use the auto-aligning tools in Milkshape, they depend on which mesh is at the top and bottom in the group list. I can never remember which aligns to which, but if you don't get the result you want, it's probably the wrong order.

For the neck/body, make sure to use a mesh with that area fully uncovered by clothes (or plain texture).
Mad Poster
Original Poster
#3 Old 2nd Dec 2022 at 10:10 AM
That's what I did. Extracted a head mesh. I checked to make sure that the custom mesh was being aligned to them rather than the other way around, but it's still leaving gaps. The mesh at the top is the one it aligns to.
Mad Poster
#4 Old 2nd Dec 2022 at 11:51 AM Last edited by simmer22 : 2nd Dec 2022 at 12:06 PM.
Have you fixed the bone assignments for the neck? The 5 neck vertices at the back (middle, two left, two right - not under ears) should be 50/50 head + neck. It's also important that the comments are properly set - they should be "NumSkinWgts: 3" for the blending to work properly. If they're set as 1 or 2, exporting the mesh can result in the bone assignments only using one joint for each vertex.

If the bone assignments for the neck are correct, they'll show in a pinkish-orange color with the "show bone color" is ticked in Joints. Right now they are 100% neck and show yellow.This would cause a neck gap, because that part on the face mesh is also 50/50.
Mad Poster
Original Poster
#5 Old 2nd Dec 2022 at 4:30 PM
The bone assignments seem to have been the problem, thanks! Turns out all the ages had them incorrect and didn't have the NumSkinWeights: 3.
Mad Poster
Original Poster
#6 Old 5th Jan 2023 at 2:35 PM
Trying to fix this mesh now. https://modthesims.info/download.php?t=140115

Have done all the above and still there's a gap at the back of the toddler neck. I extracted the bald toddler head and replaced the 'hair' mesh with it and it still doesn't line up correctly and this is a Maxis mesh that otherwise works.

Why would a Maxis mesh not work?
Mad Poster
#7 Old 5th Jan 2023 at 3:18 PM
What doesn't line up? The neck gap or something else?
Mad Poster
Original Poster
#8 Old 6th Jan 2023 at 10:30 AM
The neck gap is still there. Even though there is no neck gap on that mesh normally.
Mad Poster
#9 Old 6th Jan 2023 at 1:50 PM Last edited by simmer22 : 6th Jan 2023 at 5:26 PM.
Have you checked the comments and the bone assignments? The comments should be

ModelName: hair
Opacity: -1
HasTangentArray:
NumSkinWgts: 3

Bone assignments for the "head" group should be neck 50% and head 50% for the 5 neck vertices. The rest should be assigned 100% to the head.

Also make sure you have the toddler skeleton. Just tick "show skeleton" under the Joint group and see if it aligns with the head mesh. If it's larger, you're working with the wrong skeleton.

In addition, look in the list of joints and make sure there's just one of each. If you see the list start over, there's two skeletons. If you have the correct version of the plugins, by default it shouldn't add another skeleton (for the older version you have to click "no" in a tick box if you import in another mesh with a skeleton, the newer one automatically assumes you don't want to if the skeleton type matches - they're both fairly old, but I had the older version for quite some time so I'm all too familiar with the chaos it could cause).
Mad Poster
Original Poster
#10 Old 6th Jan 2023 at 5:12 PM
Only one skeleton. Got the toddler skeleton. I added the 'HasTangentArray:'; everything else was fine. ModelName is hair, not head.

Still have the neck gap.

Does it matter for the bone assignments whether head or neck is first in the Bone Tool?
Mad Poster
#11 Old 6th Jan 2023 at 5:23 PM Last edited by simmer22 : 6th Jan 2023 at 6:16 PM.
Had a brain fart - I meant "hair"

It shouldn't matter too much if they have the same weighting. The only thing I've noticed is that if the "NumSkinWgts" setting doesn't match with how many bones are used (set to 1, or missing entirely) the weighting will usually be set to 100% for the joint at the top of the list.

You have the file? I can take a look. Maybe it makes a bit more sense if I can see what the problem is.

---

OK, so I opened up the hair and a toddler head, and I see tsome of the potential issues. The head/hair they've used lack a couple vertices in the back compared to the face, and that part is in the area where there's one vertex 50/50 and another 100% head, so it depends what you did to those two on each side.

(I usually have extracted face meshes to compare everything to, which helps a lot when neck gaps don't make sense - you can extract them as "age/gender + face", so "puface" for toddler. They work best as OBJ files, because they have issues with the morphs if you try importing the GMDC files into Milkshape. Just make sure to import them after a mesh with joints, and not before)
Mad Poster
Original Poster
#12 Old 7th Jan 2023 at 11:32 AM
Quote: Originally posted by simmer22
Had a brain fart - I meant "hair"

It shouldn't matter too much if they have the same weighting. The only thing I've noticed is that if the "NumSkinWgts" setting doesn't match with how many bones are used (set to 1, or missing entirely) the weighting will usually be set to 100% for the joint at the top of the list.

You have the file? I can take a look. Maybe it makes a bit more sense if I can see what the problem is.

---

OK, so I opened up the hair and a toddler head, and I see tsome of the potential issues. The head/hair they've used lack a couple vertices in the back compared to the face, and that part is in the area where there's one vertex 50/50 and another 100% head, so it depends what you did to those two on each side.

(I usually have extracted face meshes to compare everything to, which helps a lot when neck gaps don't make sense - you can extract them as "age/gender + face", so "puface" for toddler. They work best as OBJ files, because they have issues with the morphs if you try importing the GMDC files into Milkshape. Just make sure to import them after a mesh with joints, and not before)


This is the point I've got to. Everything works except for the very back of the neck. http://www.simfileshare.net/download/3640297/
Mad Poster
#13 Old 7th Jan 2023 at 2:47 PM Last edited by simmer22 : 7th Jan 2023 at 4:35 PM.
Looks like the gap happens because the vertices are too far down, and don't meet with the neck. When the head is bent forward, this happens because the weighting is the same, so the vertices stay roughly at the same level.

Ideally you want the vertices to meet up exactly, not overlap into another area. If they're meant to take on the skin texture, they are likely going to look best if they also share the same normals.


What you can do is to mark the problem triangles on the head mesh (do each side separately), then do "Face --> Subdivide 2". This gets you an extra vertex in those area, which lets you match up all of them.

(I just looked at the toddler hair, btw - assuming the child hair has similar issues?)

(If you're wondering about the assigned face, I did that manually with an OBJ mesh. Can be helpful if you want to diagnose a neck gap. The 5 vertices in the back are 50/50 face and neck, the circle in the neck area is (usually) 35 spine and 65 neck, but it can depend on age. Might also need comments, although those are more important if you export the mesh, which you wouldn't do for the face anyway.)

(To use the skeleton, turn on the ANIM button, in the "Model" tab select "rotation", "Center of mass" and "Local", plus "show skeleton" under "Joints". Then double-click the joint you want to rotate, and you'll be able to rotate in each of the 3 non-3D windows. I highly recommend saving a copy of the file before doing this, because if you accidentally do anything with the skeleton without the ANIM mode activated, or save at the wrong time, you can mess up the file. As long as you don't save a keyframe, the mesh should go back to the original position when you click the "ANIM" button again. It's very useful for fixing stuff when you don't know where joint assignment issues are coming from. Can save you a few trips in and out of the game).
Screenshots
Mad Poster
Original Poster
#14 Old 14th Jan 2023 at 4:04 PM
Alright. Gave it a break then checked everything. Extracted a face and made sure it lined up. Checked my bone assignments. Checked my vertices. Added the extra vertices. Still have a neck gap in Bodyshop.

Putting the right bone assignments in actually gives me a bigger neck gap, because I set it as all face accidentally once and got a smaller neck gap!

This is what I've got, but it still has a neck gap. DX

http://www.simfileshare.net/download/3648572/

Also, thank you for all the help!
Mad Poster
#15 Old 14th Jan 2023 at 5:36 PM
Wasn't entirely sure which of them you meant, so checked both:

Child mesh - one of the vertices on each side has the wrong assignment (can be a bit difficult to tell when everyone says "the 5 neck vertices" and there appears to just be 5 when the head/scalp is a bit wonky, but the "jaw" vertices marked in the picture are always 100% head even when they appear to be the 4th/5th neck vertices - if that's the case, usually something's not quite right in the neck area).

For the toddler mesh, the vertex on each side of the head under the ear isn't aligned with the ear. I also noticed the ears are slightly off, so unless these are well hidden by the hair there could be some gaps here and there. It's possible this is hidden by the hair, though.
Screenshots
Mad Poster
Original Poster
#16 Old 15th Jan 2023 at 3:44 PM
The child mesh is a Maxis mesh lol. I had presumed it was correct because of this. It's 'curlsup'. https://sims2defaults.dreamwidth.org/290234.html

The toddler mesh is slightly off at the ears, but is hidden by the hair. It's the back of the neck that's the problem though.



I've set all the bone assignments there to what I thought they should be.
Screenshots
Mad Poster
#17 Old 15th Jan 2023 at 6:10 PM
I checked Bodyshop, and the neck gap was there as you said. I think I've tested out pretty much everything I can think of under the sun, including making a brand new set of mesh/recolor files just to see if anything was wrong with the original files, but that neck gap is the most persistent one I've ever seen.

I think however the issue was with the skeleton, possibly some info from a child skeleton that got stuck somewhere in the file, even if the toddler skeleton showed. I don't know how, but it could explain why the vertices seemed to always tilt up/out.

How to fix: First import a mesh you know has a proper skeleton into a new Milkshape window. I just used an extracted puhairbald mesh (don't use a mesh from a CC file, use one extracted directly from SimPE - that way you know there's no issues with it). Then import the mesh you want to fix. Export, and import into the mesh file in SimPE.
Screenshots
Mad Poster
Original Poster
#18 Old 16th Jan 2023 at 3:05 PM
The skeleton thing you said was interesting, because originally I tried to fix it by swapping out the head with a bald toddler head and just keeping the curls alpha. It closed the gap, but ruined the UV map. So I suspect that they did use something special for the head that wasn't done properly. Importing the puhairbald mesh first finally fixed the problem.

Thank you so much for sticking with me! This was the most annoying neck gap I've ever seen!
Mad Poster
#19 Old 16th Jan 2023 at 3:37 PM
The head has special UVmapping, so you'd also have to remap the head if you did it that way (I checked). They most likely just scaled down and reshaped the child head, possibly imported something in the wrong order, or got both skeletons and deleted the child one (this was possible with some older plugins). I haven't the foggiest.

It's the hardiest neck gap I've ever seen, too. Usually, the reimporting trick tends to be one of the first things I try when a mesh is misbehaving. I think I mentioned it somewhere above, but the mesh already had a toddler skeleton and it didn't seem broken in other ways, so I just thought it probably was something else. I honestly don't know what was wrong with that skeleton, but it sure did take us on a haunted house ride...
Back to top