rigging clothes is hard!

Here i made an example:
http://jumbofiles.com/65jlkwnqqv2a

You see that the leg sometimes penetrates the cloth.
Im going crazy with this problem. Im making a game and there you can create your character and choose clothes for him, so no, I cant just delete the non visible parts.
Ive seen other games do this and they have a body inside the clothes, because you can change the clothes anytime in the game, so the performance arguent here is not valid.

I have no idea how those modellers created the weights. When I make a cloth for my character I always end up editing it and making the clothes wider along x,y so the penetration wont happen, but then the clothes look pretty ugly.

What can I do? Is there some kind of golden rule when rigging a character with clothes? Maybe some well known technique that everyone uses? Maybe even a script that modifies the clothe’s weights to make sure intersections dont happen?
I had a very tight shirt on one of my characters which was ‘topologicaly’ the same as the body and it had the exact same weights, only it was tiiny bit bigger (to avoid z-fightning of course), and penetration still happened…

take a look at this tutorial: softbody clothes that work

take note that this is for 2.4x, before they had cloth, so is suggest you use cloth instead of softbody.

yeah clothes are hard.

Not sure whether this has application to the game engine… but you can use the shrinkwrap modifier in problem areas.

I’m at a puzzle why you can’t just change mesh when you change clothes in the game. If it’s a shirt have a mesh with no torso etc. You could change heads in a game if you wanted couldn’t you… If you’re writing it?

Not sure whether this has application to the game engine… but you can use the shrinkwrap modifier in problem areas.

its more for the modelling than the cloth itself:)

I’m at a puzzle why you can’t just change mesh when you change clothes in the game. If it’s a shirt have a mesh with no torso etc. You could change heads in a game if you wanted couldn’t you… If you’re writing it?

same here, why cant you just do that?

First off, I am exporting it to a game. I did mention it… no softbodies, no cloth. I uploaded a sample file where it is made as a mesh, to make extra sure you guys would notice it and not suggest using softbodies or cloth physics.

Second, I have thought about this throughly, I absolutely NEED to use a single mesh and have the clothes on it. I think I said this too. Why? - its enifficient to load a completely different animated model for each clothing, having few hundred clothes with many shapes will result in too many models and too big installation size. Also, previous experiences with modding shows that all the games where you can change the clothing often work like this, for the reasons listed below. I don’t think the pros are doing it wrong.
I just asked for suggestions on rigging a character with his clothes on so the body wont penetrate the clothes, and said that which options are out of the question, but you guys still managed to go off topic :confused:

PS. And yes, im the programmer, why? The head is going to be the same for all characters, different shapes done with shapekeys.

bump.

Im sure some of the artists here create such work and the probably have some tips…

For what you want to do here are some tips:

  1. Put more segments around the joint area.

  2. Start out with an object that is duplicated from the body (Shft D in edit mode)

  3. Size it up with Alt S and make any changes to it after you do this.

3A. Now make pants, jacket so on from this basic sized mesh.

  1. Turn the armature mod on for edit mode so when you go into Edit Mode you can see the deformation and make adjustments to the mesh at parts that show through.

  2. Take the time to fine tune each joint this way, making poses until all basic motions are good and the mesh does not show through.

  3. I hope you did not think it was going to be easy. The “pros” understand that to make things work it takes long hours and patience.

Good luck.

Attachments

leg2.blend (352 KB)

have you tried a clothing rig? this is something im planning on doing on a current project. i havent really seen any tuts but the concept seems easy enough.

basically you just rig the clothing layers separately and use that rig to adjust the clothing…

yes its complex but, if youre doing a lot of this it will save u time in the long run. best luck!

ps i know for a fact most games where you can change clothing use one of two approaches:
-new mesh
-new texture

if they have an additional mesh as you have suggested, for clothing, then they have rigged clothing it or done it “the hard way”. :smiley:

i wish some one would write some think that would prevent penetration on a rig with out killing processing energy :frowning: