Custom playermodel - legs twisted from thighs down
25 replies, posted
I made a model from scratch, so it's all done by me.
Imported a standard skeleton, male_07_reference.smd.
Got a qc file, to which I had to apply the proportions trick, otherwise my bones would stretch to match the standard bones and the model would look entirely wrong.
After a lot of trouble the model almost works, except the legs are completely twisted, see screenshot from HLMV
https://files.facepunch.com/forum/upload/170489/50ce01db-55e4-4956-accb-2437a0fd0000/image.png
Ignore the arms, they have some wonky rigging going on. The missing textures are only a problem in HLMV, not in-game.
After some digging I found people claiming the problem to be caused by $ikchain, but commenting these out, after compiling, crashes the model viewer.
Here is the qc file I'm using:
// Created by Crowbar 0.54
$modelname "Tored.mdl"
$bodygroup "Tored"
{
studio "Tored.smd"
}
$surfaceprop "flesh"
$contents "solid"
$illumposition -0.412 13.667 32.004
$eyeposition 0 0 72
$mostlyopaque
$cdmaterials "models\player\tored\"
$attachment "eyes" "ValveBiped.Bip01_Head1" 3.34 -5.28 0 rotate 0 -80.1 -90
$attachment "Center" "ValveBiped.Bip01_Spine1" -6.2 2.09 0 rotate 0 96.62 90
$attachment "Chest" "ValveBiped.Bip01_Spine4" -2.7 3.88 0 rotate 0 79.75 90
$attachment "LHand" "ValveBiped.Bip01_L_Hand" 3 0 0 rotate 0 0 0
$attachment "RHand" "ValveBiped.Bip01_R_Hand" 3 0 0 rotate 0 0 0
$attachment "zipline" "ValveBiped.Bip01_Spine4" 2 -2 0 rotate 0 -17 0
$attachment "manhack" "ValveBiped.Bip01_Spine" 18 -6 3 rotate -25 50 0
$attachment "forward" "ValveBiped.forward" 0 0 0 rotate 0 0 0
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" 0 0 0 rotate -90 -90 0
$attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" 0 0 0 rotate -90 -90 0
$attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" 0 0 0 rotate -90 -90 0
$cbox 0 0 0 0 0 0
$bbox -37.008 -44.944 -9.855 9.675 44.121 73.863
$hboxset "default"
$hbox 1 "ValveBiped.Bip01_Head1" -3.5 -7.71 -3.85 7.5 5.71 3.96 ""
$hbox 4 "ValveBiped.Bip01_L_UpperArm" 0 -3.37 -3.7 12.51 3.4 2.41 ""
$hbox 4 "ValveBiped.Bip01_L_Forearm" -0.9 -3.49 -3.17 9.49 3.1 2.41 ""
$hbox 4 "ValveBiped.Bip01_L_Hand" -1.11 -1.89 -2.38 5.72 1.46 2.34 ""
$hbox 5 "ValveBiped.Bip01_R_UpperArm" 0 -3.37 -2.37 12.39 3.41 3.8 ""
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.99 -3.5 -2.37 9.33 3.1 3.27 ""
$hbox 5 "ValveBiped.Bip01_R_Hand" -1.19 -1.86 -2.33 5.31 1.94 2.61 ""
$hbox 6 "ValveBiped.Bip01_L_Thigh" 0 -6 -3.55 17.85 4 4.45 ""
$hbox 6 "ValveBiped.Bip01_L_Calf" 0 -3.51 -3.28 15.64 3.49 2.72 ""
$hbox 6 "ValveBiped.Bip01_L_Foot" -1.07 -2 -2.84 5.04 5 2.16 ""
$hbox 6 "ValveBiped.Bip01_L_Toe0" -0.5 -3 -2.19 2.5 0 2.46 ""
$hbox 7 "ValveBiped.Bip01_R_Thigh" 0 -6 -4.55 17.85 4 3.4 ""
$hbox 7 "ValveBiped.Bip01_R_Calf" 0 -3.51 -2.82 15.64 3.49 3.18 ""
$hbox 7 "ValveBiped.Bip01_R_Foot" -1.06 -2.01 -2.28 5.05 4.99 2.72 ""
$hbox 7 "ValveBiped.Bip01_R_Toe0" -0.5 -3 -2.6 2.5 0 2.1 ""
$hbox 3 "ValveBiped.Bip01_Pelvis" -7.5 -6 -6 7.5 6 6 ""
$hbox 2 "ValveBiped.Bip01_Spine2" -6.5 -2.5 -7 10.5 7.5 7 ""
//$definebone "ValveBiped.Bip01_Pelvis" "" -0.000005 -0.533615 33.090244 0 0 89.999983 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_Spine" "ValveBiped.Bip01_Pelvis" 0.000005 4.901421 -2.981899 4.944339 89.999983 89.999983 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_Spine1" "ValveBiped.Bip01_Spine" 4.018326 0.000005 -0.000001 0 -1.675157 0 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_Spine2" "ValveBiped.Bip01_Spine1" 3.518543 -0.000016 -0.000002 -0.000229 5.749001 0 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_Spine4" "ValveBiped.Bip01_Spine2" 2.793209 -0.093494 -0.000008 0.000229 11.120709 0 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_Neck1" "ValveBiped.Bip01_Spine4" 3.307243 -0.000011 0.000001 0 22.94524 179.999856 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_Head1" "ValveBiped.Bip01_Neck1" 3.593716 -0.000002 0 -0.000057 23.295262 0 0 0 0 0 0 0
//$definebone "ValveBiped.forward" "ValveBiped.Bip01_Head1" 2.00008 -2.999982 0.000001 -0.000057 -75.9997 -89.999983 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Clavicle" "ValveBiped.Bip01_Spine4" 0.998329 1.187938 -2.792172 73.712263 168.618548 -95.596783 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_UpperArm" "ValveBiped.Bip01_R_Clavicle" 6.481502 -0.189117 -0.012402 0.12668 8.740818 92.600284 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Forearm" "ValveBiped.Bip01_R_UpperArm" 8.851007 0 0 6.149574 -1.604096 2.083774 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Hand" "ValveBiped.Bip01_R_Forearm" 9.988197 0 0 6.834243 4.742083 -90.203789 0 0 0 0 0 0
//$definebone "ValveBiped.Anim_Attachment_RH" "ValveBiped.Bip01_R_Hand" 4.013849 -2.568489 -0.009468 0.101815 40.999375 -89.910487 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger4" "ValveBiped.Bip01_R_Hand" 6.823477 -0.296181 1.493281 -30.389742 -63.09847 31.735446 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger41" "ValveBiped.Bip01_R_Finger4" 1.455795 0.404598 -1.252123 -4.160191 -22.426885 -10.185299 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger42" "ValveBiped.Bip01_R_Finger41" 0.949162 0.135742 -0.550124 0.128456 -12.649306 -6.073807 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger3" "ValveBiped.Bip01_R_Hand" 7.529219 0.143314 -0.018774 -13.57612 -47.85734 9.009474 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger31" "ValveBiped.Bip01_R_Finger3" 2.203341 -0.052471 -0.651761 -1.581767 -13.957767 -2.256935 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger32" "ValveBiped.Bip01_R_Finger31" 1.749645 -0.013931 -0.385611 -1.782473 -24.202082 -4.244985 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger2" "ValveBiped.Bip01_R_Hand" 6.748819 0.261017 -1.266892 2.063221 -33.972958 -4.998772 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger21" "ValveBiped.Bip01_R_Finger2" 2.577143 0.017658 -0.108513 -1.399105 -20.990138 1.24538 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger22" "ValveBiped.Bip01_R_Finger21" 1.805387 0.007683 -0.101667 -1.140301 -12.398175 0.494577 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger1" "ValveBiped.Bip01_R_Hand" 6.350142 -0.131687 -2.618901 18.328804 -36.679038 -21.498123 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger11" "ValveBiped.Bip01_R_Finger1" 2.219522 -0.082096 0.434525 -0.176986 -19.970218 5.998527 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger12" "ValveBiped.Bip01_R_Finger11" 1.479345 0.050961 0.114825 -1.632298 -13.568736 3.885173 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger0" "ValveBiped.Bip01_R_Hand" 2.523516 -1.649311 -2.759382 18.818508 -82.622176 50.281517 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger01" "ValveBiped.Bip01_R_Finger0" 1.039417 -0.15801 -2.072006 -6.464566 9.521642 8.01499 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Finger02" "ValveBiped.Bip01_R_Finger01" 0.530746 0.15613 -2.213699 -6.406585 13.875381 14.136074 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Clavicle" "ValveBiped.Bip01_Spine4" 0.810135 1.221951 2.885589 -73.711573 168.617797 91.481751 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_UpperArm" "ValveBiped.Bip01_L_Clavicle" 6.318717 -0.470612 0.0016 -0.676206 11.665424 -88.411984 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Forearm" "ValveBiped.Bip01_L_UpperArm" 9.004353 0 -0.000004 -5.321146 -2.105886 -2.202739 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Hand" "ValveBiped.Bip01_L_Forearm" 10.238085 0 0 -7.434263 4.711926 90.732445 0 0 0 0 0 0
//$definebone "ValveBiped.Anim_Attachment_LH" "ValveBiped.Bip01_L_Hand" 4.013824 -2.568447 -0.02204 -0.247748 -141.668001 89.80535 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger4" "ValveBiped.Bip01_L_Hand" 6.735329 -0.347542 -1.501467 31.300462 -64.114037 -32.507616 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger41" "ValveBiped.Bip01_L_Finger4" 1.201363 -0.064697 0.777983 4.211532 -22.172317 10.682341 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger42" "ValveBiped.Bip01_L_Finger41" 1.511009 0.239952 0.821278 -0.22889 -12.515916 6.369629 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger3" "ValveBiped.Bip01_L_Hand" 7.05431 -0.238602 -0.038866 13.806165 -48.00705 -9.35606 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger31" "ValveBiped.Bip01_L_Finger3" 2.108416 -0.249802 0.495795 1.580624 -13.947174 2.324488 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger32" "ValveBiped.Bip01_L_Finger31" 1.378677 0.121525 0.372606 1.727127 -24.180893 4.387422 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger2" "ValveBiped.Bip01_L_Hand" 6.732319 -0.196217 1.176252 -2.549949 -34.02275 4.750392 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger21" "ValveBiped.Bip01_L_Finger2" 2.544079 -0.492031 0.136166 1.319979 -20.982352 -1.460127 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger22" "ValveBiped.Bip01_L_Finger21" 1.668118 0.069603 0.108352 1.116293 -12.398872 -0.601492 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger1" "ValveBiped.Bip01_L_Hand" 6.553692 -0.311703 2.580112 -19.539066 -37.135056 21.421861 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger11" "ValveBiped.Bip01_L_Finger1" 2.368065 -0.828518 -0.295412 0.03134 -19.807781 -6.484446 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger12" "ValveBiped.Bip01_L_Finger11" 1.385324 -0.067429 -0.14618 1.626052 -13.487371 -4.200866 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger0" "ValveBiped.Bip01_L_Hand" 1.120174 -1.60289 2.81859 -17.73253 -84.07297 -50.089053 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger01" "ValveBiped.Bip01_L_Finger0" 1.027966 0.154255 2.094009 6.787778 9.123431 -8.404084 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Finger02" "ValveBiped.Bip01_L_Finger01" 0.786194 0.567021 1.860928 6.666426 13.138321 -14.775776 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Thigh" "ValveBiped.Bip01_Pelvis" -5.151611 0.000015 0.000007 2.970099 -90.29935 -89.999873 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Calf" "ValveBiped.Bip01_R_Thigh" 12.378906 0.283889 -0.028618 0 1.958771 -0.000115 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Foot" "ValveBiped.Bip01_R_Calf" 16.52523 0.000012 0.000005 2.336464 -61.4 2.212305 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_R_Toe0" "ValveBiped.Bip01_R_Foot" 8.409504 -3.444246 0.184914 -0.169137 -33.482513 -4.65998 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Thigh" "ValveBiped.Bip01_Pelvis" 5.423493 0.000008 -0.000003 2.970099 -89.700793 -89.999928 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Calf" "ValveBiped.Bip01_L_Thigh" 12.378918 0.283785 0.028598 0 1.95923 -0.000344 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Foot" "ValveBiped.Bip01_L_Calf" 16.525234 0.000076 -0.000001 -2.336408 -61.40017 -1.599297 0 0 0 0 0 0
//$definebone "ValveBiped.Bip01_L_Toe0" "ValveBiped.Bip01_L_Foot" 8.409488 -3.446045 -0.148061 -0.169137 -33.481765 -0.418316 0 0 0 0 0 0
//$definebone "jiggle_base" "ValveBiped.Bip01_Pelvis" 0 0.237263 0 0 0 -93.576789 0 0 0 0 0 0
$ikchain "rhand" "ValveBiped.Bip01_R_Hand" knee 0.707 0.707 0
$ikchain "lhand" "ValveBiped.Bip01_L_Hand" knee 0.707 0.707 0
$ikchain "rfoot" "ValveBiped.Bip01_R_Foot" knee 0.707 -0.707 0
$ikchain "lfoot" "ValveBiped.Bip01_L_Foot" knee 0.707 -0.707 0
$sequence reference "anims/reference.smd" fps 1
$animation a_proportions "anims/a_proportions.smd" subtract reference 0
$sequence proportions a_proportions predelta autoplay
$sequence "ragdoll" "ragdoll.smd" {
fps 30
"ACT_DIERAGDOLL" 1
}
$includemodel "m_anm.mdl"
$collisionjoints "tored_reference_physics.smd"
{
$mass 100
$inertia 10
$damping 0.05
$rotdamping 5
$rootbone "valvebiped.bip01_pelvis"
$jointrotdamping "ValveBiped.Bip01_Pelvis" 3
$jointmassbias "ValveBiped.Bip01_L_Thigh" 7
$jointrotdamping "ValveBiped.Bip01_L_Thigh" 7
$jointconstrain "ValveBiped.Bip01_L_Thigh" x limit -25 25 0
$jointconstrain "ValveBiped.Bip01_L_Thigh" y limit -10 15 0
$jointconstrain "ValveBiped.Bip01_L_Thigh" z limit -55 25 0
$jointmassbias "ValveBiped.Bip01_L_Calf" 4
$jointconstrain "ValveBiped.Bip01_L_Calf" x limit -10 25 0
$jointconstrain "ValveBiped.Bip01_L_Calf" y limit -5 5 0
$jointconstrain "ValveBiped.Bip01_L_Calf" z limit -10 115 0
$jointrotdamping "ValveBiped.Bip01_L_Foot" 2
$jointconstrain "ValveBiped.Bip01_L_Foot" x limit -20 30 0
$jointconstrain "ValveBiped.Bip01_L_Foot" y limit -30 20 0
$jointconstrain "ValveBiped.Bip01_L_Foot" z limit -30 50 0
$jointmassbias "ValveBiped.Bip01_R_Thigh" 7
$jointrotdamping "ValveBiped.Bip01_R_Thigh" 7
$jointconstrain "ValveBiped.Bip01_R_Thigh" x limit -25 25 0
$jointconstrain "ValveBiped.Bip01_R_Thigh" y limit -10 15 0
$jointconstrain "ValveBiped.Bip01_R_Thigh" z limit -55 25 0
$jointmassbias "ValveBiped.Bip01_R_Calf" 4
$jointconstrain "ValveBiped.Bip01_R_Calf" x limit -10 25 0
$jointconstrain "ValveBiped.Bip01_R_Calf" y limit -5 5 0
$jointconstrain "ValveBiped.Bip01_R_Calf" z limit -10 115 0
$jointrotdamping "ValveBiped.Bip01_R_Foot" 2
$jointconstrain "ValveBiped.Bip01_R_Foot" x limit -20 30 0
$jointconstrain "ValveBiped.Bip01_R_Foot" y limit -30 20 0
$jointconstrain "ValveBiped.Bip01_R_Foot" z limit -30 50 0
$jointconstrain "ValveBiped.Bip01_R_Toe0" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Toe0" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Toe0" z limit 0 0 0
$jointmassbias "ValveBiped.Bip01_Spine1" 8
$jointconstrain "ValveBiped.Bip01_Spine1" x limit -10 10 0
$jointconstrain "ValveBiped.Bip01_Spine1" y limit -16 16 0
$jointconstrain "ValveBiped.Bip01_Spine1" z limit -20 30 0
$jointmassbias "ValveBiped.Bip01_Spine2" 9
$jointconstrain "ValveBiped.Bip01_Spine2" x limit -10 10 0
$jointconstrain "ValveBiped.Bip01_Spine2" y limit -10 10 0
$jointconstrain "ValveBiped.Bip01_Spine2" z limit -20 20 0
$jointconstrain "ValveBiped.Bip01_Spine4" x limit -15 15 0
$jointconstrain "ValveBiped.Bip01_Spine4" y limit -10 10 0
$jointconstrain "ValveBiped.Bip01_Spine4" z limit 0 45 0
$jointmassbias "ValveBiped.Bip01_L_UpperArm" 5
$jointrotdamping "ValveBiped.Bip01_L_UpperArm" 2
$jointconstrain "ValveBiped.Bip01_L_UpperArm" x limit -15 20 0
$jointconstrain "ValveBiped.Bip01_L_UpperArm" y limit -40 32 0
$jointconstrain "ValveBiped.Bip01_L_UpperArm" z limit -80 25 0
$jointmassbias "ValveBiped.Bip01_L_Forearm" 4
$jointrotdamping "ValveBiped.Bip01_L_Forearm" 4
$jointconstrain "ValveBiped.Bip01_L_Forearm" x limit -40 15 0
$jointconstrain "ValveBiped.Bip01_L_Forearm" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Forearm" z limit -120 10 0
$jointrotdamping "ValveBiped.Bip01_L_Hand" 1
$jointconstrain "ValveBiped.Bip01_L_Hand" x limit -25 25 0
$jointconstrain "ValveBiped.Bip01_L_Hand" y limit -35 35 0
$jointconstrain "ValveBiped.Bip01_L_Hand" z limit -50 50 0
$jointconstrain "ValveBiped.Bip01_L_Finger2" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger2" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger2" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger31" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger31" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger31" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger4" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger4" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger4" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger0" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger0" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger0" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger21" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger21" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger21" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger1" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger1" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger1" z limit 0 0 0
$jointmassbias "ValveBiped.Bip01_R_UpperArm" 5
$jointrotdamping "ValveBiped.Bip01_R_UpperArm" 2
$jointconstrain "ValveBiped.Bip01_R_UpperArm" x limit -15 20 0
$jointconstrain "ValveBiped.Bip01_R_UpperArm" y limit -40 32 0
$jointconstrain "ValveBiped.Bip01_R_UpperArm" z limit -80 25 0
$jointmassbias "ValveBiped.Bip01_R_Forearm" 4
$jointrotdamping "ValveBiped.Bip01_R_Forearm" 4
$jointconstrain "ValveBiped.Bip01_R_Forearm" x limit -40 15 0
$jointconstrain "ValveBiped.Bip01_R_Forearm" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Forearm" z limit -120 10 0
$jointrotdamping "ValveBiped.Bip01_R_Hand" 1
$jointconstrain "ValveBiped.Bip01_R_Hand" x limit -25 25 0
$jointconstrain "ValveBiped.Bip01_R_Hand" y limit -35 35 0
$jointconstrain "ValveBiped.Bip01_R_Hand" z limit -50 50 0
$jointconstrain "ValveBiped.Bip01_R_Finger1" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger1" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger1" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger11" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger11" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger11" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger12" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger12" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger12" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger0" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger0" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger0" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger31" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger31" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger31" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger4" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger4" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger4" z limit 0 0 0
$jointconstrain "ValveBiped.Anim_Attachment_RH" x limit 0 0 0
$jointconstrain "ValveBiped.Anim_Attachment_RH" y limit 0 0 0
$jointconstrain "ValveBiped.Anim_Attachment_RH" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger01" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger01" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger01" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger02" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger02" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger02" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger2" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger2" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Finger2" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger01" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger01" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger01" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger12" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger12" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger12" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger02" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger02" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Finger02" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_Neck1" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_Neck1" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_Neck1" z limit 0 0 0
$jointmassbias "ValveBiped.Bip01_Head1" 4
$jointrotdamping "ValveBiped.Bip01_Head1" 3
$jointconstrain "ValveBiped.Bip01_Head1" x limit -50 50 0
$jointconstrain "ValveBiped.Bip01_Head1" y limit -20 20 0
$jointconstrain "ValveBiped.Bip01_Head1" z limit -26 30 0
$jointconstrain "ValveBiped.forward" x limit 0 0 0
$jointconstrain "ValveBiped.forward" y limit 0 0 0
$jointconstrain "ValveBiped.forward" z limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Toe0" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Toe0" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Toe0" z limit 0 0 0
}
I have all the definebones commented out, as they don't seem to make a difference. I also know that I shouldn't be using $bodygroup, but it works for now so I'm leaving it as is. Bonus points if somebody knows why do I have to use the proportions trick in the first place, because everywhere I go it says that it should just work ^–^
Thanks in advance!
Does the model persist in game? it's hard to see from the picture but I'll assume it does since you didn't mention it, I'll start off with how the texture look, 90% sure it's caused by normals, just recalculate them so they're all facing outwards, CTRL+N in blender if I'm not wrong.
The legs could be many things, I've read somewhere it's because of bad rigging, but most people agree IKchains have to do something with it, my theory on why models like these will crash your game when they don't have IKChains is because M_Anm already has IKChains, IKlock and IKrule too, so it NEEDS to have IKChains.
Bad news is that there's no cure for osteoporosis, at least not that I can get off of my mind right now, I had a similar problem and there might be a solution, but I haven't tried it out yet, basically it's just rigging your model in a different way: Recurring problem is driving me MAD, arms and legs are distorted
Thank you for your quick response.
I have checked the normals before, and compiled the model with the facing both onwards and outwards, it looks exactly the same regardless. I should have clarified this in the original post, so sorry for the unnecessary confusion.
It appears that the guy in the thread you linked has posted the correct way to do the proportion trick, which might be done wrongly in my model (it's really confusing).
I'm not calling this thread ended, but I'll defined try the steps you linked.
I have gone through the method recommended to you. Unfortunately, it didn't change anything - my model's legs are still broken, which leads me to believing that the proportions trick isn't the source of the problem.
Still no idea what causes the rendering issues.
If it really isn't the normals, then it could be the texture, try posting the VTF and VMT so I can have a look at them, another thing that shouldn't directly be the problem, but is still related is $mostlyopaque, try commenting that out, as for the legs, the best thing I can thing of is having the model use normal proportions instead of the proportion trick :/
Okay, so as I kinda expected the $mostlyopaque doesn't seem to be the cause.
I'll attach my .vmt, .vtf and .png texture files, so if you could have a look at them I'd be extremely gracious.
I have an idea considering the proportions trick - basically now that I'm thinking of it as real proportions it'd make sense to rotate the bones in pose mode, apply it as the rest pose and then in edit mode just expand them.
If it works I'll make a quick text post describing the technique, and when I'll have the time neccessary I'll make a video tutorial. If not, the search will continue.
For the legs, it appears like the thigh bones are twisted somewhere between 45° and 90° clockwise looking from the top, but I'm not entirely sure what causes the issue as the bones are completely fine in blender. Maybe this'll shed some more light.
Here are the texture files, I'd be very thankful if you could take a look:
(The only material used in blender is called BodyMaterial, checked it in HLMV too)
BodyMaterial.vmt
BodyTexture.vtf
https://files.facepunch.com/forum/upload/170489/8633ceb8-e7db-441b-941f-7d5b1a93a2fc/Test1.png
(The texture image file is funny, I know, didn't really put enough effort into it. :v )
The VMT has $translucent, admittedly the alpha channel seems to be 100% white, it shouldn't cause any problem but it's still better to just not include it.
Other than that I have NO CLUE, are you 10.000‱ sure that all normals are ok???? It really is a shame, I know how bad it feels to make a model all on your own in blender only to have it be garbage in gmod... this was going to be the thumbnail of the addon
https://i.imgur.com/EGOwaTk.jpg
Rip Cookie Cat playermodel, 2017-2018...
That's sad :I
The texture PNG is only 24 bit, which means no alpha. I'll delete the $translucent, but I don't think it's gonna help. Maybe I should try UV unwrapping once again? It shouldn't be a problem, because it looks fine in blender, but I guess I shouldn't trust how things look.
I can't be more sure the normals are ok, I've moved them outside, inside, outside again recompiling everytime and it still looks like somebody punched some faces out.
If there is one thing being a programmer taught me, is to be very persistent when it comes to problem solving, so I'm not even close to giving up. Not until I tried EVERYTHING. TWICE.
The best part? After that I'll probably have enough knowledge and practice to help others. ^–^
Wish me luck.
Okay, doing the pose-edit method yields some interesting results. The fingers look best they ever looked, so that's defined a plus. On the other hand, the legs are still twisted, but this time it looks like the knee bones are responsible. In the "reference" sequence in HLMV the legs are both rotated to the character's left. Also, the right hand is rotated away from where it should be in the, and it looks like the elbow bone is responsible here. Which really suggests that something might be wrong with the ikchains. Even if everybody is using it the way they are used here.
So I've gotta read up on that.
Make sure reference bone rotations match proportion bone rotation.
Next
https://i.imgur.com/axDFlGv.jpg
DON'T MIND ME IF I SAVE THAT IMAGE
First of all, huge thanks for replying with what seems to be a step in a very correct direction. Here is a screenshot of how it looked before:
https://files.facepunch.com/forum/upload/170489/c9c3f54d-8339-4eec-8876-278130f3c2dc/image.png
As you can (not very clearly) see, the knees were twisted like 90° clockwise looking from the top.
This is how it looks now:
https://files.facepunch.com/forum/upload/170489/713cf1bf-2f0c-4696-9959-f5644c554479/image.png
It is a step in the right direction, and having your tip about rotations in mind I tried to resolve this on my own. However, It looks like I'm not editing the correct bones, probably due to not understanding what is actually happening behind the scenes.
If you could expand on the topic a little bit, or even just tell me what to do, I'd be very thankful.
https://i.imgur.com/h6N3GZl.png
I'm very sorry if my misunderstandings annoy you somewhat, but here's the problem explained with screenshots:
It feels so close to a solution, so thanks already!
https://files.facepunch.com/forum/upload/170489/c2dc904a-bd1b-4a14-840c-4b7b1c165ec4/1.png
Okay, nevermind my previous post. I started from a wrong point - instead of modifying my skeleton I exported it, imported and then modified.
It's so damn close to being perfect - it's probably one rotation from completion:
https://files.facepunch.com/forum/upload/170489/721488fd-e87d-42ce-ab6d-b533d174b2ae/image.png
Both the legs are rotated a bit now, but both the axes are aligned with the lines. Maybe now it's IKChains? I want to blame them for something :P
Check the thigh bone
https://i.imgur.com/bmirSvz.png
https://files.facepunch.com/forum/upload/170489/be51ccac-0b31-4621-bacb-2ba133c1abbd/HipBones.png
The hip bones seem to be aligned. Weird, but there doesn't seem to be a problem here. I aligned the pelvis, but it didn't change anything.
What about rotation on the other skeleton?
Btw here's a video of me creating playermodel for GMod:
https://www.youtube.com/watch?v=dFuE8vRBxaU
The video you provided is insanely helpful. I have resolved all the leg problems, and now I'm working on the fingers. Next thing to tackle will be the visuals, which still look like they looked before. My guess for a fix is re-unwrapping, so I'll see how that goes.
THANK YOU SO MUCH BLAZE! You are a life saver ^–^
https://files.facepunch.com/forum/upload/170489/c1e3771f-15b8-42d7-805e-5c1f91d693ff/image.png
This is how it looks like after enabling smooth shading in blender. Definetely better, but still not good. (I did do recalculate normals to be outside, didn't do anything)
What I think now might be the issue is some parts of the mesh may not be closed properly. I'll make sure everything is a closed mesh and report back.
I removed all vertices that could cause a problem, and I'm sure every single part is a closed mesh.
The problem still persists.
Should I open a new thread? I'd mark this one as resolved as the title problem is now mostly solved (except for the hands aiming the wrong way).
If it's about your model is see-through, remove $translucent in the vmt
I couldn't help you with the wrong aiming problem. I tried messing with the hands rotation & used your qc but the aim is still correct.
Removing "$translucent" 1 from the .vmt helped, thanks!
I'm using a different qc now, here it goes:
$ModelName "Tored.mdl"
$Model "Tored" "Tored.smd"
$surfaceprop "flesh"
$Contents "solid"
$MaxEyeDeflection 90
$MostlyOpaque
$CDMaterials "models/player/tored/"
$IncludeModel "m_anm.mdl"
$IKChain "rhand" "ValveBiped.Bip01_R_Hand" knee 0.707 0.707 0
$IKChain "lhand" "ValveBiped.Bip01_L_Hand" knee 0.707 0.707 0
$IKChain "rfoot" "ValveBiped.Bip01_R_Foot" knee 0.707 -0.707 0
$IKChain "lfoot" "ValveBiped.Bip01_L_Foot" knee 0.707 -0.707 0
//$IKChain "rfoot" "ValveBiped.Bip01_R_Foot" knee 0 -1 0
//$IKChain "lfoot" "ValveBiped.Bip01_L_Foot" knee 0 -1 0
$IKAutoPlayLock "rfoot" 0 0.1
$IKAutoPlayLock "lfoot" 0 0.1
$CollisionJoints "tored_reference_physics.smd"
{
$automass
}
$sequence reference "reference" fps 1
$animation a_proportions "Tored.smd" subtract reference 0
$sequence proportions a_proportions predelta autoplay
$sequence "ragdoll" {
"anims/ragdoll.smd"
activity "ACT_DIERAGDOLL" 1
fadein 0.2
fadeout 0.2
fps 30
}
It's smaller, I got it from your post on the "IKChains are here to ruin your day" thread and edited it a bit.
Removing "$translucent" 1 from the .vmt helped, thanks!
Happy that the problem was resolved, lowkey mad you didn't listen to me when I said it the first time.
Happy that the problem was resolved, lowkey mad you didn't listen to me when I said it the first time.
I'm so sorry, my stupidity told me that because there is no transparency I don't have to even check. Boy, I was wrong, and you definitely had the solution first ^–^
It's fine, I used to do way worse mistakes, don't tell anyone but the model I did with cookie cat is still sitting there waiting to be completed, I made it a long time ago and has since kept it in case I'd be good enough to fix it, I am sure I can now.
Also, I think it's time to give Blaze a good reward for his fixes, I hope 5 diamonds is good enough.
Sorry, you need to Log In to post a reply to this thread.