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!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 10th Sep 2008 at 12:55 PM
Default Milkshape Joints and long hair meshes.
Ive looked through all the tutorials and i cant seem to find a lot of info on using joints for making sure that the hair skins properly on long hair.
On most long hair, it doesnt move properly with the shoulders and sometimes twists horribly leaving jagged edges.

I know DJ Mur 3 mentions it briefly in his Topic: http://www.modthesims2.com/showthread.php?t=116636
But its not very clear and was a bit confusing.

Is there anywhere i can find out how to do this properly?

Thanks
Advertisement
world renowned whogivesafuckologist
retired moderator
#2 Old 10th Sep 2008 at 2:03 PM
There's really no trick to it, or need for a whole tutorial for it. It's actually pretty simple.

First, you need enough rows along those areas to make a smooth bend. Generally 1 row per row of detail in the body mesh is fine (i.e. count down the back of the neck and back to where you want the hair to end, and that's how many rows you'll need in that area to make it animate well).

Then, you need to examine the bone assignments under where the hair will be laying to see what it should be assigned like. Import a body mesh and look at the bone assignments down the back, and along the front down the shoulders. You'll see that there's generally a nice smooth transition from spine2 to spine1 going down, and on the shoulders (on both sides, front and back) there's some r_clavicle and l_clavicle assignments the closer you get toward the arms, which makes it so a sim can shrug properly or put their shoulders forward or back.

If you generally try to match your assignments with those of the body underneath, you'll get a nice smooth animation. You may not be able to match it exactly, but if you generally match up the rows of your hair with the rows of vertices in the body, it'll be MUCH easier - and you also won't end up with too high poly a hair mesh too, as you only need extra poly detail where it needs to bend.

You should also try looking at some Maxis hair for examples. The Nightlife vampire hair animates very nicely and also has a little bit of "sway in the breeze" animation assigned to the hair animation bones (l_hair, r_hair, b_hair, f_hair) which is a good example for that too.

There's a tutorial in the tutorial section at the top of this forum on previewing your animation with Milkshape. This is VERY helpful as you can assign everything and then preview right in Milkshape to see that everything moves well - and easily identify any problem vertices.

Lastly, you may want to look here: http://www.sims2wiki.info/wiki.php?...ng_From_Scratch ... I started this as I was working on a new hair mesh which is as of yet VERY unfinished, but it demonstrates that counting-vertices-down and matching up your pieces row by row (which I explained above) with pictures, so it may help you understand what I mean if that was at all unclear.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#3 Old 10th Sep 2008 at 5:07 PM
Hey thanks for a speedy responce, and thorough explanation. However although your tips are good to bear in mind, Im still really stumped at the basics of using the 'Joint' functions. how does it work? what buttons do i use and what do they do? I understand the concept of skinning, Im just struggling to get my head around Milkshape and how this works within the software.

Thanks again.
world renowned whogivesafuckologist
retired moderator
#4 Old 10th Sep 2008 at 5:31 PM
Have you gone through the Unimesh tutorials? They walk you through the basics of that... There's the three body ones, (two I've updated, one is still outdated) plus Dr Pixel's basic hair tutorial which explains exactly what you're asking about. From there it's just a matter of finding the right assignments, which is a matter of checking the body, checking existing hairs, and... well, experience.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#5 Old 10th Sep 2008 at 7:21 PM
Yes ive been through the tutorials, but i couldnt see anything about it.

Thanks
world renowned whogivesafuckologist
retired moderator
#6 Old 10th Sep 2008 at 7:38 PM
Dr P's hair meshing tutorial definitely covers it. The techniques he uses are actually obsolete now - there shouldn't be any need to change the bone assignments at all with the new Unimesh we have (both the neck gap, and the 100% head assignment he shows to get rid of the hair animations) ... But it does demonstrate how to use the Unimesh Bone Tool, and even though the need to do the neck gap/animation removal is obsolete, is still good practice for doing bone assignments.

Tiggerypum's Unimesh 2 tutorial I believe also shows using the Unimesh Bone Tool - there's an easier way to do that particular technique now, which is why I updated the tutorial, but the old one covers the Bone Tool in a way the new one doesn't. The tutorial is still available in the tutorials area.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#7 Old 10th Sep 2008 at 9:54 PM
Hmm, perhaps you have a link? The only one i could see is: http://www.modthesims2.com/showthread.php?t=159824

and that seems to only deal with modelling short hair, with nothing relevant included.

Thanks for your diligent help.
world renowned whogivesafuckologist
retired moderator
#8 Old 10th Sep 2008 at 10:35 PM
The length of the hair, for that tutorial, is irrelevant. You were asking about how to do the joints, and that tutorial explains the basics of using the Unimesh Bone Tool to set bone assignments. Post #6 specifically shows the steps to assign the entire hair mesh to the head bone, and then changing the back of the neck to do a 50/50 head/neck assignment. Same basic principles apply to ALL bone assignments - short hair, long hair, feet, legs, whatever.

Beyond just knowing how to set the assignments, it's just a matter of setting the right ones on the right vertices - which I explained is a matter of copying settings from the body vertices underlying the areas of hair you're assigning, and looking at existing Maxis meshes to get an idea of what correct assignments look like.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Not actually evil.
#9 Old 10th Sep 2008 at 11:14 PM
Quote: Originally posted by HP
looking at existing Maxis meshes to get an idea of what correct assignments look like
Exactly. This applies to clothing too, not just hair, as HP said. I made a long untucked shirt, and wanted the hem to move correctly and not cut into skirts/pants. So I looked at the bone assignments of the skirt, where the shirt overlapped it, and set the shirt vertex bone assignments to be very similar to the skirt. Now they both move the same way.

Please spay or neuter your pets. --- Cat Music Video! --- my meshes
Test Subject
Original Poster
#10 Old 10th Sep 2008 at 11:19 PM
aha got it. So you dont actually use the joint tab at all? I think thats where i got confused.
So just to clarify, using this method. to blend the bones, i would select the head vertices, set to 100% and then select the next row of vertices down and put 50% to neck and head... then 100% to the neck.. then 50% to the neck and spine2.. etc...

would that be right?

Thanks
world renowned whogivesafuckologist
retired moderator
#11 Old 10th Sep 2008 at 11:45 PM
Well, sort of. You're kinda getting it, but you only use neck assignments for stuff that actually touches the neck.

I -really- think it'd be a good idea for you to look at some stuff that animates well for examples. If you actually open up a file in Milkshape and select some vertices in a spot and look at their bone assignments and compare it going down the back, I think it'd make a lot more sense.

Just for a rough example, for a piece of hair going straight down the middle of the back, you might do...

100% head - right up at the head itself, from the base of the skull and upward.
90% head/10% spine2 - a little lower than that.
80% head/20% spine2 - a little lower than that... etc... switching slowly from one to another each row down till you get to between the shoulderblades, which is where the spine2 bone is located.

At that point you'll want to have hit basically 100% spine2 and can start doing...
90% spine2/10% spine1... heading toward the middle of the back.
80% spine2/10% spine1... a little lower, etc.

Till you get to the placement of spine1 mid-back...

This is a very simplistic way of looking at it, but it's a matter of smoothly transitioning from one bone to another - not just 50/50 but smaller amounts like 10 or 25%.

Again, if you take a look at a body mesh and look at the bone assignments on it (say, mid-back) you can get a good idea of what good hair assignments should be for hair that is mid-back. Same with looking at existing hair meshes - open them up in Milkshape and study them.

And no, you don't use the Joint tab at all. That only assigns 100% and smooth transitions require multiple weightings (like 80/20 type stuff as I mentioned above). The Unimesh Bone Tool allows you to do that multi weighting.

This isn't intended as a personal plug, but I worked my ass off on my Adrasteia hair mesh, which is mid-back as well as laying over both shoulders... http://www.modthesims2.com/showthread.php?t=244447 ... it would be a very very good example to look at in Milkshape for smooth transitions. It animates better than most Maxis hair meshes when it comes to head turns, etc., works well over the shoulders, and doesn't crunch up when the sim tilts their head back too. If you want a really good example of very smooth transitions that animate extremely well in-game, I can't think of anything better.

And now that I've tooted my own horn enough, I'm gonna go to bed. Good luck.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#12 Old 11th Sep 2008 at 1:35 PM
Ok now ive got the idea of how to do it, something has gone wrong and it wont work.
Ive imported and exported it the same way as i have done it before so that cant be the problem. Also ive tested it by setting all the vertices to 100% but the hair still seems to stretch with the previous links (horribly). for some reason its not registering the changes.

Also what is the bar at the bottom of the bone tool window for?, the one that has '#1 of xxxx [Mesh 0:Vertice 0]'.

Thanks
world renowned whogivesafuckologist
retired moderator
#13 Old 11th Sep 2008 at 2:17 PM
You may be running into it dropping bone assignments. Check the comments on your hair mesh groups - numSkinWeights should be set to 3, not 2 or 1.

The bit at the bottom showing # of # is whatever vertices you have selected. You can select multiple vertices at a time and assign them all at once. Select the whole "hair" group for instance and it'll probably say something like 1 of 300-ish.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#14 Old 11th Sep 2008 at 2:55 PM
I just set it to 3 and then relinked all the bones, and got a terrible result when i loaded it up in the game. The body mesh neck and chin are now invisible and the hair now looks short.

Thanks
world renowned whogivesafuckologist
retired moderator
#15 Old 11th Sep 2008 at 3:23 PM
The body mesh shouldn't be affected by anything you do with the hair... that's... extremely weird if it is.

There is some variance in the different skeletons used by various base hair meshes. Some may cause the hair to pull into the body or head more than others. However, if you haven't changed the original hair that much, that shouldn't be causing your problem.

If you can post pictures of what you're getting, that would be really helpful in diagnosing what the issue is.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#16 Old 11th Sep 2008 at 4:27 PM
hmm well heres a picture. Its hard to see exactly whats happening, you need to be able to spin it around to see that its invisible, but what you see there is an area looking to the back of the hair. Shes also supposed to have long hair, which is very strange.

Thanks
Screenshots
world renowned whogivesafuckologist
retired moderator
#17 Old 11th Sep 2008 at 9:22 PM
Those areas that are showing through the chin and neck are underweight - their bone assignments add up to less than 100%. Check your assignments in those areas and I think you'll find they're less than 100% total.

As for the disappeared stuff... you appear to have an alpha and texture applied to the hair already. If the bottom part isn't underweight, then it's probably an issue with the alpha - try using a completely solid alpha for the whole hair temporarily and see if that helps.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#18 Old 12th Sep 2008 at 3:09 PM
hmm this is starting to get a little frustrating. Ive tried several times now, and ive been through the whole thing slowly making sure that all the assignments add up to 100%.

The other thing is, this whole problem of invisible stuff doesnt show up until i start messing with the bone assignments. Im not sure how the alpha could suddenly interfere? Im not actually sure how to change the alpha in SimPE though so i havnt tried it yet. I noticed in the groups tab of milkshape, there are lots of 'hairalpha5' listed. perhaps those have to have the bones assigned also? im not sure what they are for.

Thanks
world renowned whogivesafuckologist
retired moderator
#19 Old 12th Sep 2008 at 4:38 PM
ALL your parts need to have the assignments done. I'm not sure why you have a ton of hairalpha5's if you didn't make them yourself though... are you editing someone else's mesh here?

Go ahead and attach your files to this thread - stick your ms3d, mesh .package, and recolour package in a rar or zip file and attach 'em here. I understand how frustrating meshing can be. Maybe one of us can take a look and figure out what the trouble is and tell you how to fix it.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#20 Old 12th Sep 2008 at 6:31 PM
By 'parts' you mean groups? and do i have to set all the 'numSkinWeights' on the hairalpha5s to 3 also?

Yes, im editting a mesh somebody else made. Unfortunatly it was a really nice mesh (although i did change it a little), it just didnt move properly.
world renowned whogivesafuckologist
retired moderator
#21 Old 12th Sep 2008 at 7:08 PM
Parts = groups, yes. Also called subsets.

And yes, NumSkinWeights should be set to 3 on all your groups.

Otherwise it's going to remove any additional bone assignments and can result in underweight vertices.

Having all those parts is probably going to complicate things a lot for you - there's transparency settings that need to be set right too. I would REALLY suggest starting with your own mesh rather than trying to fix an existing one - especially one with duplicate groups as, as you're finding out, it makes things a bit confusing.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#22 Old 12th Sep 2008 at 9:41 PM
ok so the problem seems to have made itself apparent.

So im thinking if i just go through each group step by step with the same vertices selected and change each one. and then follow by the next row of vertices and change each one. It would be a long bothersome task. but that would work right? Im just wondering though if theres no way to clone or copy them from group to group though?

Then again i dont really know what all those other groups are for? couldnt i just delete them?

Thanks
world renowned whogivesafuckologist
retired moderator
#23 Old 12th Sep 2008 at 10:08 PM
You could always select all the vertices you want set to a certain combination of bone assignments, bring up the Unimesh Bone Tool, and click, "Apply to All, Commit All" to apply the same assignments to all selected vertices.

I'm assuming those other groups have some function in the hair mesh or they wouldn't be there to begin with. Sure, you CAN delete them, but without being able to examine the hair mesh myself and see why they're there in the first place and what function they have, I can't tell you whether you SHOULD. Usually extra groups are extra pieces of hair and if you just go deleting them, your mesh will probably not look the way it did originally.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
Original Poster
#24 Old 13th Sep 2008 at 1:57 AM
haha! its all working now, and it looks fine.

I was clicking apply to all and commit to all anyway, so all i needed to do was change the numSkinWeights to 3 on all the groups. Its a good job i asked you about those.

Anyway thanks a lot for all your help, Its much appreciated.

Would you like to see the result of all your hard work?
Back to top