View model hands stretching and distorting.

Using: 3dsmax 2016 Student Version with Game Zombie’s 3DS Max SMD Plugin.
CROWBAR Source Engine Modding Tool version .42
Garry’s Mod Citizen hands and arms meshes from the Using Viewmodel Hands page.

What I am doing/have done:

I took the MP5 model from the Half Life 2 modification, SMOD, deleted the original view model rig but saved the weapon’s mesh. I then imported the mesh and rigged it to Gmod’s version of the CS:S MP5 animations. I have made positioning changes to the ValveBiped.Bip01_L_Hand bone in all of the animations to accommodate for the grenade launcher as seen (here). Playing the animations back in 3DS max reveals no obvious issues (to the best of my knowledge) and I have tested it along with the Gmod hands mesh to double-check the weights. I have made no changes to the weights myself.

Some pics of the weights, will take more if more info is needed;

http://i.imgur.com/6vBPlLF.png[/t]
[t]http://i.imgur.com/Xp0HK3r.png[/t]

I left the hands and arms meshes in the reference SMD temporarily so I could have CROWBAR generate the $definebones lines in a test compile. The reason for this is that I am unable to get any of the ValveBiped bones with the arms or hand meshes deleted from the reference SMD. After getting the lines I needed, I re-exported the reference SMD without the arms and hand meshes, leaving only the weapon’s mesh and then pasted the $definebones lines into my c_arms_definebones.qci file.

My .QC File:


$modelname "weapons\c_smod_mp5eod.mdl"
$bodygroup "studio"
{
    studio "c_smod_mp5eod_reference.smd"
}

$include c_arms_definebones.qci
$cdmaterials "models\weapons\mp5\"

$attachment "muzzle" "v_weapon.MP5_Parent" .11 3.75 -17.47 rotate 90 0 0
$attachment "1" "v_weapon.MP5_Parent" 1 4.5 -6 rotate 0 30 0

$sequence "idle" "c_smod_mp5eod_anims\idle.smd" {
    fps 12
    activity "ACT_VM_IDLE" 1
    loop
    snap
}

$sequence "shoot1" "c_smod_mp5eod_anims\shoot1.smd" {
    fps 30
    activity "ACT_VM_PRIMARYATTACK" 1
    snap
    { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
    { event AE_CLIENT_EFFECT_ATTACH 0 "EjectBrass_9mm 2 90" }
}

$sequence "shoot2" "c_smod_mp5eod_anims\shoot2.smd" {
    fps 30
    activity "ACT_VM_PRIMARYATTACK" 1
    snap
    { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
    { event AE_CLIENT_EFFECT_ATTACH 0 "EjectBrass_9mm 2 90" }
}

$sequence "shoot3" "c_smod_mp5eod_anims\shoot3.smd" {
    fps 30
    activity "ACT_VM_PRIMARYATTACK" 1
    snap
    { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
    { event AE_CLIENT_EFFECT_ATTACH 0 "EjectBrass_9mm 2 90" }
}

$sequence "draw" "c_smod_mp5eod_anims\draw.smd" {
    fps 35
    activity "ACT_VM_DRAW" 1
    snap
    { event 5004 11 "Weapon_AK47.BoltPull" }
}

$sequence "reload1" "c_smod_mp5eod_anims\reload1.smd" {
    fps 38
    activity "ACT_VM_RELOAD" 1
    snap
    { event 5004 15 "Weapon_MP5.Clipout" }
    { event 5004 46 "Weapon_MP5.Clipin" }
    { event 5004 77 "Weapon_MP5.SlideBack" }
}

c_arms_definebones.QCI File:


$illumposition 0 0 0

$definebone "ValveBiped.Bip01_Spine4" "" 1.000000 0.335938 -9.140625  -79.749781 -90.000673 -89.999122 0.000000 0.000000 0.000000 -0.000000  -0.000000 -0.000000
$definebone "ValveBiped.Bip01_R_Clavicle" "ValveBiped.Bip01_Spine4"  2.033352 1.000772 -1.937610 9.911708 -116.788286 -7.344057 0.000000  0.000000 0.000000 -0.000001 -0.000000 0.000000
$definebone "ValveBiped.Bip01_R_UpperArm" "ValveBiped.Bip01_R_Clavicle"  6.028147 0.000000 0.000000 57.028020 -127.664365 -32.648571 0.000000  0.000000 0.000000 -0.000003 -0.000007 -0.000002
$definebone "ValveBiped.Bip01_R_Forearm" "ValveBiped.Bip01_R_UpperArm"  11.692557 -0.000003 0.000007 -2.239917 -82.094626 1.955627 0.000000  0.000000 -0.000000 -0.000000 0.000005 0.000005
$definebone "v_weapon.MP5_Parent" "" -5.157886 -13.330606 -8.648887  -0.001757 -179.998231 90.001855 -0.000000 0.000000 0.000000 -0.000000  0.000000 -0.000000
$definebone "ValveBiped.Bip01_L_Clavicle" "ValveBiped.Bip01_Spine4"  2.033349 1.000767 1.937660 -9.280241 96.256716 177.569102 0.000000  0.000000 0.000000 -0.000001 0.000001 0.000000
$definebone "ValveBiped.Bip01_L_UpperArm" "ValveBiped.Bip01_L_Clavicle"  6.028144 0.000000 0.000000 -10.492465 -10.584298 -154.141689 0.000001  0.000000 0.000000 -0.000001 -0.000003 0.000003
$definebone "ValveBiped.Bip01_L_Forearm" "ValveBiped.Bip01_L_UpperArm"  11.692565 0.000002 0.000000 19.411536 -65.054308 -0.020738 0.000000  0.000000 0.000000 0.000005 0.000004 0.000004
$definebone "ValveBiped.Bip01_L_Hand" "ValveBiped.Bip01_L_Forearm"  11.481681 0.000000 -0.000032 17.728287 27.571934 -6.515998 0.000000  0.000000 0.000000 -0.000002 -0.000009 0.000003
$definebone "ValveBiped.Bip01_L_Finger4" "ValveBiped.Bip01_L_Hand"  3.277658 0.002130 -1.383391 -11.357452 -85.321365 5.713890 -0.000000  0.000000 0.000000 -0.000001 0.000009 0.000000
$definebone "ValveBiped.Bip01_L_Finger41" "ValveBiped.Bip01_L_Finger4"  1.328184 -0.000004 0.000003 -1.569033 -35.665725 0.000000 0.000002  0.000000 0.000000 -0.000000 -0.000004 0.000003
$definebone "ValveBiped.Bip01_L_Finger42" "ValveBiped.Bip01_L_Finger41"  0.819208 -0.000002 -0.000003 0.000010 -29.996648 0.000003 -0.000002  0.000000 0.000000 0.000002 -0.000017 0.000005
$definebone "ValveBiped.Bip01_R_Hand" "ValveBiped.Bip01_R_Forearm"  11.481708 0.000006 0.000000 0.835201 33.800797 -34.891346 0.000000  0.000000 -0.000001 0.000001 -0.000005 -0.000004
$definebone "ValveBiped.Bip01_R_Finger0" "ValveBiped.Bip01_R_Hand"  0.075527 -0.738754 -0.755817 30.561053 -31.983454 69.339576 0.000000  0.000000 0.000000 0.000005 0.000003 0.000009
$definebone "ValveBiped.Bip01_R_Finger01" "ValveBiped.Bip01_R_Finger0"  2.512462 0.000002 -0.000003 0.000012 20.578522 -0.000003 0.000000  0.000000 -0.000000 -0.000002 0.000000 0.000008
$definebone "ValveBiped.Bip01_R_Finger02" "ValveBiped.Bip01_R_Finger01"  1.156219 0.667992 0.000000 -6.736889 81.763526 -4.717376 0.000000  -0.000001 -0.000000 -0.000007 -0.000002 0.000003
$definebone "ValveBiped.Bip01_R_Finger1" "ValveBiped.Bip01_R_Hand"  3.445765 0.058099 -1.085179 -2.101150 -22.477687 2.886501 0.000000  -0.000001 0.000000 0.000000 0.000005 -0.000003
$definebone "ValveBiped.Bip01_R_Finger11" "ValveBiped.Bip01_R_Finger1"  1.707033 -0.000002 0.000001 -1.493186 -39.476609 0.000512 -0.000000  0.000000 0.000000 -0.000002 0.000010 -0.000002
$definebone "ValveBiped.Bip01_R_Finger12" "ValveBiped.Bip01_R_Finger11"  0.999023 0.000011 -0.000001 -0.776360 -33.981950 0.321998 0.000000  0.000000 0.000000 -0.000003 0.000006 -0.000001
$definebone "ValveBiped.Bip01_R_Finger2" "ValveBiped.Bip01_R_Hand"  3.551621 0.027803 -0.200564 -13.835733 -68.418641 -0.521853 0.000000  0.000000 0.000000 -0.000003 0.000010 -0.000004
$definebone "ValveBiped.Bip01_R_Finger21" "ValveBiped.Bip01_R_Finger2"  1.668795 0.000004 -0.000003 10.696656 -54.696418 -0.000002 -0.000001  0.000000 0.000000 -0.000004 -0.000010 -0.000002
$definebone "ValveBiped.Bip01_R_Finger22" "ValveBiped.Bip01_R_Finger21"  1.240437 0.000006 -0.000002 -0.000178 -81.995643 0.000008 -0.000001  0.000000 0.000000 -0.000002 0.000002 0.000003
$definebone "ValveBiped.Bip01_R_Finger3" "ValveBiped.Bip01_R_Hand"  3.364163 0.007359 0.622457 -10.065671 -83.529670 1.643584 0.000000  0.000000 0.000000 -0.000005 0.000007 -0.000003
$definebone "ValveBiped.Bip01_R_Finger31" "ValveBiped.Bip01_R_Finger3"  1.610352 0.000006 -0.000003 9.092092 -41.597229 -0.000403 -0.000001  -0.000001 0.000001 -0.000004 -0.000007 -0.000000
$definebone "ValveBiped.Bip01_R_Finger32" "ValveBiped.Bip01_R_Finger31"  1.020535 0.000007 0.000000 -0.804783 -76.993028 0.876859 0.000000  -0.000000 0.000000 -0.000001 0.000004 0.000004
$definebone "ValveBiped.Bip01_R_Finger4" "ValveBiped.Bip01_R_Hand"  2.910433 -0.019286 1.404055 -11.856737 -75.909685 -0.301551 0.000000  0.000000 0.000000 -0.000005 0.000005 -0.000004
$definebone "ValveBiped.Bip01_R_Finger41" "ValveBiped.Bip01_R_Finger4"  1.285214 -0.000004 0.000001 8.583305 -30.046795 -0.000003 0.000000  -0.000001 -0.000001 -0.000003 -0.000001 -0.000001
$definebone "ValveBiped.Bip01_R_Finger42" "ValveBiped.Bip01_R_Finger41"  0.842649 0.000001 -0.000001 3.028191 -66.604119 -4.156410 -0.000002  0.000000 -0.000001 -0.000001 -0.000010 0.000001
$definebone "ValveBiped.Bip01_L_Finger0" "ValveBiped.Bip01_L_Hand"  0.294317 -0.638000 0.426700 -54.392830 -7.069934 -72.032993 0.000000  0.000000 0.000001 0.000003 -0.000001 -0.000017
$definebone "ValveBiped.Bip01_L_Finger01" "ValveBiped.Bip01_L_Finger0"  2.637468 -0.000005 0.000003 -3.498597 22.943697 0.466938 0.000000  0.000000 0.000001 0.000009 -0.000002 -0.000014
$definebone "ValveBiped.Bip01_L_Finger02" "ValveBiped.Bip01_L_Finger01"  1.308573 0.000001 0.000001 -0.971625 -11.839200 0.245783 0.000000  0.000000 -0.000001 0.000007 -0.000004 -0.000015
$definebone "ValveBiped.Bip01_L_Finger1" "ValveBiped.Bip01_L_Hand"  3.590328 0.299562 1.109802 -19.433408 -46.414432 -3.450685 0.000000  -0.000002 0.000000 -0.000002 0.000010 0.000000
$definebone "ValveBiped.Bip01_L_Finger11" "ValveBiped.Bip01_L_Finger1"  1.723331 0.000008 -0.000004 0.000643 -66.897141 0.000010 0.000000  0.000000 -0.000001 -0.000000 -0.000005 0.000002
$definebone "ValveBiped.Bip01_L_Finger12" "ValveBiped.Bip01_L_Finger11"  1.005909 0.000000 0.000003 0.000414 4.874648 0.000015 0.000001 0.000000  0.000000 -0.000000 -0.000004 0.000003
$definebone "ValveBiped.Bip01_L_Finger2" "ValveBiped.Bip01_L_Hand"  3.782127 0.203238 0.243937 -6.308718 -74.586152 -1.405112 0.000000  0.000000 -0.000001 -0.000000 0.000012 -0.000002
$definebone "ValveBiped.Bip01_L_Finger21" "ValveBiped.Bip01_L_Finger2"  1.684413 -0.000004 -0.000003 0.408074 -39.398144 -0.000003 0.000000  0.000002 0.000001 -0.000000 -0.000004 -0.000003
$definebone "ValveBiped.Bip01_L_Finger22" "ValveBiped.Bip01_L_Finger21"  1.256056 0.000002 -0.000003 0.000236 -30.497761 -0.000007 0.000000  0.000000 0.000000 -0.000005 -0.000010 -0.000003
$definebone "ValveBiped.Bip01_L_Finger3" "ValveBiped.Bip01_L_Hand"  3.707952 0.109266 -0.572074 -7.985704 -88.719309 2.038987 0.000000  0.000000 -0.000001 0.000001 0.000009 -0.000002
$definebone "ValveBiped.Bip01_L_Finger31" "ValveBiped.Bip01_L_Finger3"  1.609411 0.000000 0.000002 0.302128 -24.490347 -0.000007 -0.000002  0.000002 0.000001 0.000000 -0.000000 -0.000003
$definebone "ValveBiped.Bip01_L_Finger32" "ValveBiped.Bip01_L_Finger31"  0.989290 0.000000 -0.000004 0.129767 -26.016423 0.085125 0.000000  0.000000 0.000000 -0.000003 -0.000010 -0.000003
$definebone "ValveBiped.Bip01_R_Wrist" "ValveBiped.Bip01_R_Forearm"  11.481712 0.000005 -0.000004 0.000005 0.000017 0.008598 -0.000000  0.000000 0.000000 -0.000001 0.000005 0.000002
$definebone "v_weapon.MP5_Clip" "v_weapon.MP5_Parent" 0.025027 2.047008  -7.394217 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000  -0.000000 0.000000 -0.000000
$definebone "v_weapon.MP5_Bolt" "v_weapon.MP5_Parent" 0.025027 5.079061  -12.500195 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000  -0.000000 0.000000 -0.000000
$definebone "v_weapon.MP5_ClipRelease" "v_weapon.MP5_Parent" 0.025028  1.322999 -6.435020 -0.000000 0.000000 0.000000 0.000000 0.000000  0.000000 -0.000000 0.000000 -0.000000
$definebone "v_weapon.MP5_Trigger" "v_weapon.MP5_Parent" 0.028154  1.446290 -3.792973 -0.000000 0.000000 0.000000 0.000000 -0.000000  0.000000 -0.000000 0.000000 -0.000000
$definebone "ValveBiped.Bip01_L_Ulna" "ValveBiped.Bip01_L_Forearm"  5.740853 0.000004 -0.000005 0.000010 0.000018 0.039430 0.000000 0.000002  -0.000000 0.000005 0.000003 0.000004
$definebone "ValveBiped.Bip01_L_Wrist" "ValveBiped.Bip01_L_Forearm"  11.481705 0.000002 -0.000002 0.000010 0.000018 -4.309948 0.000001  0.000002 0.000000 0.000003 0.000004 0.000003
$definebone "ValveBiped.Bip01_R_Ulna" "ValveBiped.Bip01_R_Forearm"  5.740861 0.000003 -0.000007 0.000005 0.000017 0.004643 0.000000  -0.000001 -0.000000 0.000001 0.000005 0.000005

$bonemerge "ValveBiped.Bip01_Spine4"
$bonemerge "ValveBiped.Bip01_R_Clavicle"
$bonemerge "ValveBiped.Bip01_R_UpperArm"
$bonemerge "ValveBiped.Bip01_R_Forearm"
$bonemerge "ValveBiped.Bip01_R_Hand"
$bonemerge "ValveBiped.Bip01_Neck1"
$bonemerge "ValveBiped.Bip01_Head1"
$bonemerge "ValveBiped.Bip01_L_Clavicle"
$bonemerge "ValveBiped.Bip01_L_UpperArm"
$bonemerge "ValveBiped.Bip01_L_Forearm"
$bonemerge "ValveBiped.Bip01_L_Hand"
$bonemerge "ValveBiped.Bip01_L_Finger4"
$bonemerge "ValveBiped.Bip01_L_Finger41"
$bonemerge "ValveBiped.Bip01_L_Finger42"
$bonemerge "ValveBiped.Bip01_L_Finger3"
$bonemerge "ValveBiped.Bip01_L_Finger31"
$bonemerge "ValveBiped.Bip01_L_Finger32"
$bonemerge "ValveBiped.Bip01_L_Finger2"
$bonemerge "ValveBiped.Bip01_L_Finger21"
$bonemerge "ValveBiped.Bip01_L_Finger22"
$bonemerge "ValveBiped.Bip01_L_Finger1"
$bonemerge "ValveBiped.Bip01_L_Finger11"
$bonemerge "ValveBiped.Bip01_L_Finger12"
$bonemerge "ValveBiped.Bip01_L_Finger0"
$bonemerge "ValveBiped.Bip01_L_Finger01"
$bonemerge "ValveBiped.Bip01_L_Finger02"
$bonemerge "ValveBiped.Bip01_R_Finger4"
$bonemerge "ValveBiped.Bip01_R_Finger41"
$bonemerge "ValveBiped.Bip01_R_Finger42"
$bonemerge "ValveBiped.Bip01_R_Finger3"
$bonemerge "ValveBiped.Bip01_R_Finger31"
$bonemerge "ValveBiped.Bip01_R_Finger32"
$bonemerge "ValveBiped.Bip01_R_Finger2"
$bonemerge "ValveBiped.Bip01_R_Finger21"
$bonemerge "ValveBiped.Bip01_R_Finger22"
$bonemerge "ValveBiped.Bip01_R_Finger1"
$bonemerge "ValveBiped.Bip01_R_Finger11"
$bonemerge "ValveBiped.Bip01_R_Finger12"
$bonemerge "ValveBiped.Bip01_R_Finger0"
$bonemerge "ValveBiped.Bip01_R_Finger01"
$bonemerge "ValveBiped.Bip01_R_Finger02"

The issue:

Upon compiling the model, the weapon mesh is rigged properly, however, the Gmod arms mesh stretches and distorts to infinity and beyond;
[t]http://i.imgur.com/rNlDirV.jpg

I appear to have reached a dead end and every other method I have tried gives me the same result shown in the in-game screenshot. Any help I can get to solve this issue is greatly appreciated. If needed, I will post the source files.

Remove ulna and wrist bones from your definebones list

Wow, that did the trick. Thank you very much! :cool:

Mods, feel free to lock this thread.