Jump to content

How do I make mesh clothes change with shape?


mnp2357
 Share

You are about to reply to a thread that has been inactive for 1181 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Please note that I do NOT use Avastar.

I have been working on creating a skirt. It took me several tries, but I finally managed to get it all rigged up in Blender and everything, but now my problem is how do I make it scale when people change the shape of their avatar?? Currently it stays the same no matter what.

I am creating using the free ebody mesh.

Edited by mnp2357
Link to comment
Share on other sites

From what I got, you already managed to make 90% of the work. The main difference between rigged mesh and fitted mesh (the one that scales with the appearance sliders) is which bones you picked during the process. So it should be easy to make your skirt fitted mesh, you just need to replace the m_bones you are using with the collision bones closer to it. These links should help:

http://wiki.secondlife.com/wiki/Mesh/Rigging_Fitted_Mesh

http://wiki.secondlife.com/wiki/Appearance_Editor_and_affected_bones

  • Thanks 1
Link to comment
Share on other sites

6 hours ago, npcee said:

From what I got, you already managed to make 90% of the work. The main difference between rigged mesh and fitted mesh (the one that scales with the appearance sliders) is which bones you picked during the process. So it should be easy to make your skirt fitted mesh, you just need to replace the m_bones you are using with the collision bones closer to it. These links should help:

http://wiki.secondlife.com/wiki/Mesh/Rigging_Fitted_Mesh

http://wiki.secondlife.com/wiki/Appearance_Editor_and_affected_bones

Hmm so I looked at my bone stuff, and it looks like it current has both the m_bones and the collision bones. I am unsure what to do. Do I get rid of the unnecessary m_bones to make it work?

I used a general Blender tutorial when I did my rigging since all of the SL ones I found used Avastar :S

Link to comment
Share on other sites

On 1/25/2021 at 10:33 PM, mnp2357 said:

Hmm so I looked at my bone stuff, and it looks like it current has both the m_bones and the collision bones. I am unsure what to do. Do I get rid of the unnecessary m_bones to make it work?

I used a general Blender tutorial when I did my rigging since all of the SL ones I found used Avastar

Hum... if the skirt is rigged to the collision bones, it should be affected by the sliders. So, I can only think of two possibilities here... either the vertex groups for the collision bones you are using are not "painted" or when you are uploading the mesh to SL you are not marking the rigging options (I think firestorm does this automatically in the newest version, so I dont think its that).

You should be able to see if the skirt is weight-painted in blender by going into weight paint mode and selecting the vertex groups corresponding to the collision bones you used for the skirt. And if you are in edit mode, select a vertice and then press N to show that side window, you should also be able to see the vertex weights:

Untitled2.png.b080827e5067059a5180f6bc78f2f281.png

 

Untitled.png.c78639f49be99bdbb79fe0e774a9cc7e.png

 

If your mesh is showing there without the collision bones or with the collision bones with 0.0 weight, then thats the problem. Otherwise I cant really think of what might be the cause.

Link to comment
Share on other sites

15 hours ago, npcee said:

Hum... if the skirt is rigged to the collision bones, it should be affected by the sliders. So, I can only think of two possibilities here... either the vertex groups for the collision bones you are using are not "painted" or when you are uploading the mesh to SL you are not marking the rigging options (I think firestorm does this automatically in the newest version, so I dont think its that).

You should be able to see if the skirt is weight-painted in blender by going into weight paint mode and selecting the vertex groups corresponding to the collision bones you used for the skirt. And if you are in edit mode, select a vertice and then press N to show that side window, you should also be able to see the vertex weights:

Untitled2.png.b080827e5067059a5180f6bc78f2f281.png

 

Untitled.png.c78639f49be99bdbb79fe0e774a9cc7e.png

 

If your mesh is showing there without the collision bones or with the collision bones with 0.0 weight, then thats the problem. Otherwise I cant really think of what might be the cause.

Oh, okay!! I'll give that a try and report back. I use Firestorm, so at least that's covered haha.

Link to comment
Share on other sites

On 1/25/2021 at 10:33 PM, mnp2357 said:

I am unsure what to do. Do I get rid of the unnecessary m_bones to make it work?

 

Oh, I forgot to answer your first question... ever since project bento, you dont need to use the whole skeleton to make fitmesh clothing. In fact, if you are using that full bento skeleton (the one with the wing and hind legs and everything), then you are forced to delete some bones from your vertex groups anyway because theres a limit on the number of bones you can use in your collada file before the SL mesh uploader gives you an error.

So yeah, you can delete the unnecessary bones without a problem. Since you are making a skirt, Im gonna assume here that its safe to delete the head bones, arms, feet, etc.

 

Edited by npcee
Link to comment
Share on other sites

1 hour ago, npcee said:

 

Oh, I forgot to answer your first question... ever since project bento, you dont need to use the whole skeleton to make fitmesh clothing. In fact, if you are using that full bento skeleton (the one with the wing and hind legs and everything), then you are forced to delete some bones from your vertex groups anyway because theres a limit on the number of bones you can use in your collada file before the SL mesh uploader gives you an error.

So yeah, you can delete the unnecessary bones without a problem. Since you are making a skirt, Im gonna assume here that its safe to delete the head bones, arms, feet, etc.

 

Okay! So, I double checked my file.

Weights: Check
Did I upload the weights: ? ? ? ?????
Unnecessary bones: MANY

I'll delete the unnecessary bones and make sure that the weights are uploaded, because I remember I wasn't sure what everything was, so who knows what I did lol. I assume if the weight doesn't show up on my skirt's heat map, I probably don't need it, so let's go with that. 🤪

Thank you so so much for the patience. I'll be sure to send a free copy your way when it's done if you want lol.

Edited by mnp2357
Link to comment
Share on other sites

1 hour ago, npcee said:

 

Oh, I forgot to answer your first question... ever since project bento, you dont need to use the whole skeleton to make fitmesh clothing. In fact, if you are using that full bento skeleton (the one with the wing and hind legs and everything), then you are forced to delete some bones from your vertex groups anyway because theres a limit on the number of bones you can use in your collada file before the SL mesh uploader gives you an error.

So yeah, you can delete the unnecessary bones without a problem. Since you are making a skirt, Im gonna assume here that its safe to delete the head bones, arms, feet, etc.

 

HMMMMM.... I feel like this is a problem lol

c7b1d3bf23584fe17ce3be9bdea03ef1.png

But I don't know... what I have done or how to fix it :S

Link to comment
Share on other sites

Im pretty much in the dark here, lol. So heres the thing... how about I show you how I do it, then you compare with the step-by-step you are doing yourself? Maybe the tutorial you are following is just missing some point. Now please bear in mind Im pretty much a noob when it comes to this stuff so I have no idea if this is the "proper" way of doing things, but like you said in your first post, most of the tutorials we find are for avastar so we are left with a lot of trial-and-error.

1) So, first, I made this super futuristic and fashionable squared skirt then I subdivided it a lot to add geometry.

001.thumb.png.eb36391219f91476d0270be199f271a9.png

 

2) When I was happy with the position and size, I selected the skirt, then holding shift I also selected the armature (skeleton), then right click, "Parent" --> "Armature Deform" --> "With automatic weights".

002.thumb.png.2d91813aae82d1299bd5117dda1692e2.png

 

3) What this does is, blender will get the bones from the armature, create an armature deform modifier for the skirt using them, and also automatically create the vertex groups, giving automatic weights for them. Now, no matter if you are using blender with or without avastar, its 99% unlikely that it will be a perfect job... so most of the time you'll have to do some adjusting yourself. In my case, I thought my squared skirt was already perfection in skirt form, so I didnt have to do it (also cause I suck at this, but theres tons of good tutorials on youtube).

003.png.e4963ec1e6dac2d0830c4ecdf204b6ca.png

 

4) Next I selected the armature, went into pose mode and moved some bones to see if everything was deforming ok.

004.thumb.png.5cb17b5a8f84bc6dc9fb2d847bf009a1.png

 

5) Then, just to be sure, I now selected the skirt, went into weight paint mode and checked the vertex groups. At this point I deleted all the vertex groups that werent having any influence in the skirt (like head, eyes, arms, etc). You dont HAVE to do this, but its easier to work when you dont have that list of 100 bones. (edit: actually you do have to do this if you go over the limit of bones that the uploader allows, which I think is like 110 maybe...)

005.png.16edae572b0d38875e0c543111e8ec0a.png

 

6) Next you go back to object mode, select your skirt and export it as collada. I think ever since 2.8 blender now has a preset specifically for exporting rigged mesh to SL. So you make sure to select that present and, SUPER IMPORTANT make sure to mark the "Keep bind info", or you'll get something very wonky.

006.png.4207ab63f20e33c01d044ee89c406671.png

 

7) If you did everything right, when you try to upload the mesh to second life, you'll see something like this:

007.thumb.png.e490f1489a9b8d6e4c85f6965d22bce8.png

 

Note that it shows exactly the bones I used in my vertex groups. Like I said, ever since project bento, you only need to list the bones you are using, not the full armature.

And thats it. :)

Edited by npcee
  • Like 1
Link to comment
Share on other sites

19 minutes ago, npcee said:

Im pretty much in the dark here, lol. So heres the thing... how about I show you how I do it, then you compare with the step-by-step you are doing yourself? Maybe the tutorial you are following is just missing some point. Now please bear in mind Im pretty much a noob when it comes to this stuff so I have no idea if this is the "proper" way of doing things, but like you said in your first post, most of the tutorials we find are for avastar so we are left with a lot of trial-and-error.

1) So, first, I made this super futuristic and fashionable squared skirt then I subdivided it a lot to add geometry.

001.thumb.png.eb36391219f91476d0270be199f271a9.png

 

2) When I was happy with the position and size, I selected the skirt, then holding shift I also selected the armature (skeleton), then right click, "Parent" --> "Armature Deform" --> "With automatic weights".

002.thumb.png.2d91813aae82d1299bd5117dda1692e2.png

 

3) What this does is, blender will get the bones from the armature, create an armature deform modifier for the skirt using them, and also automatically create the vertex groups, giving automatic weights for them. Now, no matter if you are using blender with or without avastar, its 99% unlikely that it will be a perfect job... so most of the time you'll have to do some adjusting yourself. In my case, I thought my squared skirt was already perfection in skirt form, so I didnt have to do it (also cause I suck at this, but theres tons of good tutorials on youtube).

003.png.e4963ec1e6dac2d0830c4ecdf204b6ca.png

 

4) Next I selected the armature, went into pose mode and moved some bones to see if everything was deforming ok.

004.thumb.png.5cb17b5a8f84bc6dc9fb2d847bf009a1.png

 

5) Then, just to be sure, I now selected the skirt, went into weight paint mode and checked the vertex groups. At this point I deleted all the vertex groups that werent having any influence in the skirt (like head, eyes, arms, etc). You dont HAVE to do this, but its easier to work when you dont have that list of 100 bones.

005.png.16edae572b0d38875e0c543111e8ec0a.png

 

6) Next you go back to object mode, select your skirt and export it as collada. I think ever since 2.8 blender now has a preset specifically for exporting rigged mesh to SL. So you make sure to select that present and, SUPER IMPORTANT make sure to mark the "Keep bind info", or you'll get something very wonky.

006.png.4207ab63f20e33c01d044ee89c406671.png

 

7) If you did everything right, when you try to upload the mesh to second life, you'll see something like this:

007.thumb.png.e490f1489a9b8d6e4c85f6965d22bce8.png

 

Note that it shows exactly the bones I used in my vertex groups. Like I said, ever since project bento, you only need to list the bones you are using, not the full armature.

And thats it. :)

ok!!! i am pretty sure that i did all of those steps, but it still wasn't working, so i went back to the drawing board. clean ebody model, clean skirt. Blah blah. I learned weight painting (Kind of?).

Also, I have started this playlist for us Avastar-less schmucks to try and help us stumble through everything which lives here.

https://www.youtube.com/playlist?list=PL4nfSr3-qoFUkOHHj0_MHb6KyRv85_WzL

What I have discovered is for some reason it gives me an error about "mismatching LOD models" unless I also select the body skeleton when I export??? ? ? ??

Link to comment
Share on other sites

2 hours ago, npcee said:

Im pretty much in the dark here, lol. So heres the thing... how about I show you how I do it, then you compare with the step-by-step you are doing yourself? Maybe the tutorial you are following is just missing some point. Now please bear in mind Im pretty much a noob when it comes to this stuff so I have no idea if this is the "proper" way of doing things, but like you said in your first post, most of the tutorials we find are for avastar so we are left with a lot of trial-and-error.

1) So, first, I made this super futuristic and fashionable squared skirt then I subdivided it a lot to add geometry.

001.thumb.png.eb36391219f91476d0270be199f271a9.png

 

2) When I was happy with the position and size, I selected the skirt, then holding shift I also selected the armature (skeleton), then right click, "Parent" --> "Armature Deform" --> "With automatic weights".

002.thumb.png.2d91813aae82d1299bd5117dda1692e2.png

 

3) What this does is, blender will get the bones from the armature, create an armature deform modifier for the skirt using them, and also automatically create the vertex groups, giving automatic weights for them. Now, no matter if you are using blender with or without avastar, its 99% unlikely that it will be a perfect job... so most of the time you'll have to do some adjusting yourself. In my case, I thought my squared skirt was already perfection in skirt form, so I didnt have to do it (also cause I suck at this, but theres tons of good tutorials on youtube).

003.png.e4963ec1e6dac2d0830c4ecdf204b6ca.png

 

4) Next I selected the armature, went into pose mode and moved some bones to see if everything was deforming ok.

004.thumb.png.5cb17b5a8f84bc6dc9fb2d847bf009a1.png

 

5) Then, just to be sure, I now selected the skirt, went into weight paint mode and checked the vertex groups. At this point I deleted all the vertex groups that werent having any influence in the skirt (like head, eyes, arms, etc). You dont HAVE to do this, but its easier to work when you dont have that list of 100 bones. (edit: actually you do have to do this if you go over the limit of bones that the uploader allows, which I think is like 110 maybe...)

005.png.16edae572b0d38875e0c543111e8ec0a.png

 

6) Next you go back to object mode, select your skirt and export it as collada. I think ever since 2.8 blender now has a preset specifically for exporting rigged mesh to SL. So you make sure to select that present and, SUPER IMPORTANT make sure to mark the "Keep bind info", or you'll get something very wonky.

006.png.4207ab63f20e33c01d044ee89c406671.png

 

7) If you did everything right, when you try to upload the mesh to second life, you'll see something like this:

007.thumb.png.e490f1489a9b8d6e4c85f6965d22bce8.png

 

Note that it shows exactly the bones I used in my vertex groups. Like I said, ever since project bento, you only need to list the bones you are using, not the full armature.

And thats it. :)

well thats not right 🙂

87dfa1abf33a55ef8e4795b475bbb772.png

Link to comment
Share on other sites

Hey at least we made some progress! lol

The mismatching LOD error thing, I only get when my LODs dont have the same number of faces/materials. So I honestly have no idea why you are getting this error there. In the second picture, that warning about the bind shape, if Im not mistaken I think you get that when your mesh is rotated or scaled in a weird way. So make sure to apply rotation and scale to your objects (select the mesh object in blender and press ctrl + A).

That could also explain why the mesh is deformed like that in the preview window. Another theory that I have is that maybe the armature you are using is messed up. I actually went and downloaded the eBody Kit and I tried recreating my awesome squared skirt and I got similar results to yours. The one I downloaded was made for avastar, so I dont know if its the same one you are using. The thing is... avastar skeletons have some extra binding information, and avastar uses this information in some way that is above my paygrade. All I know is that they dont play well when you try to use them without avastar.

However, as far as I know (someone correct me please if Im wrong), all these kits still use the exact same default SL skeleton (same size and position), so since you are not using avastar anyway you dont really need them. So if I were you I would try rigging using a different skeleton than the one from the mesh kit.

The one from this page is what I have used to rig some stuff before: http://wiki.secondlife.com/wiki/Mesh/Rigging_Fitted_Mesh#Download_links

Link to comment
Share on other sites

I personally don't work in Blender but in Maya, however the basic process here is the same. making any kind of mesh fit you will need to skin it to the body you want it to work (wear) with. hence you would need the dev kits of the meshbody or if you want it wear on a system avatar you use the SL avatar as you did. They all use the same skeleton, but they all have different base shapes and weights. You bind your mesh to the skeleton and then copy the weights from the body your choice to your clothing piece. then you need to smooth the areas that are jaggy when you rotate the bones. 

Link to comment
Share on other sites

2 hours ago, Salt Peppermint said:

I personally don't work in Blender but in Maya, however the basic process here is the same. making any kind of mesh fit you will need to skin it to the body you want it to work (wear) with. hence you would need the dev kits of the meshbody or if you want it wear on a system avatar you use the SL avatar as you did. They all use the same skeleton, but they all have different base shapes and weights. You bind your mesh to the skeleton and then copy the weights from the body your choice to your clothing piece. then you need to smooth the areas that are jaggy when you rotate the bones. 

Yeah I did all of this using eBody's dev kit

Edited by mnp2357
Link to comment
Share on other sites

8 hours ago, npcee said:

Hey at least we made some progress! lol

The mismatching LOD error thing, I only get when my LODs dont have the same number of faces/materials. So I honestly have no idea why you are getting this error there. In the second picture, that warning about the bind shape, if Im not mistaken I think you get that when your mesh is rotated or scaled in a weird way. So make sure to apply rotation and scale to your objects (select the mesh object in blender and press ctrl + A).

That could also explain why the mesh is deformed like that in the preview window. Another theory that I have is that maybe the armature you are using is messed up. I actually went and downloaded the eBody Kit and I tried recreating my awesome squared skirt and I got similar results to yours. The one I downloaded was made for avastar, so I dont know if its the same one you are using. The thing is... avastar skeletons have some extra binding information, and avastar uses this information in some way that is above my paygrade. All I know is that they dont play well when you try to use them without avastar.

However, as far as I know (someone correct me please if Im wrong), all these kits still use the exact same default SL skeleton (same size and position), so since you are not using avastar anyway you dont really need them. So if I were you I would try rigging using a different skeleton than the one from the mesh kit.

The one from this page is what I have used to rig some stuff before: http://wiki.secondlife.com/wiki/Mesh/Rigging_Fitted_Mesh#Download_links

You're right. It is for Avastar /: It's one of the only bodies you can get the dev kit for free. I noticed that my mesh always uploaded sideways, but I was never sure why. Tried to fix it, but it only got worse lmao. I guess that must be because of Avastar skeleton things...

I don't know how I woulddd... keep the weights if I were to switch skeletons, and it is pretty specifically for eBody.

SIGHS. Maybe I'll just scrap it and try making mesh for the ugly ass classic avatars instead. Thanks to our teamwork, I can definitely do that! I learned all of the steps and went through a ton of troubleshooting.

Maybe once I'm making more money from my shop I'll get Avastar 🙄

Thank you SO much for all of the help.

Edited by mnp2357
  • Like 1
Link to comment
Share on other sites

1 hour ago, mnp2357 said:

I don't know how I woulddd... keep the weights if I were to switch skeletons, and it is pretty specifically for eBody.

Well, at this point I think its important to understand what is a dev kit and why we need them. I dont have avastar either, but I must have watched dozens of tutorials with it, so from my understanding the whole point of needing a dev kit to make clothes (with avastar) is:

a) You get a model of the actual mesh body, so you can make your clothing conforming to that shape specifically.

b) The mesh body is already weighted, so instead of using the skeleton to get automatic weights, avastar will just transfer the weights from the mesh body itself and make the whole process less complicated (well In most cases, specially with pants and shorts, you still have to do a lot of work).

c) Avastar lets you adjust the body sliders, just like in SL, so its easier to test the rigging against bodies that dont use a more default shape.

So, by not using avastar you lose B and C, but you still have A. Theres nothing saying that you cant just copy the ebody body mesh, import it (without the avastar skeleton) to a new file with the default SL skeleton, use the mesh body as a guide for adjusting your skirt, and then rig it with the default SL skeleton.

There is going to be a lot more trial and error, but it should be doable. If it was like a long sleeved gown or something, then yeah that would be a pain in the butt... but a skirt that only uses ~6 bones, shouldnt be hard.

Edited by npcee
Link to comment
Share on other sites

46 minutes ago, npcee said:

Well, at this point I think its important to understand what is a dev kit and why we need them. I dont have avastar either, but I must have watched dozens of tutorials with it, so from my understanding the whole point of needing a dev kit to make clothes (with avastar) is:

a) You get a model of the actual mesh body, so you can make your clothing conforming to that shape specifically.

b) The mesh body is already weighted, so instead of using the skeleton to get automatic weights, avastar will just transfer the weights from the mesh body itself and make the whole process less complicated (well In most cases, specially with pants and shorts, you still have to do a lot of work).

c) Avastar lets you adjust the body sliders, just like in SL, so its easier to test the rigging against bodies that dont use a more default shape.

So, by not using avastar you lose B and C, but you still have A. Theres nothing saying that you cant just copy the ebody body mesh, import it (without the avastar skeleton) to a new file with the default SL skeleton, use the mesh body as a guide for adjusting your skirt, and then rig it with the default SL skeleton.

There is going to be a lot more trial and error, but it should be doable. If it was like a long sleeved gown or something, then yeah that would be a pain in the butt... but a skirt that only uses ~6 bones, shouldnt be hard.

Yeah, that was my thought as well. I'd have to redo the weight painting which was like an hour's worth of work , but theoretically it is doable. If I give it a try, I'll be sure to report back here!!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1181 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...