Cloth&Hair physics

Hello everyone,
Recently I’ve been working on making a playermodel for Garrysmod.
It was pretty fine, I looked up on Google for information on rigging bones and etc.
but right now I am stuck with rigging the clothes/hair for my model.
I couldnt find any information about it on google.
What the problem is that the body just clips through the clothes while moving.
I want to set the collision between the flesh and the clothes.

Can anyone tell me how to do it?
Thank you

O gosh I am not sure you can set collisions like that. Uhh, my experience has been that if a piece of clothing at least roughly fits the body (jeans, for example – potentially loose and baggy but they still follow your legs) you should assign its vertices with the same bone weights as any nearby actual body vertices so that when the body part moves the clothing moves the exact same amount to avoid clipping. For things where this doesn’t work such as skirts I would try to artificially put the vertices further from the body than normal and then experimented using HLMV with which bone weight to give the clothing vertices so that they would (as best as possible) never clip the body.

Hmm… I am also trying to convert ragdolls into playermodels.
When I decompiled the ragdolls it already had bones set up for their clothes.
I wonder if theres any chance that I can re-use them?
I tried linking the bones of the skirt with the bones of the thigh, but it still causes some clipping when moving diagonally.
Oh by the way, i think that the physics settings are lost when decompiling a model, when i decompile and recompile a ragdoll i find that the physics are gone.

As far as I know only 3 version of the engine support Cloth and hair physics
Bloodlines
Vindictus
Dota 2

The cloest thing you have is the jigglebone system present in the OB engine branch. But that won’t give you collision.
Essentially what you have to do, is make sure your rigging is topnoth, and delete as much mesh under the clothes as you feel works to avoid clipping.

Basically that’s why most models with long skirts, dresses and robes will not have the mesh for the legs underneath. But makes shorter skirts a massive bitch to rig.

Probably not, since I think Orange box uses a heavily modified version of an outdated Havok

Im good with jigglebones



$jigglebone "ValveBiped.LCape" {
	is_flexible {
	   yaw_stiffness 50
		yaw_damping 5
		pitch_stiffness 50
		pitch_damping 5
		tip_mass 200
		length 8
		angle_constraint 90 
	}
	has_base_spring {
		stiffness 20
		damping 3
		left_constraint -5 5
		up_constraint -5 5
		forward_constraint -0 5 //so it cant clip past the legs
	}
}
$jigglebone "ValveBiped.RCape" {
	is_flexible {
	   yaw_stiffness 50
		yaw_damping 1
		pitch_stiffness 50
		pitch_damping 1
		tip_mass 200
		length 8
		angle_constraint 90 
	}
	has_base_spring {
		stiffness 20
		damping 3
		left_constraint -5 5
		up_constraint -5 5
		forward_constraint -0 5
	}
}
$jigglebone "ValveBiped.Hair1" {
	is_flexible {
	   yaw_stiffness 50
		yaw_damping 5
		pitch_stiffness 50
		pitch_damping 5
		tip_mass 100
		length 8
		angle_constraint 5 
}
}
$jigglebone "ValveBiped.Hair2" {
	is_flexible {
	   yaw_stiffness 50
		yaw_damping 5
		pitch_stiffness 50
		pitch_damping 5
		tip_mass 100
		length 8
		angle_constraint 25 
	}
}
$jigglebone "ValveBiped.Hair3" {
	is_flexible {
	   yaw_stiffness 50
		yaw_damping 5
		pitch_stiffness 50
		pitch_damping 5
		tip_mass 100
		length 8
		angle_constraint 25 
	}
}