Search
Username:
Password:
Register or Reset Password
Remove the ads!
Creating Ragdoll Models
Difficulty: Advanced
Category: CS:S > ModelingAuthor(s):
Did you create this? Request ownership



The following tutorial shows how to create a ragdoll model. These models are for more than just characters. The famous mattress model is a ragdoll model. If you want parts of a model to swing or move separately from the rest then you should use a ragdoll model. To use a ragdoll model you use prop_ragdoll instead of prop_static or prop_dynamic.

To create a ragdoll model you must create one with separate bones for each part of the model which will move. Here is an example of a simple ragdoll model in milkshape.



Ragdoll.gif

Create a reference smd file from milkshape or your favorite editing tool.

If you were going to just compile this model as a static prop you would use the following .qc file

$modelname "mymodels/myragdoll.mdl"
$scale 1.0

$cd ""
$body "Body" myragdoll.smd
$cdmaterials "models\mymodelmaterials"
$staticprop

// 1 sequence
$sequence idle "myragdoll" fps 5 ACT_IDLE 1

$surfaceprop "wood"

$keyvalues { "prop_data" {"base" "wooden.large" }

$cdmaterials "models\mymodels"

$collisionmodel "myragdoll.smd" {
// Mass in kilograms

$concave
$mass 500.0
}

To change this to a ragdoll model you change the $collisionmodel to $collisionjoints and specify how the joints can rotate with respect to the root joint. An example .qc is as follows

$modelname "mymodels/myragdoll.mdl"
$scale 1.0

$cd ""
$body "Body" myragdoll.smd
$cdmaterials "models\mymodelmaterials"
//$staticprop

// 1 sequence
$sequence idle "myragdoll" fps 5 ACT_IDLE 1

$surfaceprop "wood"

$keyvalues { "prop_data" {"base" "wooden.large" }

$cdmaterials "models\mymodels"

$collisionjoints "myragdoll_ragdoll.smd" {
// Mass in kilograms

$rootbone "joint1"
$concave

$mass 80.0
$inertia 5.00
$damping 0.01
$rotdamping 1.50

$jointconstrain joint1 x limit 0.000000 0.000000 0.000000
$jointconstrain joint1 y limit 0.000000 0.000000 0.000000
$jointconstrain joint1 z limit 0.000000 0.000000 0.000000
$jointconstrain joint2 x limit -90.000000 90.000000 1.000000
$jointconstrain joint2 y limit -90.000000 90.000000 1.000000
$jointconstrain joint2 z limit -45.000000 45.000000 1.000000
$jointconstrain joint3 x limit -90.000000 90.000000 1.000000
$jointconstrain joint3 y limit -90.000000 90.000000 1.000000
$jointconstrain joint3 z limit -45.000000 45.000000 1.000000

}

Each of the jointconstrain commands control the joint rotation in a specific axis. For example the above .qc allows joint2 and joint3 to rotate +/- 90 degrees in the x and y and +/- 45 degrees in the z (up/down) axis.

In the above example I used boxes for each of the joints, so I don't need to create a separate ragdoll collision model. If your model is more complicated, then for the collision model you should create a new .smd with one box assigned to each joint. The box will be used for collisions for that joint and the size will determine the weight of the joint.

Tutorial by WikiPedia, brought to CSB by [Xero].

Added: 3 years agoTags: creating, ragdoll, models
Feedback (4)
.
Medic on a Healing Spree!Y2M
Posted 5 months ago
Good job
paintballplaya .
BananiteY2M
Posted 10 months ago
Make a vid
- Bananite
phoenix-connection .
...Y2M
Posted 1 year ago
Notes: this is very complex, i dont understand it :/
-=op=- .
Y2M
Posted 2 years ago
Oki..thx
-
Add Feedback
Provide constructive feedback. What is "constructive"?
You cannot post yet!
Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop.

To post in this submission register or login.
Assessment
The community's verdict.
User Rating [+]
9/10
bScore
9.0/10
You cannot assess yet!
Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure.

To vote on this submission register or login.
Stamps
This Tutorial in a nutshell...
Confusing
You cannot stamp yet!
Stamps let you apply characteristics to submissions to help others understand them.

To stamp this submission register or login.
None found
Added by...
::
Admin Bananite
:: Admin and Skin Critic

[+] Donate
Related Tutorials