Compiling a ragdoll?

Got problems with your models? Struggling with textures? Get help with your custom assets.

Re: Compiling a ragdoll?

Postby Stormy on Sun Apr 15, 2012 9:47 pm

Code: Select all
00384 //-----------------------------------------------------------------------------
00385 // Purpose:
00386 // Input  :
00387 //-----------------------------------------------------------------------------
00388 void CAI_BaseNPC::CleanupOnDeath( CBaseEntity *pCulprit, bool bFireDeathOutput )
00389 {
00390         if ( !m_bDidDeathCleanup )
00391         {
00392                 m_bDidDeathCleanup = true;
00393
00394                 if ( m_NPCState == NPC_STATE_SCRIPT && m_hCine )
00395                 {
00396                         // bail out of this script here
00397                         m_hCine->CancelScript();
00398                         // now keep going with the death code
00399                 }
00400
00401                 if ( GetHintNode() )
00402                 {
00403                         GetHintNode()->Unlock();
00404                         SetHintNode( NULL );
00405                 }
00406
00407                 if( bFireDeathOutput )
00408                 {
00409                         m_OnDeath.FireOutput( pCulprit, this );
00410                 }
00411
00412                 // Vacate any strategy slot I might have
00413                 VacateStrategySlot();
00414
00415                 // Remove from squad if in one
00416                 if (m_pSquad)
00417                 {
00418                         // If I'm in idle it means that I didn't see who killed me
00419                         // and my squad is still in idle state. Tell squad we have
00420                         // an enemy to wake them up and put the enemy position at
00421                         // my death position
00422                         if ( m_NPCState == NPC_STATE_IDLE && pCulprit)
00423                         {
00424                                 // If we already have some danger memory, don't do this cheat
00425                                 if ( GetEnemies()->GetDangerMemory() == NULL )
00426                                 {
00427                                         UpdateEnemyMemory( pCulprit, GetAbsOrigin() );
00428                                 }
00429                         }
00430
00431                         // Remove from squad
00432                         m_pSquad->RemoveFromSquad(this, true);
00433                         m_pSquad = NULL;
00434                 }
00435
00436                 RemoveActorFromScriptedScenes( this, false /*all scenes*/ );
00437         }
00438         else
00439                 DevMsg( "Unexpected double-death-cleanup\n" );


So that's where the error message is coming from in ai_basenpc.cpp, according to google, maybe check your source code for that devmsg to see if you can figure out what is causing it? I can't read code for shit.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Compiling a ragdoll?

Postby disturb3d on Sun Apr 15, 2012 10:52 pm

Pretty much, for some reason, it's doing the NPC death cleanup twice. I don't know why it's getting called twice if all I'm doing is changing the model. I also don't understand why this only happens to my edited model, and not any other models. I doubt the SetModel() function I'm using to change the model runs the CleanupOnDeath() function, as you can use SetModel() before the NPC is dead.

I dunno man. Modeling baffles me.

Does it make a difference that I'm using 3DS Max 2010?

Here's a link to the SMD's and the QC I'm using. Maybe someone can tell me what I've done wrong.
disturb3d
Member
Member
 
Joined: Sat Sep 18, 2010 7:49 am

Re: Compiling a ragdoll?

Postby cra0kalo on Fri Apr 20, 2012 10:52 pm

Can't think of a solution off the top of my head though I employ you to check out
steam/steamapps/sourcesdk_content/hl2

there you will find the proper qc files Don't expect anything to work decompiling unless you know what you are doing.
Cra0kalo
CG Artist/3D Animator
http://cra0kalo.com

Lead of Operation Reaper
http://projectreaper.com

Lead of the "Dark Alley" Project
http://alleyproject.net
User avatar
cra0kalo
Regular
Regular
 
Joined: Thu Apr 28, 2011 2:35 am

Re: Compiling a ragdoll?

Postby disturb3d on Sun Apr 22, 2012 6:59 am

Thank you so much for pointing me to those QC files. I doubt I could have gotten to this point without those.

New picture 1
New picture 2
They now ragdoll correctly, but the arm stretches out like that. Dunno whether this would be a QC problem or a model problem.

My QC:
Code: Select all
$modelname "missingleftarm.mdl"
$model "police" "metrocop.SMD"
$cdmaterials "models\Police\"

$eyeposition 0 0 72
$bbox -13 -13 0 13 13 72

$hierarchy "valvebiped.Bip01_Pelvis" ""
$hierarchy "Valvebiped.bip01_Spine" "valvebiped.Bip01_Pelvis"
$root "valvebiped.Bip01_Pelvis"
$alwayscollapse "Valvebiped.bip01"
$hierarchy "valvebiped.Bip01_L_Clavicle" "valvebiped.Bip01_Spine4"
$hierarchy "valvebiped.Bip01_R_Clavicle" "valvebiped.Bip01_Spine4"
$hierarchy "valvebiped.Bip01_L_Thigh" "valvebiped.Bip01_Pelvis"
$hierarchy "valvebiped.Bip01_R_Thigh" "valvebiped.Bip01_Pelvis"


$definebone "ValveBiped.Bip01_Pelvis" "" -0.000005 -0.533615 38.566917 0.000000 0.000000 89.999985 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$definebone "ValveBiped.Bip01_Spine" "ValveBiped.Bip01_Pelvis" 0.000005 3.345127 -2.981901 4.944224 89.999985 89.999985 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine1" "ValveBiped.Bip01_Spine" 4.018330 0.000000 0.000000 0.000000 -1.675443 -0.000000 0.000000 -0.000000 0.000000 0.000000 -0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine2" "ValveBiped.Bip01_Spine1" 3.518566 0.000000 0.000000 0.000000 5.748830 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine4" "ValveBiped.Bip01_Spine2" 8.942642 -0.000000 -0.000000 0.000000 11.120881 0.000000 0.000000 -0.000001 0.000000 0.000000 -0.000002 0.000000
$definebone "ValveBiped.Bip01_Neck1" "ValveBiped.Bip01_Spine4" 3.307270 0.000000 0.000000 0.000000 22.945694 179.999863 0.000000 0.000000 0.000000 -0.000000 0.000005 0.000000
$definebone "ValveBiped.Bip01_Head1" "ValveBiped.Bip01_Neck1" 3.593712 0.000000 0.000000 -0.000057 23.295723 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000004 -0.000000
$definebone "ValveBiped.forward" "ValveBiped.Bip01_Head1" 2 -3 0 0 -76 -90
$definebone "ValveBiped.Bip01_R_Clavicle" "ValveBiped.Bip01_Spine4" 2.033352 1.000771 -1.937610 73.712029 168.618774 -95.596497 0.000000 0.000000 0.000000 0.000000 -0.000001 0.000001
$definebone "ValveBiped.Bip01_R_UpperArm" "ValveBiped.Bip01_R_Clavicle" 6.028144 0.000000 0.000000 -0.462090 -33.623802 93.935234 0.000000 0.000000 0.000000 -0.000002 -0.000001 0.000000
$definebone "ValveBiped.Bip01_R_Forearm" "ValveBiped.Bip01_R_UpperArm" 11.692551 -0.000000 0.000004 -0.000005 -3.459061 0.000000 0.000000 0.000000 0.000000 -0.000005 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Hand" "ValveBiped.Bip01_R_Forearm" 11.481699 0.000000 0.000000 6.108071 2.532072 -89.664284 0.000000 0.000000 0.000000 0.000001 0.000000 -0.000000
$definebone "ValveBiped.Anim_Attachment_RH" "ValveBiped.Bip01_R_Hand" 2.676088 -1.712442 0.000000 -0.000000 -89.999977 -89.999985 -0.000002 -0.000000 -0.000000 -0.000003 -0.000000 -0.000000
$definebone "ValveBiped.Bip01_L_Clavicle" "ValveBiped.Bip01_Spine4" 2.033344 1.000767 1.937660 -73.711861 168.619278 91.480545 0.000000 0.000000 0.000000 -0.000000 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Thigh" "ValveBiped.Bip01_Pelvis" -3.890452 0.000004 0.000007 2.970500 -90.299347 -89.999985 0.000000 0.000000 0.000000 -0.000000 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Calf" "ValveBiped.Bip01_R_Thigh" 17.848173 0.000000 0.000000 0.000000 1.958771 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_R_Foot" "ValveBiped.Bip01_R_Calf" 16.525253 -0.000000 0.000000 2.336451 -61.399998 2.212226 0.000000 0.000000 0.000000 -0.000000 -0.000003 -0.000000
$definebone "ValveBiped.Bip01_R_Toe0" "ValveBiped.Bip01_R_Foot" 6.879455 -0.000000 0.000000 -0.169060 -33.482128 -4.660049 0.000000 0.000000 -0.000000 -0.000000 -0.000003 0.000000
$definebone "ValveBiped.Bip01_L_Thigh" "ValveBiped.Bip01_Pelvis" 3.890452 -0.000004 -0.000003 2.970156 -89.700790 -89.999985 0.000000 -0.000000 0.000000 -0.000000 0.000000 0.000000
$definebone "ValveBiped.Bip01_L_Calf" "ValveBiped.Bip01_L_Thigh" 17.848177 0.000000 0.000000 -0.000000 1.959516 -0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_L_Foot" "ValveBiped.Bip01_L_Calf" 16.525253 0.000000 0.000000 -2.336617 -61.400341 -1.599413 0.000000 0.000000 0.000000 -0.000000 -0.000002 0.000000
$definebone "ValveBiped.Bip01_L_Toe0" "ValveBiped.Bip01_L_Foot" 6.879453 -0.000000 0.000000 -0.169039 -33.482132 -0.418217 0.000000 0.000000 0.000000 -0.000000 -0.000003 0.000000
$definebone "ValveBiped.Bip01_R_Finger4" "ValveBiped.Bip01_R_Hand" 3.859673 -0.132568 1.193108 -9.083958 -50.365341 27.452702 0.000000 0.000000 0.000000 0.000003 -0.000002 -0.000003
$definebone "ValveBiped.Bip01_R_Finger41" "ValveBiped.Bip01_R_Finger4" 1.312561 0.000000 -0.000001 -0.683652 -25.191353 -0.000005 0.000000 0.000000 0.000000 0.000002 -0.000002 -0.000004
$definebone "ValveBiped.Bip01_R_Finger42" "ValveBiped.Bip01_R_Finger41" 0.729362 0.000002 -0.000000 -0.351452 -13.995698 -0.000005 0.000000 0.000001 0.000000 0.000000 -0.000000 -0.000005
$definebone "ValveBiped.Bip01_R_Finger3" "ValveBiped.Bip01_R_Hand" 3.942293 0.050331 0.431043 -4.543841 -46.421329 8.880789 0.000000 0.000000 -0.000000 0.000001 0.000000 -0.000001
$definebone "ValveBiped.Bip01_R_Finger31" "ValveBiped.Bip01_R_Finger3" 1.539097 0.000002 0.000000 -0.335409 -14.196232 -0.000002 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000002
$definebone "ValveBiped.Bip01_R_Finger32" "ValveBiped.Bip01_R_Finger31" 1.196323 0.000000 0.000000 -0.553649 -24.680782 -0.000002 -0.000004 0.000000 0.000000 -0.000001 0.000003 -0.000002
$definebone "ValveBiped.Bip01_R_Finger2" "ValveBiped.Bip01_R_Hand" 3.883655 -0.050327 -0.431043 -1.512837 -33.672447 -4.921995 0.000000 0.000000 -0.000000 0.000001 -0.000002 -0.000000
$definebone "ValveBiped.Bip01_R_Finger21" "ValveBiped.Bip01_R_Finger2" 1.719576 -0.000004 0.000000 -0.456876 -20.995235 -0.000001 0.000000 0.000000 0.000000 0.000000 0.000001 -0.000001
$definebone "ValveBiped.Bip01_R_Finger22" "ValveBiped.Bip01_R_Finger21" 1.209183 0.000000 0.000000 -0.255596 -12.397430 -0.000001 0.000000 0.000002 0.000000 0.000000 0.000002 -0.000001
$definebone "ValveBiped.Bip01_R_Finger1" "ValveBiped.Bip01_R_Hand" 3.859829 -0.148937 -1.331282 2.209727 -30.481413 -20.306717 0.000000 0.000000 0.000000 -0.000000 0.000000 0.000003
$definebone "ValveBiped.Bip01_R_Finger11" "ValveBiped.Bip01_R_Finger1" 1.719425 0.000000 0.000000 -0.378896 -20.796652 0.000004 0.000000 0.000000 0.000000 0.000001 -0.000002 0.000003
$definebone "ValveBiped.Bip01_R_Finger12" "ValveBiped.Bip01_R_Finger11" 1.099667 0.000002 0.000000 -0.241272 -13.998052 0.000004 0.000000 0.000001 0.000000 0.000001 -0.000004 0.000003
$definebone "ValveBiped.Bip01_R_Finger0" "ValveBiped.Bip01_R_Hand" 0.806016 -0.359837 -1.318334 38.595467 -45.490326 68.995575 0.000000 0.000000 0.000000 -0.000001 0.000002 -0.000002
$definebone "ValveBiped.Bip01_R_Finger01" "ValveBiped.Bip01_R_Finger0" 1.789783 0.000001 0.000000 -0.361021 13.095239 -0.000001 0.000000 0.000000 0.000002 -0.000001 0.000002 -0.000001
$definebone "ValveBiped.Bip01_R_Finger02" "ValveBiped.Bip01_R_Finger01" 1.207001 0.000000 0.000002 -0.551071 20.792925 -0.000001 0.000000 -0.000000 0.000000 0.000000 -0.000000 -0.000001

$attachment "forward" "ValveBiped.forward" 0 0 0

$attachment anim_attachment_RH "ValveBiped.Anim_Attachment_RH" 0 0 0 rotate -90 0 -90
$attachment anim_attachment_head "ValveBiped.Bip01_Head1" 0 0 0 rotate -90 0 -90
$ikchain rhand "valvebiped.Bip01_R_Hand" Z 0 knee 0.707 0.707 0
$ikchain rfoot "valvebiped.Bip01_R_Foot" Z 0 knee 0.707 -0.707 0
$ikchain lfoot "valvebiped.Bip01_L_Foot" Z 0 knee 0.707 -0.707 0

$poseparameter "move_yaw" -180 180 wrap
$poseparameter "body_pitch" -90 90 loop 360
$poseparameter "body_yaw" -90 90 loop 360

$weightlist upperbody "Valvebiped.bip01_spine" 1.0
$weightlist nolowerbody "Valvebiped.bip01_Pelvis" 1.0 "ValveBiped.Bip01_L_Thigh" 0.0 "ValveBiped.Bip01_R_Thigh" 0.0
$weightlist lowerbody "valvebiped.bip01_pelvis" 1.0 "valvebiped.bip01_spine" 0.0

$surfaceprop "flesh"
$collisionjoints ragdoll {

   $mass 90.0
   $inertia 2.00
   $damping 0.01
   $rotdamping 0.4
   $rootbone "valvebiped.bip01_pelvis"
   $animatedfriction 1 1000 0.8 0.0 0.5

   $jointmerge "valvebiped.bip01_pelvis" "valvebiped.bip01"
   $jointmerge "valvebiped.bip01_pelvis" "valvebiped.bip01_spine1"

   $jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 1.00
   $jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 1.00
   $jointconstrain "valvebiped.bip01_spine2" z limit -25.00 50.00 1.00

   $jointconstrain "valvebiped.bip01_r_upperarm" x limit -50.00 57.00 1.00
   $jointconstrain "valvebiped.bip01_r_upperarm" y limit -19.00 102.00 1.00
   $jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 30.00 1.00

   $jointmassbias "valvebiped.bip01_r_forearm" 2.00
   $jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_forearm" z limit -120.00 4.00 1.00

   $jointmassbias "valvebiped.bip01_r_hand" 4.00
   $jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 1.00
   $jointconstrain "valvebiped.bip01_r_hand" y limit -30.00 30.00 1.00
   $jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 1.00

   $jointconstrain "valvebiped.bip01_r_thigh" x limit -25.00 39.00 1.00
   $jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 1.00
   $jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 1.00

   $jointmassbias "valvebiped.bip01_r_calf" 2.00
   $jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 1.00

   $jointmassbias "valvebiped.bip01_head1" 2.00
   $jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 1.00
   $jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 1.00
   $jointconstrain "valvebiped.bip01_head1" z limit -13.00 30.00 1.00

   $jointconstrain "valvebiped.bip01_l_thigh" x limit -25.00 20.00 1.00
   $jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 1.00
   $jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 1.00

   $jointmassbias "valvebiped.bip01_l_calf" 2.00
   $jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_l_calf" z limit -8.00 126.00 1.00

   $jointmassbias "valvebiped.bip01_l_foot" 2.00
   $jointconstrain "valvebiped.bip01_l_foot" x limit -1.00 -1.00 1.00
   $jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 1.00
   $jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 1.00

   $jointmassbias "valvebiped.bip01_r_foot" 2.00
   $jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_r_foot" y limit -21.00 6.00 1.00
   $jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 1.00

   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_Pelvis"
   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_spine2"
   $jointcollide "valvebiped.bip01_r_thigh" "valvebiped.bip01_l_thigh"
   $jointcollide "valvebiped.bip01_r_calf" "valvebiped.bip01_l_calf"
   $jointcollide "valvebiped.bip01_l_foot" "valvebiped.bip01_r_foot"
   $jointcollide "valvebiped.bip01_l_foot" "valvebiped.bip01_r_calf"
   $jointcollide "valvebiped.bip01_r_foot" "valvebiped.bip01_l_calf"

   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_l_thigh"
   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_r_thigh"

}
$sequence ragdoll       "ragdoll_pose"       FPS 30       activity ACT_DIERAGDOLL 1


I now have three SMD's.

The metrocop.smd is the actual Metrocop model, with the textures and stuff.
The ragdoll.smd is the collision model, looking thing. It's like, less detailed blobs.
The ragdoll_pose.smd is the bone structure.
disturb3d
Member
Member
 
Joined: Sat Sep 18, 2010 7:49 am

Re: Compiling a ragdoll?

Postby disturb3d on Sun Apr 22, 2012 7:00 am

Another guy pointed me to some helpful QC files.

New picture 1
New picture 2
They now ragdoll correctly, but the arm stretches out like that. Dunno whether this would be a QC problem or a model problem.

My QC:
Code: Select all
$modelname "missingleftarm.mdl"
$model "police" "metrocop.SMD"
$cdmaterials "models\Police\"

$eyeposition 0 0 72
$bbox -13 -13 0 13 13 72

$hierarchy "valvebiped.Bip01_Pelvis" ""
$hierarchy "Valvebiped.bip01_Spine" "valvebiped.Bip01_Pelvis"
$root "valvebiped.Bip01_Pelvis"
$alwayscollapse "Valvebiped.bip01"
$hierarchy "valvebiped.Bip01_L_Clavicle" "valvebiped.Bip01_Spine4"
$hierarchy "valvebiped.Bip01_R_Clavicle" "valvebiped.Bip01_Spine4"
$hierarchy "valvebiped.Bip01_L_Thigh" "valvebiped.Bip01_Pelvis"
$hierarchy "valvebiped.Bip01_R_Thigh" "valvebiped.Bip01_Pelvis"


$definebone "ValveBiped.Bip01_Pelvis" "" -0.000005 -0.533615 38.566917 0.000000 0.000000 89.999985 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$definebone "ValveBiped.Bip01_Spine" "ValveBiped.Bip01_Pelvis" 0.000005 3.345127 -2.981901 4.944224 89.999985 89.999985 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine1" "ValveBiped.Bip01_Spine" 4.018330 0.000000 0.000000 0.000000 -1.675443 -0.000000 0.000000 -0.000000 0.000000 0.000000 -0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine2" "ValveBiped.Bip01_Spine1" 3.518566 0.000000 0.000000 0.000000 5.748830 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine4" "ValveBiped.Bip01_Spine2" 8.942642 -0.000000 -0.000000 0.000000 11.120881 0.000000 0.000000 -0.000001 0.000000 0.000000 -0.000002 0.000000
$definebone "ValveBiped.Bip01_Neck1" "ValveBiped.Bip01_Spine4" 3.307270 0.000000 0.000000 0.000000 22.945694 179.999863 0.000000 0.000000 0.000000 -0.000000 0.000005 0.000000
$definebone "ValveBiped.Bip01_Head1" "ValveBiped.Bip01_Neck1" 3.593712 0.000000 0.000000 -0.000057 23.295723 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000004 -0.000000
$definebone "ValveBiped.forward" "ValveBiped.Bip01_Head1" 2 -3 0 0 -76 -90
$definebone "ValveBiped.Bip01_R_Clavicle" "ValveBiped.Bip01_Spine4" 2.033352 1.000771 -1.937610 73.712029 168.618774 -95.596497 0.000000 0.000000 0.000000 0.000000 -0.000001 0.000001
$definebone "ValveBiped.Bip01_R_UpperArm" "ValveBiped.Bip01_R_Clavicle" 6.028144 0.000000 0.000000 -0.462090 -33.623802 93.935234 0.000000 0.000000 0.000000 -0.000002 -0.000001 0.000000
$definebone "ValveBiped.Bip01_R_Forearm" "ValveBiped.Bip01_R_UpperArm" 11.692551 -0.000000 0.000004 -0.000005 -3.459061 0.000000 0.000000 0.000000 0.000000 -0.000005 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Hand" "ValveBiped.Bip01_R_Forearm" 11.481699 0.000000 0.000000 6.108071 2.532072 -89.664284 0.000000 0.000000 0.000000 0.000001 0.000000 -0.000000
$definebone "ValveBiped.Anim_Attachment_RH" "ValveBiped.Bip01_R_Hand" 2.676088 -1.712442 0.000000 -0.000000 -89.999977 -89.999985 -0.000002 -0.000000 -0.000000 -0.000003 -0.000000 -0.000000
$definebone "ValveBiped.Bip01_L_Clavicle" "ValveBiped.Bip01_Spine4" 2.033344 1.000767 1.937660 -73.711861 168.619278 91.480545 0.000000 0.000000 0.000000 -0.000000 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Thigh" "ValveBiped.Bip01_Pelvis" -3.890452 0.000004 0.000007 2.970500 -90.299347 -89.999985 0.000000 0.000000 0.000000 -0.000000 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Calf" "ValveBiped.Bip01_R_Thigh" 17.848173 0.000000 0.000000 0.000000 1.958771 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_R_Foot" "ValveBiped.Bip01_R_Calf" 16.525253 -0.000000 0.000000 2.336451 -61.399998 2.212226 0.000000 0.000000 0.000000 -0.000000 -0.000003 -0.000000
$definebone "ValveBiped.Bip01_R_Toe0" "ValveBiped.Bip01_R_Foot" 6.879455 -0.000000 0.000000 -0.169060 -33.482128 -4.660049 0.000000 0.000000 -0.000000 -0.000000 -0.000003 0.000000
$definebone "ValveBiped.Bip01_L_Thigh" "ValveBiped.Bip01_Pelvis" 3.890452 -0.000004 -0.000003 2.970156 -89.700790 -89.999985 0.000000 -0.000000 0.000000 -0.000000 0.000000 0.000000
$definebone "ValveBiped.Bip01_L_Calf" "ValveBiped.Bip01_L_Thigh" 17.848177 0.000000 0.000000 -0.000000 1.959516 -0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_L_Foot" "ValveBiped.Bip01_L_Calf" 16.525253 0.000000 0.000000 -2.336617 -61.400341 -1.599413 0.000000 0.000000 0.000000 -0.000000 -0.000002 0.000000
$definebone "ValveBiped.Bip01_L_Toe0" "ValveBiped.Bip01_L_Foot" 6.879453 -0.000000 0.000000 -0.169039 -33.482132 -0.418217 0.000000 0.000000 0.000000 -0.000000 -0.000003 0.000000
$definebone "ValveBiped.Bip01_R_Finger4" "ValveBiped.Bip01_R_Hand" 3.859673 -0.132568 1.193108 -9.083958 -50.365341 27.452702 0.000000 0.000000 0.000000 0.000003 -0.000002 -0.000003
$definebone "ValveBiped.Bip01_R_Finger41" "ValveBiped.Bip01_R_Finger4" 1.312561 0.000000 -0.000001 -0.683652 -25.191353 -0.000005 0.000000 0.000000 0.000000 0.000002 -0.000002 -0.000004
$definebone "ValveBiped.Bip01_R_Finger42" "ValveBiped.Bip01_R_Finger41" 0.729362 0.000002 -0.000000 -0.351452 -13.995698 -0.000005 0.000000 0.000001 0.000000 0.000000 -0.000000 -0.000005
$definebone "ValveBiped.Bip01_R_Finger3" "ValveBiped.Bip01_R_Hand" 3.942293 0.050331 0.431043 -4.543841 -46.421329 8.880789 0.000000 0.000000 -0.000000 0.000001 0.000000 -0.000001
$definebone "ValveBiped.Bip01_R_Finger31" "ValveBiped.Bip01_R_Finger3" 1.539097 0.000002 0.000000 -0.335409 -14.196232 -0.000002 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000002
$definebone "ValveBiped.Bip01_R_Finger32" "ValveBiped.Bip01_R_Finger31" 1.196323 0.000000 0.000000 -0.553649 -24.680782 -0.000002 -0.000004 0.000000 0.000000 -0.000001 0.000003 -0.000002
$definebone "ValveBiped.Bip01_R_Finger2" "ValveBiped.Bip01_R_Hand" 3.883655 -0.050327 -0.431043 -1.512837 -33.672447 -4.921995 0.000000 0.000000 -0.000000 0.000001 -0.000002 -0.000000
$definebone "ValveBiped.Bip01_R_Finger21" "ValveBiped.Bip01_R_Finger2" 1.719576 -0.000004 0.000000 -0.456876 -20.995235 -0.000001 0.000000 0.000000 0.000000 0.000000 0.000001 -0.000001
$definebone "ValveBiped.Bip01_R_Finger22" "ValveBiped.Bip01_R_Finger21" 1.209183 0.000000 0.000000 -0.255596 -12.397430 -0.000001 0.000000 0.000002 0.000000 0.000000 0.000002 -0.000001
$definebone "ValveBiped.Bip01_R_Finger1" "ValveBiped.Bip01_R_Hand" 3.859829 -0.148937 -1.331282 2.209727 -30.481413 -20.306717 0.000000 0.000000 0.000000 -0.000000 0.000000 0.000003
$definebone "ValveBiped.Bip01_R_Finger11" "ValveBiped.Bip01_R_Finger1" 1.719425 0.000000 0.000000 -0.378896 -20.796652 0.000004 0.000000 0.000000 0.000000 0.000001 -0.000002 0.000003
$definebone "ValveBiped.Bip01_R_Finger12" "ValveBiped.Bip01_R_Finger11" 1.099667 0.000002 0.000000 -0.241272 -13.998052 0.000004 0.000000 0.000001 0.000000 0.000001 -0.000004 0.000003
$definebone "ValveBiped.Bip01_R_Finger0" "ValveBiped.Bip01_R_Hand" 0.806016 -0.359837 -1.318334 38.595467 -45.490326 68.995575 0.000000 0.000000 0.000000 -0.000001 0.000002 -0.000002
$definebone "ValveBiped.Bip01_R_Finger01" "ValveBiped.Bip01_R_Finger0" 1.789783 0.000001 0.000000 -0.361021 13.095239 -0.000001 0.000000 0.000000 0.000002 -0.000001 0.000002 -0.000001
$definebone "ValveBiped.Bip01_R_Finger02" "ValveBiped.Bip01_R_Finger01" 1.207001 0.000000 0.000002 -0.551071 20.792925 -0.000001 0.000000 -0.000000 0.000000 0.000000 -0.000000 -0.000001

$attachment "forward" "ValveBiped.forward" 0 0 0

$attachment anim_attachment_RH "ValveBiped.Anim_Attachment_RH" 0 0 0 rotate -90 0 -90
$attachment anim_attachment_head "ValveBiped.Bip01_Head1" 0 0 0 rotate -90 0 -90
$ikchain rhand "valvebiped.Bip01_R_Hand" Z 0 knee 0.707 0.707 0
$ikchain rfoot "valvebiped.Bip01_R_Foot" Z 0 knee 0.707 -0.707 0
$ikchain lfoot "valvebiped.Bip01_L_Foot" Z 0 knee 0.707 -0.707 0

$poseparameter "move_yaw" -180 180 wrap
$poseparameter "body_pitch" -90 90 loop 360
$poseparameter "body_yaw" -90 90 loop 360

$weightlist upperbody "Valvebiped.bip01_spine" 1.0
$weightlist nolowerbody "Valvebiped.bip01_Pelvis" 1.0 "ValveBiped.Bip01_L_Thigh" 0.0 "ValveBiped.Bip01_R_Thigh" 0.0
$weightlist lowerbody "valvebiped.bip01_pelvis" 1.0 "valvebiped.bip01_spine" 0.0

$surfaceprop "flesh"
$collisionjoints ragdoll {

   $mass 90.0
   $inertia 2.00
   $damping 0.01
   $rotdamping 0.4
   $rootbone "valvebiped.bip01_pelvis"
   $animatedfriction 1 1000 0.8 0.0 0.5

   $jointmerge "valvebiped.bip01_pelvis" "valvebiped.bip01"
   $jointmerge "valvebiped.bip01_pelvis" "valvebiped.bip01_spine1"

   $jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 1.00
   $jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 1.00
   $jointconstrain "valvebiped.bip01_spine2" z limit -25.00 50.00 1.00

   $jointconstrain "valvebiped.bip01_r_upperarm" x limit -50.00 57.00 1.00
   $jointconstrain "valvebiped.bip01_r_upperarm" y limit -19.00 102.00 1.00
   $jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 30.00 1.00

   $jointmassbias "valvebiped.bip01_r_forearm" 2.00
   $jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_forearm" z limit -120.00 4.00 1.00

   $jointmassbias "valvebiped.bip01_r_hand" 4.00
   $jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 1.00
   $jointconstrain "valvebiped.bip01_r_hand" y limit -30.00 30.00 1.00
   $jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 1.00

   $jointconstrain "valvebiped.bip01_r_thigh" x limit -25.00 39.00 1.00
   $jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 1.00
   $jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 1.00

   $jointmassbias "valvebiped.bip01_r_calf" 2.00
   $jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 1.00

   $jointmassbias "valvebiped.bip01_head1" 2.00
   $jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 1.00
   $jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 1.00
   $jointconstrain "valvebiped.bip01_head1" z limit -13.00 30.00 1.00

   $jointconstrain "valvebiped.bip01_l_thigh" x limit -25.00 20.00 1.00
   $jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 1.00
   $jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 1.00

   $jointmassbias "valvebiped.bip01_l_calf" 2.00
   $jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_l_calf" z limit -8.00 126.00 1.00

   $jointmassbias "valvebiped.bip01_l_foot" 2.00
   $jointconstrain "valvebiped.bip01_l_foot" x limit -1.00 -1.00 1.00
   $jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 1.00
   $jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 1.00

   $jointmassbias "valvebiped.bip01_r_foot" 2.00
   $jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_r_foot" y limit -21.00 6.00 1.00
   $jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 1.00

   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_Pelvis"
   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_spine2"
   $jointcollide "valvebiped.bip01_r_thigh" "valvebiped.bip01_l_thigh"
   $jointcollide "valvebiped.bip01_r_calf" "valvebiped.bip01_l_calf"
   $jointcollide "valvebiped.bip01_l_foot" "valvebiped.bip01_r_foot"
   $jointcollide "valvebiped.bip01_l_foot" "valvebiped.bip01_r_calf"
   $jointcollide "valvebiped.bip01_r_foot" "valvebiped.bip01_l_calf"

   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_l_thigh"
   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_r_thigh"

}
$sequence ragdoll       "ragdoll_pose"       FPS 30       activity ACT_DIERAGDOLL 1


I now have three SMD's.

The metrocop.smd is the actual Metrocop model, with the textures and stuff.
The ragdoll.smd is the collision model, looking thing. It's like, less detailed blobs.
The ragdoll_pose.smd is the bone structure.
disturb3d
Member
Member
 
Joined: Sat Sep 18, 2010 7:49 am

Re: Compiling a ragdoll?

Postby cra0kalo on Sun Apr 22, 2012 7:10 am

disturb3d wrote:Thank you so much for pointing me to those QC files. I doubt I could have gotten to this point without those.

New picture 1
New picture 2
They now ragdoll correctly, but the arm stretches out like that. Dunno whether this would be a QC problem or a model problem.

My QC:
Code: Select all
$modelname "missingleftarm.mdl"
$model "police" "metrocop.SMD"
$cdmaterials "models\Police\"

$eyeposition 0 0 72
$bbox -13 -13 0 13 13 72

$hierarchy "valvebiped.Bip01_Pelvis" ""
$hierarchy "Valvebiped.bip01_Spine" "valvebiped.Bip01_Pelvis"
$root "valvebiped.Bip01_Pelvis"
$alwayscollapse "Valvebiped.bip01"
$hierarchy "valvebiped.Bip01_L_Clavicle" "valvebiped.Bip01_Spine4"
$hierarchy "valvebiped.Bip01_R_Clavicle" "valvebiped.Bip01_Spine4"
$hierarchy "valvebiped.Bip01_L_Thigh" "valvebiped.Bip01_Pelvis"
$hierarchy "valvebiped.Bip01_R_Thigh" "valvebiped.Bip01_Pelvis"


$definebone "ValveBiped.Bip01_Pelvis" "" -0.000005 -0.533615 38.566917 0.000000 0.000000 89.999985 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$definebone "ValveBiped.Bip01_Spine" "ValveBiped.Bip01_Pelvis" 0.000005 3.345127 -2.981901 4.944224 89.999985 89.999985 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine1" "ValveBiped.Bip01_Spine" 4.018330 0.000000 0.000000 0.000000 -1.675443 -0.000000 0.000000 -0.000000 0.000000 0.000000 -0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine2" "ValveBiped.Bip01_Spine1" 3.518566 0.000000 0.000000 0.000000 5.748830 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_Spine4" "ValveBiped.Bip01_Spine2" 8.942642 -0.000000 -0.000000 0.000000 11.120881 0.000000 0.000000 -0.000001 0.000000 0.000000 -0.000002 0.000000
$definebone "ValveBiped.Bip01_Neck1" "ValveBiped.Bip01_Spine4" 3.307270 0.000000 0.000000 0.000000 22.945694 179.999863 0.000000 0.000000 0.000000 -0.000000 0.000005 0.000000
$definebone "ValveBiped.Bip01_Head1" "ValveBiped.Bip01_Neck1" 3.593712 0.000000 0.000000 -0.000057 23.295723 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000004 -0.000000
$definebone "ValveBiped.forward" "ValveBiped.Bip01_Head1" 2 -3 0 0 -76 -90
$definebone "ValveBiped.Bip01_R_Clavicle" "ValveBiped.Bip01_Spine4" 2.033352 1.000771 -1.937610 73.712029 168.618774 -95.596497 0.000000 0.000000 0.000000 0.000000 -0.000001 0.000001
$definebone "ValveBiped.Bip01_R_UpperArm" "ValveBiped.Bip01_R_Clavicle" 6.028144 0.000000 0.000000 -0.462090 -33.623802 93.935234 0.000000 0.000000 0.000000 -0.000002 -0.000001 0.000000
$definebone "ValveBiped.Bip01_R_Forearm" "ValveBiped.Bip01_R_UpperArm" 11.692551 -0.000000 0.000004 -0.000005 -3.459061 0.000000 0.000000 0.000000 0.000000 -0.000005 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Hand" "ValveBiped.Bip01_R_Forearm" 11.481699 0.000000 0.000000 6.108071 2.532072 -89.664284 0.000000 0.000000 0.000000 0.000001 0.000000 -0.000000
$definebone "ValveBiped.Anim_Attachment_RH" "ValveBiped.Bip01_R_Hand" 2.676088 -1.712442 0.000000 -0.000000 -89.999977 -89.999985 -0.000002 -0.000000 -0.000000 -0.000003 -0.000000 -0.000000
$definebone "ValveBiped.Bip01_L_Clavicle" "ValveBiped.Bip01_Spine4" 2.033344 1.000767 1.937660 -73.711861 168.619278 91.480545 0.000000 0.000000 0.000000 -0.000000 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Thigh" "ValveBiped.Bip01_Pelvis" -3.890452 0.000004 0.000007 2.970500 -90.299347 -89.999985 0.000000 0.000000 0.000000 -0.000000 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_Calf" "ValveBiped.Bip01_R_Thigh" 17.848173 0.000000 0.000000 0.000000 1.958771 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_R_Foot" "ValveBiped.Bip01_R_Calf" 16.525253 -0.000000 0.000000 2.336451 -61.399998 2.212226 0.000000 0.000000 0.000000 -0.000000 -0.000003 -0.000000
$definebone "ValveBiped.Bip01_R_Toe0" "ValveBiped.Bip01_R_Foot" 6.879455 -0.000000 0.000000 -0.169060 -33.482128 -4.660049 0.000000 0.000000 -0.000000 -0.000000 -0.000003 0.000000
$definebone "ValveBiped.Bip01_L_Thigh" "ValveBiped.Bip01_Pelvis" 3.890452 -0.000004 -0.000003 2.970156 -89.700790 -89.999985 0.000000 -0.000000 0.000000 -0.000000 0.000000 0.000000
$definebone "ValveBiped.Bip01_L_Calf" "ValveBiped.Bip01_L_Thigh" 17.848177 0.000000 0.000000 -0.000000 1.959516 -0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_L_Foot" "ValveBiped.Bip01_L_Calf" 16.525253 0.000000 0.000000 -2.336617 -61.400341 -1.599413 0.000000 0.000000 0.000000 -0.000000 -0.000002 0.000000
$definebone "ValveBiped.Bip01_L_Toe0" "ValveBiped.Bip01_L_Foot" 6.879453 -0.000000 0.000000 -0.169039 -33.482132 -0.418217 0.000000 0.000000 0.000000 -0.000000 -0.000003 0.000000
$definebone "ValveBiped.Bip01_R_Finger4" "ValveBiped.Bip01_R_Hand" 3.859673 -0.132568 1.193108 -9.083958 -50.365341 27.452702 0.000000 0.000000 0.000000 0.000003 -0.000002 -0.000003
$definebone "ValveBiped.Bip01_R_Finger41" "ValveBiped.Bip01_R_Finger4" 1.312561 0.000000 -0.000001 -0.683652 -25.191353 -0.000005 0.000000 0.000000 0.000000 0.000002 -0.000002 -0.000004
$definebone "ValveBiped.Bip01_R_Finger42" "ValveBiped.Bip01_R_Finger41" 0.729362 0.000002 -0.000000 -0.351452 -13.995698 -0.000005 0.000000 0.000001 0.000000 0.000000 -0.000000 -0.000005
$definebone "ValveBiped.Bip01_R_Finger3" "ValveBiped.Bip01_R_Hand" 3.942293 0.050331 0.431043 -4.543841 -46.421329 8.880789 0.000000 0.000000 -0.000000 0.000001 0.000000 -0.000001
$definebone "ValveBiped.Bip01_R_Finger31" "ValveBiped.Bip01_R_Finger3" 1.539097 0.000002 0.000000 -0.335409 -14.196232 -0.000002 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000002
$definebone "ValveBiped.Bip01_R_Finger32" "ValveBiped.Bip01_R_Finger31" 1.196323 0.000000 0.000000 -0.553649 -24.680782 -0.000002 -0.000004 0.000000 0.000000 -0.000001 0.000003 -0.000002
$definebone "ValveBiped.Bip01_R_Finger2" "ValveBiped.Bip01_R_Hand" 3.883655 -0.050327 -0.431043 -1.512837 -33.672447 -4.921995 0.000000 0.000000 -0.000000 0.000001 -0.000002 -0.000000
$definebone "ValveBiped.Bip01_R_Finger21" "ValveBiped.Bip01_R_Finger2" 1.719576 -0.000004 0.000000 -0.456876 -20.995235 -0.000001 0.000000 0.000000 0.000000 0.000000 0.000001 -0.000001
$definebone "ValveBiped.Bip01_R_Finger22" "ValveBiped.Bip01_R_Finger21" 1.209183 0.000000 0.000000 -0.255596 -12.397430 -0.000001 0.000000 0.000002 0.000000 0.000000 0.000002 -0.000001
$definebone "ValveBiped.Bip01_R_Finger1" "ValveBiped.Bip01_R_Hand" 3.859829 -0.148937 -1.331282 2.209727 -30.481413 -20.306717 0.000000 0.000000 0.000000 -0.000000 0.000000 0.000003
$definebone "ValveBiped.Bip01_R_Finger11" "ValveBiped.Bip01_R_Finger1" 1.719425 0.000000 0.000000 -0.378896 -20.796652 0.000004 0.000000 0.000000 0.000000 0.000001 -0.000002 0.000003
$definebone "ValveBiped.Bip01_R_Finger12" "ValveBiped.Bip01_R_Finger11" 1.099667 0.000002 0.000000 -0.241272 -13.998052 0.000004 0.000000 0.000001 0.000000 0.000001 -0.000004 0.000003
$definebone "ValveBiped.Bip01_R_Finger0" "ValveBiped.Bip01_R_Hand" 0.806016 -0.359837 -1.318334 38.595467 -45.490326 68.995575 0.000000 0.000000 0.000000 -0.000001 0.000002 -0.000002
$definebone "ValveBiped.Bip01_R_Finger01" "ValveBiped.Bip01_R_Finger0" 1.789783 0.000001 0.000000 -0.361021 13.095239 -0.000001 0.000000 0.000000 0.000002 -0.000001 0.000002 -0.000001
$definebone "ValveBiped.Bip01_R_Finger02" "ValveBiped.Bip01_R_Finger01" 1.207001 0.000000 0.000002 -0.551071 20.792925 -0.000001 0.000000 -0.000000 0.000000 0.000000 -0.000000 -0.000001

$attachment "forward" "ValveBiped.forward" 0 0 0

$attachment anim_attachment_RH "ValveBiped.Anim_Attachment_RH" 0 0 0 rotate -90 0 -90
$attachment anim_attachment_head "ValveBiped.Bip01_Head1" 0 0 0 rotate -90 0 -90
$ikchain rhand "valvebiped.Bip01_R_Hand" Z 0 knee 0.707 0.707 0
$ikchain rfoot "valvebiped.Bip01_R_Foot" Z 0 knee 0.707 -0.707 0
$ikchain lfoot "valvebiped.Bip01_L_Foot" Z 0 knee 0.707 -0.707 0

$poseparameter "move_yaw" -180 180 wrap
$poseparameter "body_pitch" -90 90 loop 360
$poseparameter "body_yaw" -90 90 loop 360

$weightlist upperbody "Valvebiped.bip01_spine" 1.0
$weightlist nolowerbody "Valvebiped.bip01_Pelvis" 1.0 "ValveBiped.Bip01_L_Thigh" 0.0 "ValveBiped.Bip01_R_Thigh" 0.0
$weightlist lowerbody "valvebiped.bip01_pelvis" 1.0 "valvebiped.bip01_spine" 0.0

$surfaceprop "flesh"
$collisionjoints ragdoll {

   $mass 90.0
   $inertia 2.00
   $damping 0.01
   $rotdamping 0.4
   $rootbone "valvebiped.bip01_pelvis"
   $animatedfriction 1 1000 0.8 0.0 0.5

   $jointmerge "valvebiped.bip01_pelvis" "valvebiped.bip01"
   $jointmerge "valvebiped.bip01_pelvis" "valvebiped.bip01_spine1"

   $jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 1.00
   $jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 1.00
   $jointconstrain "valvebiped.bip01_spine2" z limit -25.00 50.00 1.00

   $jointconstrain "valvebiped.bip01_r_upperarm" x limit -50.00 57.00 1.00
   $jointconstrain "valvebiped.bip01_r_upperarm" y limit -19.00 102.00 1.00
   $jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 30.00 1.00

   $jointmassbias "valvebiped.bip01_r_forearm" 2.00
   $jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_forearm" z limit -120.00 4.00 1.00

   $jointmassbias "valvebiped.bip01_r_hand" 4.00
   $jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 1.00
   $jointconstrain "valvebiped.bip01_r_hand" y limit -30.00 30.00 1.00
   $jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 1.00

   $jointconstrain "valvebiped.bip01_r_thigh" x limit -25.00 39.00 1.00
   $jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 1.00
   $jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 1.00

   $jointmassbias "valvebiped.bip01_r_calf" 2.00
   $jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 1.00

   $jointmassbias "valvebiped.bip01_head1" 2.00
   $jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 1.00
   $jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 1.00
   $jointconstrain "valvebiped.bip01_head1" z limit -13.00 30.00 1.00

   $jointconstrain "valvebiped.bip01_l_thigh" x limit -25.00 20.00 1.00
   $jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 1.00
   $jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 1.00

   $jointmassbias "valvebiped.bip01_l_calf" 2.00
   $jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 1.00
   $jointconstrain "valvebiped.bip01_l_calf" z limit -8.00 126.00 1.00

   $jointmassbias "valvebiped.bip01_l_foot" 2.00
   $jointconstrain "valvebiped.bip01_l_foot" x limit -1.00 -1.00 1.00
   $jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 1.00
   $jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 1.00

   $jointmassbias "valvebiped.bip01_r_foot" 2.00
   $jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
   $jointconstrain "valvebiped.bip01_r_foot" y limit -21.00 6.00 1.00
   $jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 1.00

   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_Pelvis"
   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_spine2"
   $jointcollide "valvebiped.bip01_r_thigh" "valvebiped.bip01_l_thigh"
   $jointcollide "valvebiped.bip01_r_calf" "valvebiped.bip01_l_calf"
   $jointcollide "valvebiped.bip01_l_foot" "valvebiped.bip01_r_foot"
   $jointcollide "valvebiped.bip01_l_foot" "valvebiped.bip01_r_calf"
   $jointcollide "valvebiped.bip01_r_foot" "valvebiped.bip01_l_calf"

   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_l_thigh"
   $jointcollide "valvebiped.bip01_r_forearm" "valvebiped.bip01_r_thigh"

}
$sequence ragdoll       "ragdoll_pose"       FPS 30       activity ACT_DIERAGDOLL 1


I now have three SMD's.

The metrocop.smd is the actual Metrocop model, with the textures and stuff.
The ragdoll.smd is the collision model, looking thing. It's like, less detailed blobs.
The ragdoll_pose.smd is the bone structure.

bip01_Pelvis

Yes no problem man here to help :)
Cra0kalo
CG Artist/3D Animator
http://cra0kalo.com

Lead of Operation Reaper
http://projectreaper.com

Lead of the "Dark Alley" Project
http://alleyproject.net
User avatar
cra0kalo
Regular
Regular
 
Joined: Thu Apr 28, 2011 2:35 am

Re: Compiling a ragdoll?

Postby Stormy on Sun Apr 22, 2012 8:42 am

That looks like a badly weighted vert. It also looks like a lack of root bone, but I think that should have thrown an error in studiomdl. Double check that all of the verts in the model that is stretching like that are weighted to a bone.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Compiling a ragdoll?

Postby disturb3d on Sun Apr 22, 2012 9:05 am

What do you mean by bip01_Pelvis?
disturb3d
Member
Member
 
Joined: Sat Sep 18, 2010 7:49 am

Re: Compiling a ragdoll?

Postby disturb3d on Sun Apr 22, 2012 9:13 am

Probably got rid of the clavicle thing in one of the models, but not in the others. I'll go check.

edit: nope.
disturb3d
Member
Member
 
Joined: Sat Sep 18, 2010 7:49 am

Re: Compiling a ragdoll?

Postby Blink on Sun Apr 22, 2012 10:59 am

disturb3d wrote:*I posted this in the wrong section of the forums before, but now it's in the right one.


Merged the two topics to keep info in one place
User avatar
Blink
Cool 'n that
Cool 'n that
 
Joined: Fri Oct 08, 2004 4:16 pm
Location: UK

Re: Compiling a ragdoll?

Postby disturb3d on Sun Apr 22, 2012 6:38 pm

Thanks Blink.

I think I've figured it out. When I covered up the hole created when I removed the model's arm, I didn't tie that area to any bones, so it's just sort of floating there I guess.
disturb3d
Member
Member
 
Joined: Sat Sep 18, 2010 7:49 am

Re: Compiling a ragdoll?

Postby Stormy on Sun Apr 22, 2012 6:45 pm

Bam. Rig that shit.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Compiling a ragdoll?

Postby disturb3d on Sun Apr 22, 2012 8:11 pm

I can't figure this out. Do you just select the vertices and then select a bone somehow? I've tried watching 3 or 4 tutorials, but all of them do it differently and it seems really overcomplicated.

Edit:

IT WORKS NOW! Some of the vertices were tied to some SMDImport bone, so I switched the weights from that bone to the correct bone (clavicle) and it all works fine now. Thanks a ton for all your help Black_Stormy and cra0kalo!
disturb3d
Member
Member
 
Joined: Sat Sep 18, 2010 7:49 am

Re: Compiling a ragdoll?

Postby Stormy on Sun Apr 22, 2012 9:23 pm

Awesome! Link me when you have a downloadable demo, I want to see this in action.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Compiling a ragdoll?

Postby cra0kalo on Sun Apr 29, 2012 10:54 am

yeah no problem man
Cra0kalo
CG Artist/3D Animator
http://cra0kalo.com

Lead of Operation Reaper
http://projectreaper.com

Lead of the "Dark Alley" Project
http://alleyproject.net
User avatar
cra0kalo
Regular
Regular
 
Joined: Thu Apr 28, 2011 2:35 am
Previous

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users