Creating Ragdoll Models

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 propragdoll instead of propstatic 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].

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

  • troyandbob's Levels
    • C1: Member
    • A5: Veteran
      Account Age: 4 years
    Posted 4 years ago

    Pros: good if you know whats going on Cons: too confusing for n00bs (LIKE ME!)

    Bananite
  • Allstarz's Levels
    • C1: Member
    • A5: Veteran
      Account Age: 4 years
    Posted 4 years ago

    Pros: Nice! I've found a tutorial :D Cons: Not for noobs, but I understand it. Improvements: Make it more detailed? Notes: Thanks man! Nice job!

    User Title
    WAAAGH!!
  • Nekture's Levels
    • P3: Peasant
      Points: 19,298
    • E1: Helper
      EF: 14
    • C3: Moderator
    • A5: Veteran
      Account Age: 6 years
    Username
    Nekture
    Posted 5 years ago

    Good job

  • paintballplaya's Levels
    • C1: Member
    • A5: Veteran
      Account Age: 6 years
    Posted 6 years ago

    Make a vid

    Bananite
  • phoenix-connection's Levels
    • P1: Beggar
      Points: 421
    • C1: Member
    • A6: Elder
      Account Age: 6 years
    Posted 6 years ago

    Notes: this is very complex, i dont understand it :/

    User Title
    ...
  • -=op=-'s Levels
    • P2: Drudge
      Points: 1,435
    • C1: Member
    • A6: Elder
      Account Age: 7 years
    Posted 7 years ago

    Oki..thx

Credits

Submitter
Xero's Levels
  • P3: Peasant
    Points: 8,173
  • E1: Helper
    EF: 17
  • C1: Member
  • A6: Elder
    Account Age: 8 years
Xero (Creator/Co-creator)
Key Authors
unknown
Unknown

Rating

9.2/10
Based off 4 rating(s)

Additional Info

Genre
Other/Misc
Difficulty Level
Advanced

Stats

Post Count
7
ViewCount
8,578
Date Added
8 years ago
Date Modified
1 year ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share