Trying to expand on Headspack

Hey, guys. I have a gore mod that implements dismemberment, but only for the head. Thing is, the dismembered models came with something called “headspack,” so not much work was put into this. However, I wish to expand on the pack and make limbs and such, including the main bodies themselves without the limb. It should be as simple as detaching an arm from the already existing model, but I honestly don’t know where to go from there. After doing so and deleting the bones (of the now non-existent right arm), I used SMD exporter in Blender and compiled the model just as a test and this is what it looks like in-game.

The left arm is extended to where it pokes out from the hole that used to be where the right arm was attached. When I back off a distance, the right arm also reappears. In the console it mentions that the model is “missing vcollide data.” Does it need a .phy file or something? I’m kinda naive on this subject…

Any help would be appreciated!

Just an update. I managed to fix the “Vcollide” error, but the model is still standing at a T-pose and I can clip through it. Would the QC help?


$cd "C:\Users\Jake\Documents\decompiles\combinegibs"
$modelname "Combine_Soldier_armless.mdl"
$model "Soldier" "Soldier_reference.smd"
$cdmaterials "models\Combine_Soldier\" 
$hboxset "default" 
$scale 1.0 
$surfaceprop "flesh" 
$illumposition -2.255 0.000 36.711
$sequence ragdoll "soldier_reference.smd" ACT_DIERAGDOLL 1 fps 30.00
$collisionmodel "Soldier_reference.smd" 
{ 
$automass 
$concave 
}

EDIT: Does the Blender SMD importer have an issue?! Why isn’t there a phys mesh or anything with the ragdoll? Or am I doing something wrong?

[editline]20th January 2013[/editline]

I just tried reimporting the ref smd and this is what I got.

I’m assuming you’re trying to use a Valve physmodel still. Collision boxes are bound to bones, so if it can’t find the bones they’re supposed to go to, it throws a hissy fit instead of disregarding just that part of the model.

import soldier_reference.smd and remove the arm from that and dont mess with the bones, then it should work.

I did it over and didn’t mess with the bones this time, but damnit it’s still not working. :frowning:

EDIT: My bad. When the QC I posted up there was still in effect, the ragdoll was actually NONEXISTENT. There’s no errors coming up in-game either. I redid the QC a bit to take up this form:


$cd "C:\Users\Jake\Documents\decompiles\combinegibs"$modelname "Combine_Soldier_armless.mdl"
$model "Soldier" "Soldier_reference.smd"
$cdmaterials "models\Combine_Soldier\" 
$cdmaterials "models\zombie_classic\"
$hboxset "default" 
$hbox 2 "ValveBiped.Bip01_Spine" -1.000  -4.740  -7.220  7.000  8.270  6.780
$hbox 1 "ValveBiped.Bip01_Head1" -1.750  -8.000  -3.500  7.250  4.000  3.500
$hbox 4 "ValveBiped.Bip01_L_UpperArm" -2.000  -2.750  -2.750  12.000  2.750  2.750
$hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000  -2.440  -2.150  10.000  2.060  2.350
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.250  -1.000  -2.000  5.750  1.000  2.000
$hbox 6 "ValveBiped.Bip01_L_Thigh" 1.070  -3.000  -3.000  18.920  5.000  4.000
$hbox 6 "ValveBiped.Bip01_L_Calf" 0.500  -3.500  -2.800  15.500  3.500  3.200
$hbox 6 "ValveBiped.Bip01_L_Foot" -0.500  -1.500  -2.000  5.500  4.500  2.500
$hbox 6 "ValveBiped.Bip01_L_Toe0" -0.250  -1.750  -2.190  3.250  0.750  2.460
$hbox 7 "ValveBiped.Bip01_R_Thigh" 1.000  -5.500  -3.500  19.000  3.500  3.500
$hbox 7 "ValveBiped.Bip01_R_Calf" 0.500  -4.010  -2.570  15.500  3.990  2.930
$hbox 7 "ValveBiped.Bip01_R_Foot" -1.250  -4.000  -2.250  5.250  2.000  2.250
$hbox 7 "ValveBiped.Bip01_R_Toe0" -1.000  -0.750  -2.600  3.000  1.750  2.100
$hbox 0 "ValveBiped.Bip01_Pelvis" -7.000  -4.500  -8.000  7.000  4.500  5.000
$hbox 0 "ValveBiped.Bip01_Spine2" -1.000  -4.250  -7.250  13.000  8.250  7.250
$scale 1.0 
$surfaceprop "flesh" 
$illumposition -2.255 0.000 36.711
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$collisionmodel "Soldier_reference.smd" 
{ 
$automass 
}

and that’s when the ragdoll is still doing its T-pose.

The ragdoll data is still wrong. You’re referring to the reference model instead of the proper phymodel, and there’s no joint settings for the ragdoll’s different parts.

You probably used one of those “fixed” MDLDecompiler versions to decompile the Combine Soldier. In that case, they won’t decompile the physics data of the model out of concern of crashes. You’ll have to use the original MDLDecompiler to get the physics data out of ragdolls. It should still work correctly as long as you uncheck “Use Steam GCF Access” before decompiling.

You’re probably right. I’ve been thinking it may be that. You speak of Cannonfodder’s StudioCompiler right? That seems to be the only decompiler that works for me. Where is this “original” MDLDecompiler?

Nevermind. I found it. And I’ve done it.

Thanks again, everyone, for your help. :slight_smile:

[editline]21st January 2013[/editline]

Now I’m trying to do the arm itself, which seems to be pretty tricky. I’ve imported the combine soldier, deleted everything but the right arm, imported the phys model and did the same to that, and then exported it and modified the QC to look like this:


$cd "C:\Users\Jake\Documents\decompiles\combinegibs"
$modelname "Combine_rightarm.mdl"
$model "Soldier" "Soldier_reference.smd"
$cdmaterials "models\Combine_Soldier\"
$cdmaterials "models\zombie_classic\"
$hboxset "default"
$hbox 5 "ValveBiped.Bip01_R_Forearm" 0.000  -2.250  -2.250  10.000  2.250  2.250
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.500  -0.960  -2.330  5.500  1.040  2.610
// Model uses material "Zombie_Classic_sheet.vmt"
// Model uses material "combinesoldiersheet.vmt"
$surfaceprop "flesh"
$keyvalues  { physgun_interactions { "onpickup" "boogie" "onlaunch" "spin_zaxis" "onfirstimpact" "bloodsplat"  } } 
$eyeposition -0.000 -0.000 73.000
$illumposition -0.000 -2.255 36.711
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$ikchain rhand ValveBiped.Bip01_R_Hand knee  0.707 0.707 0.000
$ikchain lhand ValveBiped.Bip01_L_Hand knee  0.707 0.707 0.000
$ikchain rfoot ValveBiped.Bip01_R_Foot knee  0.707 -0.707 0.000
$ikchain lfoot ValveBiped.Bip01_L_Foot knee  0.707 -0.707 0.000
$collisionmodel "phymodel.smd" {

    $concave
    $mass 100.0
    $inertia 1.00
    $damping 0.00
    $rotdamping 0.00
}
$collisionjoints "phymodel.smd" {

    $mass 100.0
    $inertia 2.00
    $damping 0.01
    $rotdamping 0.40

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

    $jointmassbias "valvebiped.bip01_r_hand" 4.00
    $jointconstrain "valvebiped.bip01_r_hand" x limit -120.00 120.00 0.04
    $jointconstrain "valvebiped.bip01_r_hand" y limit 0.00 0.00 0.00
    $jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 0.04
}


In-game, the arm looks like it’s attached to an invisible soldier, and when I throw it around, it rotates along an axis at an awkwardly high speed, clipping through the floor.

EDIT: I altered the ragdoll.smd as well. The models I’m trying to make are associated with a goremod lua. Would the lua have to do anything with it?


 function RightArmGib(ent,pos,headmodel,force,direction) 
    for i=1, 1 do
	
		     if (GetGlobalInt("gibsnum") >= GetConVar("g_maxgibs"):GetInt() ) then return end
	 
	     local gib = ents.Create("chappi_gib")
	     gib:SetPos(pos + Vector(0,0,10))
	     gib:Spawn()
	     gib:Activate()
		 gib:SetModel(headmodel)
		 gib:SetAngles(ent:GetAngles())


		 local phys = gib:GetPhysicsObject()
		 phys:ApplyForceOffset(direction/2,direction)
					 gib:Fire( "kill", "", math.random(GibLifetimemin+3,GibLifetimemax+4))
	 end
 end

I’ve tried redoing the model and the QC to make it look like this:


$cd "C:\Users\Jake\Documents\decompiles\combinegibs"
$modelname "Combine_Rightarm.mdl"
$model "Soldier" "Soldier_reference.smd"
$cdmaterials "models\Combine_Soldier\"
$cdmaterials "models\Zombie_Classic\"
$hboxset "default"
$hbox 0 "ValveBiped.Bip01_R_UpperArm" -2.000  -2.750  -2.750  12.000  2.750  2.750
$hbox 0 "ValveBiped.Bip01_R_Forearm" 0.000  -2.250  -2.250  10.000  2.250  2.250
$hbox 0 "ValveBiped.Bip01_R_Hand" 0.500  -0.960  -2.330  5.500  1.040  2.610
// Model uses material "combinesoldiersheet.vmt"
$surfaceprop "flesh"
$eyeposition -0.000 0.000 73.000
$illumposition -2.255 0.000 36.711
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$collisionjoints "phymodel.smd" {

	$mass 15.0
	$inertia 2.00
	$damping 0.01
	$rotdamping 0.40
	$rootbone "valvebiped.bip01_r_upperarm"

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

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

	$jointmassbias "valvebiped.bip01_r_hand" 4.00
	$jointconstrain "valvebiped.bip01_r_hand" x limit -120.00 120.00 0.20
	$jointconstrain "valvebiped.bip01_r_hand" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 0.20
}


Now the arm is just not showing up at all with the console errors:

Attempting to precache model, but model name is NULL
Ragdoll () has no model!

Here’s the lua just in case:


 function RightArmGib(ent,pos,gibmodel,force,direction)
 
    for i=1, 1 do
	
		     if (GetGlobalInt("gibsnum") >= GetConVar("g_maxgibs"):GetInt() ) then return end
	 
local gib = ents.Create("prop_ragdoll")
             gib:SetPos(pos + Vector(0,0,10))
             gib:Spawn()
             gib:Activate()
                 gib:SetModel(gibmodel)
                 gib:SetAngles(ent:GetAngles())
 
                 local phys = gib:GetPhysicsObject()
				 if !phys:IsValid() then
					return 
					end
                 phys:ApplyForceOffset(direction/4,direction)
                 
                 gib:Fire( "kill", "", math.random(GibLifetimemin+3,GibLifetimemax+4))
	 end
 end

I tried making it a ragdoll instead of a phys object.

There aren’t many responses here, just wanted to let you know that I think this is really neat. Garry’s Mod hasn’t seen a decent dismemberment-like mod in almost 4 years, I hope to see this completed!

I’ll try, but I can’t guarantee it without help! I’m just trying to make a ragdoll of the arm is all at the moment.

Also, you can download the “uncompleted” version of this on workshop (Chappi’s Gore Mod), if you wish.

So I tried doing half of the Combine’s body from the stomach, and the top half is causing me trouble. Do the bones actually play a part here? There’s an invisible ragdoll sitting right below the floating half. When I shoot it, the half moves around with the invisible ragdoll. Please, could someone help me out here??

The bottom half turned out fine.

Here’s something to better illustrate the “invisible ragdoll” issue. I can’t rotate it or anything.

That’s because you’re still using the physics model for the full-body, which still applies no matter what the bones or joint settings are.

You’ll have to edit the phymodel and delete any parts that do not apply to your compile. It’s not hard, but it is very important to assign each part that is rigged to a bone to its own smoothing group. Otherwise it’ll break on compile.

So it’s not as simple as just deleting parts of the phymodel? I’ve already done that.

An update. Went back to the arm since it’s having a similar problem and opened it up in HLMV. This doesn’t seem right.

Sorry to post so much, guys, but I’m really determined to get this working.

I managed to make the ragdoll work…kinda. This reminds me of the stalker model from back then.

What do?

Here’s the qc:


$cd "C:\Users\Jake\Documents\decompiles\combineupperbody"
$modelname "Combine_Soldier_upperbody.mdl"
$model "studio" "Soldier_reference.smd"
$cdmaterials "models\Combine_Soldier\"
$cdmaterials "models\Zombie_Classic\"
$hboxset "default"
$hbox 2 "ValveBiped.Bip01_Spine" -1.000  -4.740  -7.220  7.000  8.270  6.780
$hbox 1 "ValveBiped.Bip01_Head1" -1.750  -8.000  -3.500  7.250  4.000  3.500
$hbox 4 "ValveBiped.Bip01_L_UpperArm" -2.000  -2.750  -2.750  12.000  2.750  2.750
$hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000  -2.440  -2.150  10.000  2.060  2.350
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.250  -1.000  -2.000  5.750  1.000  2.000
$hbox 5 "ValveBiped.Bip01_R_UpperArm" -2.000  -2.750  -2.750  12.000  2.750  2.750
$hbox 5 "ValveBiped.Bip01_R_Forearm" 0.000  -2.250  -2.250  10.000  2.250  2.250
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.500  -0.960  -2.330  5.500  1.040  2.610
$hbox 0 "ValveBiped.Bip01_Pelvis" -7.000  -4.500  -8.000  7.000  4.500  5.000
$hbox 0 "ValveBiped.Bip01_Spine2" -1.000  -4.250  -7.250  13.000  8.250  7.250
// Model uses material "combinesoldiersheet.vmt"
$attachment "lefthand" "ValveBiped.Bip01_L_Hand" 0.00 -0.00 -0.00 rotate -0.00 0.00 -0.00
$attachment "zipline" "ValveBiped.Bip01_Spine4" 3.00 -4.00 -0.00 rotate 0.00 -0.00 -0.00
$attachment "eyes" "ValveBiped.Bip01_Head1" 4.50 -5.00 0.00 rotate 0.00 -90.00 -90.00
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" -0.00 -0.00 -0.00 rotate -90.00 -90.00 0.00
$attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" -0.00 -0.00 0.00 rotate -90.00 -90.00 0.00
$includemodel "combine_soldier_anims.mdl"
$surfaceprop "flesh"
$keyvalues  { physgun_interactions { "onpickup" "boogie" "onlaunch" "spin_zaxis" "onfirstimpact" "bloodsplat"  } } 
$eyeposition -0.000 0.000 73.000
$illumposition -2.255 0.000 36.711
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$collisionjoints "phymodel.smd" {

	$mass 100.0
	$inertia 2.00
	$damping 0.01
	$rotdamping 0.40
	$rootbone "valvebiped.bip01_spine1"

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

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

	$jointmassbias "valvebiped.bip01_l_forearm" 2.00
	$jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" z limit -120.00 4.00 0.20

	$jointmassbias "valvebiped.bip01_l_hand" 4.00
	$jointconstrain "valvebiped.bip01_l_hand" x limit -120.00 120.00 0.20
	$jointconstrain "valvebiped.bip01_l_hand" y limit 0.00 0.00 0.20
	$jointconstrain "valvebiped.bip01_l_hand" z limit -57.00 70.00 0.20

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

	$jointmassbias "valvebiped.bip01_r_hand" 4.00
	$jointconstrain "valvebiped.bip01_r_hand" x limit -120.00 120.00 0.20
	$jointconstrain "valvebiped.bip01_r_hand" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 0.20

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