Character model crashes.

I’ve been making a character model, he’s set up like so:



bodygroup top
bodygroup bottom
bodygroup headgear
bodygroup shoes


I recently made a new addition, one for each of these bodygroups (the 7th on each) and it crashed model viewer and gmod when loading the mdl.

This happened one time before and it was supposedly caused by a bad SMD because it cleared up after a few re-exports; However this is not the case as I’ve tried to run only this last set with another few and it works fine, and I’ve tried running all of the others without this one too.

If you don’t have a direct answer for what’s causing it even some tips on things that could be it that generally crash gmod/model viewer would be great:)

Thanks for reading <3

When you say you made an addition, could you elaborate?

an extra top, bottom, headgear and shoes submesh.

I know that the Source engine has a maximum of 32 bodygroups and 32 VMTs assigned to each model. (Not sure if bodygroups includes subgroups.) Maybe check if you’re not going over that limit, with the VMTs at least? Not sure if it would cause crashing though.

going over the 32 limit gives a compile error, not a crash :slight_smile:

Maybe one of your SMDs is bad. That can cause a crash.

did you read OP at all? it’s not the smd’s because i tried the new content by itself and it worked, it just wont work with everything else too.

Sorry to bump, but this is very relevant to all interests as it has not been solved before. If we can solve it now then future character innovations can go a lot further than mine (which are already extensive)

I read that models can only have a max of 4,294,967,296 combinations and view models can have 256.
http://developer.valvesoftware.com/wiki/Body_Groups
I could of read wrong though

Also, can you post the .qc in [noparse]




[/noparse] tags.


$modelname "player\gangwarscharacters\gangwarscharacters.mdl"
$model "gwc_ref" "gwc_ref.smd"
$poseparameter move_yaw -180.00 180.00 360.00
$poseparameter body_pitch -90.00 90.00 360.00
$poseparameter body_yaw -90.00 90.00 360.00
$cdmaterials "models\player\gangwarscharacters\"
$bodygroup top
{
	studio "top_starter.smd"
	studio "top_gangster.smd"
	studio "top_riot.smd"
	studio "top_scout.smd"
	studio "top_tactical.smd"
	studio "top_commander.smd"
	studio "top_tit.smd"
}
$bodygroup bottom
{
	studio "bottom_starter.smd"
	studio "bottom_gangster.smd"
	studio "bottom_riot.smd"
	studio "bottom_scout.smd"
	studio "bottom_tactical.smd"
	studio "bottom_commander.smd"
	studio "bottom_titan.smd"
}
$bodygroup headgear
{
	blank
	studio "headgear_gangster.smd"
	studio "headgear_riot.smd"
	studio "headgear_scout.smd"
	studio "headgear_tactical.smd"
	studio "headgear_cmd.smd"
	studio "headgear_titan.smd"
}
$bodygroup shoes
{
	studio "shoes_starter.smd"
	studio "shoes_gangster.smd"
	studio "shoes_riot.smd"
	studio "shoes_scout.smd"
	studio "shoes_tactical.smd"
	studio "shoes_commander.smd"
	studio "shoes_titan.smd"
}
$attachment "forward" "ValveBiped.forward" -0.00 -0.00 -0.00 rotate 0.00 -0.00 -0.00
$attachment "grenade0" "ValveBiped.Bip01_Pelvis" 7.45 4.24 -3.33 rotate -13.05 173.19 92.40
$attachment "grenade1" "ValveBiped.Bip01_Pelvis" 2.13 4.48 -6.15 rotate -81.11 178.93 91.12
$attachment "grenade2" "ValveBiped.Bip01_Pelvis" -7.50 3.33 2.16 rotate 22.39 2.47 -86.84
$attachment "grenade3" "ValveBiped.Bip01_Pelvis" -7.89 4.44 -4.03 rotate -33.13 -2.70 -87.60
$attachment "pistol" "ValveBiped.Bip01_R_Thigh" -0.93 3.33 -7.00 rotate 1.00 -2.00 80.00
$attachment "primary" "ValveBiped.Bip01_Spine2" 1.00 -12.80 -2.00 rotate 0.00 -0.00 -0.00
$attachment "eholster" "ValveBiped.Bip01_L_Thigh" 5.15 -0.56 5.20 rotate 3.68 -91.56 99.67
$attachment "c4" "ValveBiped.Bip01_Spine2" 13.67 -7.55 0.95 rotate -29.12 65.25 22.32
$attachment "lfoot" "ValveBiped.Bip01_L_Foot" 0.00 5.20 -0.00 rotate -0.00 0.00 0.00
$attachment "rfoot" "ValveBiped.Bip01_R_Foot" -0.00 5.20 -0.00 rotate 0.00 -0.00 0.00
$attachment "muzzle_flash" "ValveBiped.Bip01_L_Hand" 0.00 0.00 -0.00 rotate 0.00 0.00 -0.00
$includemodel "m_anm.mdl"
$includemodel "m_gst.mdl"
$includemodel "m_pst.mdl"
$includemodel "m_shd.mdl"
$includemodel "m_ss.mdl"
$includemodel "player\male_anims.mdl"
$surfaceprop "flesh"$eyeposition -0.000 -0.000 150.000
$illumposition 0.019 0.812 38.364
$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
$collisionjoints "phymodel.smd"
{

	$mass 75.0
	$inertia 10.00
	$damping 1.75
	$rotdamping 10.00
	$rootbone "valvebiped.bip01_pelvis"
	$jointmassbias "valvebiped.bip01_pelvis" 2.60

	$jointconstrain "valvebiped.bip01_spine1" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_spine1" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_spine1" z limit 0.00 0.00 0.00

	$jointmassbias "valvebiped.bip01_spine2" 3.40
	$jointconstrain "valvebiped.bip01_spine2" x limit -15.00 15.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" y limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" z limit -20.00 15.00 0.00

	$jointconstrain "valvebiped.bip01_r_clavicle" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_clavicle" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_clavicle" z limit 0.00 0.00 0.00

	$jointconstrain "valvebiped.bip01_l_clavicle" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_clavicle" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_clavicle" z limit 0.00 0.00 0.00

	$jointmassbias "valvebiped.bip01_l_upperarm" 0.80
	$jointconstrain "valvebiped.bip01_l_upperarm" x limit -40.00 40.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" y limit -91.00 20.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" z limit -80.00 23.00 0.00

	$jointmassbias "valvebiped.bip01_l_forearm" 0.60
	$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 -123.00 -3.00 0.00

	$jointmassbias "valvebiped.bip01_l_hand" 0.20
	$jointconstrain "valvebiped.bip01_l_hand" x limit -52.00 37.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" y limit -12.00 8.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" z limit -52.00 -1.00 0.00

	$jointmassbias "valvebiped.bip01_r_upperarm" 0.80
	$jointconstrain "valvebiped.bip01_r_upperarm" x limit -40.00 40.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" y limit -20.00 91.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" z limit -80.00 24.00 0.00

	$jointmassbias "valvebiped.bip01_r_forearm" 0.60
	$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" z limit -120.00 -3.00 0.00

	$jointmassbias "valvebiped.bip01_r_hand" 0.20
	$jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" y limit -8.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" z limit -52.00 -1.00 0.00

	$jointmassbias "valvebiped.bip01_r_thigh" 1.30
	$jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 33.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" z limit -79.00 24.00 0.00

	$jointmassbias "valvebiped.bip01_r_calf" 0.80
	$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" z limit -6.00 116.00 0.00

	$jointmassbias "valvebiped.bip01_l_thigh" 1.30
	$jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" y limit -8.00 33.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" z limit -79.00 24.00 0.00

	$jointmassbias "valvebiped.bip01_l_calf" 0.80
	$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" z limit -6.00 116.00 0.00

	$jointconstrain "valvebiped.bip01_head1" x limit -72.00 60.00 0.00
	$jointconstrain "valvebiped.bip01_head1" y limit -37.00 33.00 0.00
	$jointconstrain "valvebiped.bip01_head1" z limit -19.00 45.00 0.00
}


There :slight_smile:
I’m aware that a few of the names don’t match up, but they do correspond to the models, don’t worry. Just too lazy to rename them atm.