Ragdolls for beginners

Anybody here know of any good tutorials for beginners for making ragdolls?

[editline]19th August 2014[/editline]

Ops just realized i put this on mapping not modeling. Sorry.

I’d decompile a ragdoll model and see how they set up the collision model.

Typically you have convex shapes (in the shape of your model) rigged to a certain bones. (Rig one piece to one bone ONLY!) then export JUST THE COLLISION PIECES AND ALL YOUR BONES to a seperate smd. MAKE SURE THE COLLISION USES THE SAME TEXTURE AS YOUR MODEL. (doesn’t need to be properly uvmapped)

then add the $collisionjoints and compile the model. Once you have it, crack open hlmv and load the model. Go to the physics tab, pick the bone, then start adjusting it (this sets the maxium rotation of a joint)

then tap generate qc once you’ve adjusted all the bones, (it copies it to your clipboard) then paste into the qc, and delete any redundant lines (the $jointconstraint stuff goes under the $collisionjoints bit)

This is a basic guide and assumes you’re competent with compiling basic models.

Also ping a moderator to move the thread.

Does the collision model really need to use the same texture? All I’ve noticed is the output of a couple errors when I don’t uvmap it, but my collision model works regardless.

Well not the same texture, just needs A texture. If your smd has “null” for a texture name it won’t work.

Could you give a full qc file of what this would look like just for example.

Here’s the qc of one of my ragdolls

Also I’d add the $noselfcollisions under the $collisionjoints section. (this prevents collision joints from colliding with each other)


$modelname "monster\dragon\ep10_dragon_bugeikloth_phys.mdl"
$model "base" "dragon_bugeikloth.smd"
$bodygroup wings_r
{
studio "dragon_bugeikloth_Rwing.smd"
studio "dragon_bugeikloth_Rwing_broken.smd"
}
$bodygroup wings_l
{
studio "dragon_bugeikloth_Lwing.smd"
studio "dragon_bugeikloth_Lwing_broken.smd"
}
$bodygroup tail
{
studio "dragon_bugeikloth_tail.smd"
studio "dragon_bugeikloth_tail_broken.smd"
}
$bodygroup icicles
{
studio "dragon_bugeikloth_neckice.smd"
studio "dragon_bugeikloth_neckice_broken.smd"
}
$cdmaterials "models\monster\dragon\"
$sequence idle "dragon_bugeikloth.smd" fps 30.00
$includemodel "monster/dragon/_anim/dragon_attack_motion_ancient_buge.mdl"
$includemodel "monster/dragon/_anim/dragon_actor_motion.mdl"
$includemodel "monster/dragon/_anim/dragon_attack_motion.mdl"
$includemodel "monster/dragon/_anim/dragon_bugeikloth_duel_motion.mdl"
$includemodel "monster/dragon/_anim/dragon_common_motion.mdl"
$includemodel "monster/dragon/_anim/dragon_common_motion_ancient_buge.mdl"
$includemodel "monster/dragon/_anim/dragon_downknee_motion_ancient_buge.mdl"
$includemodel "monster/dragon/_anim/dragon_flying_motion.mdl"
$includemodel "monster/dragon/_anim/dragon_flying_motion_8_el.mdl"
$includemodel "monster/dragon/_anim/dragon_flying_motion_ancient_buge.mdl"
$collisionjoints "phymodel.smd" 
{

	$mass 1000.0
	$inertia 60.00
	$damping 0.01
	$rotdamping 1.50
	$rootbone "ValveBiped.Bip01_Pelvis"
	$concave
	$noselfcollisions
	
$jointconstrain "valvebiped.bip01_tail" x limit -15.00 15.00 0.00
$jointconstrain "valvebiped.bip01_tail" y limit -30.00 30.00 0.00
$jointconstrain "valvebiped.bip01_tail" z limit -39.00 39.00 0.00
 
$jointconstrain "valvebiped.bip01_tail1" x limit -10.00 10.00 0.00
$jointconstrain "valvebiped.bip01_tail1" y limit -21.00 21.00 0.00
$jointconstrain "valvebiped.bip01_tail1" z limit -17.00 17.00 0.00
 
$jointconstrain "valvebiped.bip01_tail2" x limit -10.00 10.00 0.00
$jointconstrain "valvebiped.bip01_tail2" y limit -21.00 21.00 0.00
$jointconstrain "valvebiped.bip01_tail2" z limit -17.00 17.00 0.00
 
        $jointconstrain "valvebiped.bip01_tail3" x limit -10.00 10.00 0.00
        $jointconstrain "valvebiped.bip01_tail3" y limit -28.00 28.00 0.00
        $jointconstrain "valvebiped.bip01_tail3" z limit -23.00 23.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.00
        $jointconstrain "valvebiped.bip01_r_thigh" y limit -39.00 12.00 0.00
        $jointconstrain "valvebiped.bip01_r_thigh" z limit -48.00 46.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_calf" x limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_r_calf" y limit -37.00 26.00 0.00
        $jointconstrain "valvebiped.bip01_r_calf" z limit -38.00 32.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_foot" x limit -28.00 28.00 0.00
        $jointconstrain "valvebiped.bip01_r_foot" y limit -15.00 15.00 0.00
        $jointconstrain "valvebiped.bip01_r_foot" z limit -53.00 23.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_toe0" x limit -21.00 21.00 0.00
        $jointconstrain "valvebiped.bip01_r_toe0" y limit -23.00 23.00 0.00
        $jointconstrain "valvebiped.bip01_r_toe0" z limit -37.00 28.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.00
        $jointconstrain "valvebiped.bip01_l_thigh" y limit -39.00 12.00 0.00
        $jointconstrain "valvebiped.bip01_l_thigh" z limit -48.00 46.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_calf" x limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_l_calf" y limit -37.00 26.00 0.00
        $jointconstrain "valvebiped.bip01_l_calf" z limit -38.00 32.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_foot" x limit -28.00 28.00 0.00
        $jointconstrain "valvebiped.bip01_l_foot" y limit -15.00 15.00 0.00
        $jointconstrain "valvebiped.bip01_l_foot" z limit -53.00 23.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_toe0" x limit -21.00 21.00 0.00
        $jointconstrain "valvebiped.bip01_l_toe0" y limit -23.00 23.00 0.00
        $jointconstrain "valvebiped.bip01_l_toe0" z limit -37.00 28.00 0.00
 
        $jointconstrain "valvebiped.bip01_spine2" x limit -26.00 26.00 0.00
        $jointconstrain "valvebiped.bip01_spine2" y limit -37.00 37.00 0.00
        $jointconstrain "valvebiped.bip01_spine2" z limit -23.00 35.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_winga_1" x limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_r_winga_1" y limit -55.00 23.00 0.00
        $jointconstrain "valvebiped.bip01_r_winga_1" z limit -23.00 23.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_winga_2" x limit -21.00 21.00 0.00
        $jointconstrain "valvebiped.bip01_r_winga_2" y limit -10.00 10.00 0.00
        $jointconstrain "valvebiped.bip01_r_winga_2" z limit -26.00 77.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_winga_1" x limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_l_winga_1" y limit -55.00 23.00 0.00
        $jointconstrain "valvebiped.bip01_l_winga_1" z limit -23.00 23.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_winga_2" x limit -21.00 21.00 0.00
        $jointconstrain "valvebiped.bip01_l_winga_2" y limit -10.00 10.00 0.00
        $jointconstrain "valvebiped.bip01_l_winga_2" z limit -26.00 77.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_winga_6" x limit -10.00 10.00 0.00
        $jointconstrain "valvebiped.bip01_l_winga_6" y limit -10.00 10.00 0.00
        $jointconstrain "valvebiped.bip01_l_winga_6" z limit -59.00 12.00 0.00
 
        $jointconstrain "valvebiped.bip01_neck1" x limit -12.00 12.00 0.00
        $jointconstrain "valvebiped.bip01_neck1" y limit -10.00 10.00 0.00
        $jointconstrain "valvebiped.bip01_neck1" z limit -10.00 10.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_upperarm" x limit -44.00 44.00 0.00
        $jointconstrain "valvebiped.bip01_r_upperarm" y limit -26.00 46.00 0.00
        $jointconstrain "valvebiped.bip01_r_upperarm" z limit -77.00 23.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_forearm" x limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_r_forearm" y limit -30.00 37.00 0.00
        $jointconstrain "valvebiped.bip01_r_forearm" z limit -32.00 55.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_upperarm" x limit -44.00 44.00 0.00
        $jointconstrain "valvebiped.bip01_l_upperarm" y limit -26.00 46.00 0.00
        $jointconstrain "valvebiped.bip01_l_upperarm" z limit -77.00 23.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_forearm" x limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_l_forearm" y limit -30.00 37.00 0.00
        $jointconstrain "valvebiped.bip01_l_forearm" z limit -32.00 55.00 0.00
 
        $jointconstrain "valvebiped.bip01_l_finger0" x limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_l_finger0" y limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_l_finger0" z limit -30.00 75.00 0.00
 
        $jointconstrain "valvebiped.bip01_neck3" x limit -12.00 12.00 0.00
        $jointconstrain "valvebiped.bip01_neck3" y limit -15.00 15.00 0.00
        $jointconstrain "valvebiped.bip01_neck3" z limit -23.00 23.00 0.00
 
        $jointconstrain "valvebiped.bip01_head1" x limit -12.00 12.00 0.00
        $jointconstrain "valvebiped.bip01_head1" y limit -32.00 32.00 0.00
        $jointconstrain "valvebiped.bip01_head1" z limit -21.00 41.00 0.00
 
        $jointconstrain "valvebiped.bip01_jaw" x limit 0.00 0.00 0.00
        $jointconstrain "valvebiped.bip01_jaw" y limit 0.00 0.00 0.00
        $jointconstrain "valvebiped.bip01_jaw" z limit 0.00 46.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_finger0" x limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_r_finger0" y limit -19.00 19.00 0.00
        $jointconstrain "valvebiped.bip01_r_finger0" z limit -30.00 75.00 0.00
 
        $jointconstrain "valvebiped.bip01_r_winga_6" x limit -10.00 10.00 0.00
        $jointconstrain "valvebiped.bip01_r_winga_6" y limit -10.00 10.00 0.00
        $jointconstrain "valvebiped.bip01_r_winga_6" z limit -59.00 12.00 0.00
 
        $jointconstrain "valvebiped.bip01_tail4" x limit -12.00 12.00 0.00
        $jointconstrain "valvebiped.bip01_tail4" y limit -28.00 28.00 0.00
        $jointconstrain "valvebiped.bip01_tail4" z limit -23.00 23.00 0.00

}


Is blender’s SMD exporter assigning a UV as a fallback so it’ll work then? I don’t put one on my collision model at all and it works out just fine.

Guess blender’s smd exporter adds a texture to it as a fallback.

How do you get the x y and z limits on the jointconstrains?