Playermodel lag when moving issue

Hey all.

So quite a few months back, I posted about this problem before, but with less imformation. Now I seem to have found the problem, but I have no idea on how to fix it.

So basically, whenever the playermodel moves, it drops a huge amount of FPS. I think I’ve found out the problem, and it’s the shadow. Here:

This is obviously one of the GMod playermodels. The shadow is rendered around that box (I bloody hope that’s what it is).

http://dl.dropboxusercontent.com/u/17094269/gm_construct0000 (2).jpg[/t]

This is the shadow rendered around the playermodel I’ve converted.
[t]http://dl.dropboxusercontent.com/u/17094269/gm_construct0001 (2).jpg

Using r_shadows 0 seems to fix it for the most part (but it still loses a few frames when moving).

It’s also got a larger “Model Texture” price as well, so that’s another thing I wish to cut.

Anyone ever experienced this and have any fixes? I’m not sure whether to bump the old thread but I figured that I make a fresh one anyway.

Thanks. I’ll try provide anymore info if needed.

Bump. Sorry, does anyone have a fix for this or know someone who I can personally contact?

Post the QC



$cd "C:\Users\James\Desktop\suitmodel"
$modelname "agsuits/Male_07.mdl"
$body "male_02" "head_07.smd"
$body "bodywhite" "White.smd"
//Oh god
$bodygroup tiez
{
    studio "tie1.smd"
    studio "tie2.smd"
    studio "tie3.smd"
    studio "tie4.smd"
    studio "tie5.smd"
    studio "tie6.smd"
    studio "tie7.smd"
    studio "tie8.smd"
    studio "tie9.smd"
    studio "tie10.smd"
    studio "tie11.smd"
    studio "tie12.smd"
    studio "tie13.smd"
    studio "tie14.smd"
    studio "tie15.smd"
    studio "tie16.smd"
    studio "tie17.smd"
    studio "tie18.smd"
    studio "tie19.smd"
    studio "tie20.smd"
    studio "tie21.smd"
    studio "tie22.smd"
    blank
}
$cdmaterials "models\Humans\suits\"
$texturegroup skinfamilies
{
    { "mouth.vmt" "eyeball_l.vmt" } //(for reference, paste 15 more times (inclu this one))
    { "suit_sheet" }
    { "suit_sheet2" }
    { "suit_sheet3" }
    { "suit_sheet4" }
    { "suit_sheet5" }
    { "suit_sheet6" }
    { "suit_sheet7" }
    { "suit_sheet8" }
    { "suit_sheet9" }
    { "suit_sheet10" }
    { "suit_sheet11" }
    { "suit_sheet12" }
    { "suit_sheet13" }
    { "suit_sheet14" }
    { "suit_sheet15" }
    { "suit_sheet16" }
}
$lod 30
{
    bonetreecollapse "ValveBiped.Bip01_L_Hand"
    bonetreecollapse "ValveBiped.Bip01_R_Hand"
    nofacial
}
$hboxset "default"
$hbox 1 "ValveBiped.Bip01_Head1" -1.250  -6.500  -3.190  8.250  3.500  3.310
$hbox 4 "ValveBiped.Bip01_L_UpperArm" 0.000  -2.750  -2.750  12.510  1.750  2.250
$hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000  -2.190  -2.380  13.000  1.810  1.620
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.060  -2.000  -1.500  4.060  1.000  2.500
$hbox 5 "ValveBiped.Bip01_R_UpperArm" 0.000  -3.000  -2.250  12.390  2.000  2.750
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.500  -2.200  -1.550  12.500  1.800  2.450
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.060  -2.000  -2.500  4.060  1.000  1.500
$hbox 6 "ValveBiped.Bip01_L_Thigh" 0.000  -3.750  -3.250  17.850  3.750  3.250
$hbox 6 "ValveBiped.Bip01_L_Calf" 0.000  -3.510  -3.280  15.640  3.490  2.720
$hbox 6 "ValveBiped.Bip01_L_Foot" -1.070  -2.000  -2.840  5.040  5.000  2.160
$hbox 6 "ValveBiped.Bip01_L_Toe0" -0.500  -3.000  -2.190  2.500  0.000  2.460
$hbox 7 "ValveBiped.Bip01_R_Thigh" 0.000  -3.750  -3.250  17.850  3.750  3.250
$hbox 7 "ValveBiped.Bip01_R_Calf" 0.000  -3.510  -2.820  15.640  3.490  3.180
$hbox 7 "ValveBiped.Bip01_R_Foot" -1.060  -2.010  -2.280  5.050  4.990  2.720
$hbox 7 "ValveBiped.Bip01_R_Toe0" -0.500  -3.000  -2.600  2.500  0.000  2.100
$hbox 3 "ValveBiped.Bip01_Pelvis" -7.500  -5.500  -6.000  7.500  8.500  5.000
$hbox 2 "ValveBiped.Bip01_Spine2" -2.500  -2.500  -7.000  14.500  7.500  7.000
// Model uses material "mouth.vmt"
// Model uses material "eyeball_l.vmt"
// Model uses material "mike_facemap.vmt"
// Model uses material "eyeball_r.vmt"
// Model uses material "tiesandties.vmt"
// Model uses material "tiesandties2.vmt"
// Model uses material "suit_sheet.vmt"
// Model uses material "arms.vmt"
// Model uses material "suit_sheet2.vmt"
// Model uses material "suit_sheet3.vmt"
// Model uses material "suit_sheet4.vmt"
// Model uses material "suit_sheet5.vmt"
// Model uses material "suit_sheet6.vmt"
// Model uses material "suit_sheet7.vmt"
// Model uses material "suit_sheet8.vmt"
// Model uses material "suit_sheet9.vmt"
// Model uses material "suit_sheet10.vmt"
// Model uses material "suit_sheet11.vmt"
// Model uses material "suit_sheet12.vmt"
// Model uses material "suit_sheet13.vmt"
// Model uses material "suit_sheet14.vmt"
// Model uses material "suit_sheet15.vmt"
// Model uses material "suit_sheet16.vmt"
$attachment "eyes" "ValveBiped.Bip01_Head1" 3.67 -4.32 -0.00 rotate -0.00 -80.10 -90.00
$attachment "mouth" "ValveBiped.Bip01_Head1" 1.00 -6.50 -0.00 rotate -0.00 -80.00 -90.00
$attachment "chest" "ValveBiped.Bip01_Spine2" 5.00 4.00 0.00 rotate 0.00 90.00 90.00
$attachment "forward" "ValveBiped.forward" 0.00 0.00 0.00 rotate 0.00 0.00 -0.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
$attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" 0.00 0.00 0.00 rotate -90.00 -90.00 0.00
$includemodel "m_anm.mdl"
$includemodel "m_gst.mdl"
$includemodel "m_pst.mdl"
$includemodel "m_shd.mdl"
$includemodel "m_ss.mdl"
$surfaceprop "flesh"
$eyeposition -0.000 -0.000 70.000
$illumposition -0.654 -0.000 36.127
$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 90.0
    $inertia 10.00
    $damping 0.01
    $rotdamping 1.50
    $rootbone "valvebiped.bip01_pelvis"
    $jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"

    $jointconstrain "valvebiped.bip01_spine2" x limit -70.00 70.00 0.00
    $jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 0.00
    $jointconstrain "valvebiped.bip01_spine2" z limit -65.00 95.00 0.00

    $jointmassbias "tie1" 0.00
    $jointinertia "tie1" 0.00
    $jointdamping "tie1" 0.00
    $jointrotdamping "tie1" 0.00
    $jointconstrain "tie1" x limit 0.00 0.00 0.00
    $jointconstrain "tie1" y limit 0.00 0.00 0.00//-100.00 100.00 0.00
    $jointconstrain "tie1" z limit 0.00 0.00 0.00//0.00 115.00 0.00

    $jointconstrain "valvebiped.bip01_l_thigh" x limit -40.00 40.00 0.00
    $jointconstrain "valvebiped.bip01_l_thigh" y limit -55.00 90.00 0.00
    $jointconstrain "valvebiped.bip01_l_thigh" z limit -70.00 120.00 0.00

    $jointconstrain "valvebiped.bip01_l_calf" x limit -30.00 30.00 0.00
    $jointconstrain "valvebiped.bip01_l_calf" y limit -12.00 12.00 0.00
    $jointconstrain "valvebiped.bip01_l_calf" z limit -12.00 145.00 0.00

    $jointmassbias "tie2" 0.00
    $jointinertia "tie2" 0.00
    $jointdamping "tie2" 0.00
    $jointrotdamping "tie2" 0.00
    $jointconstrain "tie2" x limit 0.00 0.00 0.00
    $jointconstrain "tie2" y limit 0.00 0.00 0.00//-40.00 40.00 0.00
    $jointconstrain "tie2" z limit 0.00 0.00 0.00//-110.00 120.00 0.00

    $jointconstrain "valvebiped.bip01_r_thigh" x limit -40.00 40.00 0.00
    $jointconstrain "valvebiped.bip01_r_thigh" y limit -90.00 55.00 0.00
    $jointconstrain "valvebiped.bip01_r_thigh" z limit -70.00 125.00 0.00

    $jointconstrain "valvebiped.bip01_r_calf" x limit -30.00 30.00 0.00
    $jointconstrain "valvebiped.bip01_r_calf" y limit -12.00 12.00 0.00
    $jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 145.00 0.00

    $jointconstrain "valvebiped.bip01_r_foot" x limit -40.00 40.00 0.00
    $jointconstrain "valvebiped.bip01_r_foot" y limit -40.00 40.00 0.00
    $jointconstrain "valvebiped.bip01_r_foot" z limit -55.00 35.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

    $jointconstrain "valvebiped.bip01_l_upperarm" x limit -40.00 40.00 0.00
    $jointconstrain "valvebiped.bip01_l_upperarm" y limit -115.00 150.00 0.00
    $jointconstrain "valvebiped.bip01_l_upperarm" z limit -135.00 135.00 0.00

    $jointconstrain "valvebiped.bip01_l_forearm" x limit -30.00 30.00 0.00
    $jointconstrain "valvebiped.bip01_l_forearm" y limit -60.00 60.00 0.00
    $jointconstrain "valvebiped.bip01_l_forearm" z limit -140.00 30.00 0.00

    $jointconstrain "valvebiped.bip01_l_hand" x limit -60.00 60.00 0.00
    $jointconstrain "valvebiped.bip01_l_hand" y limit -60.00 60.00 0.00
    $jointconstrain "valvebiped.bip01_l_hand" z limit -70.00 70.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_r_upperarm" x limit -40.00 40.00 0.00
    $jointconstrain "valvebiped.bip01_r_upperarm" y limit -150.00 115.00 0.00
    $jointconstrain "valvebiped.bip01_r_upperarm" z limit -135.00 135.00 0.00

    $jointconstrain "valvebiped.bip01_r_forearm" x limit -30.00 30.00 0.00
    $jointconstrain "valvebiped.bip01_r_forearm" y limit -60.00 60.00 0.00
    $jointconstrain "valvebiped.bip01_r_forearm" z limit -140.00 30.00 0.00

    $jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00
    $jointconstrain "valvebiped.bip01_r_hand" y limit -60.00 60.00 0.00
    $jointconstrain "valvebiped.bip01_r_hand" z limit -70.00 70.00 0.00

    $jointconstrain "valvebiped.bip01_head1" x limit -70.00 70.00 0.00
    $jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 0.00
    $jointconstrain "valvebiped.bip01_head1" z limit -65.00 40.00 0.00

    $jointmassbias "tie3" 0.00
    $jointinertia "tie3" 0.00
    $jointdamping "tie3" 0.00
    $jointrotdamping "tie3" 0.00
    $jointconstrain "tie3" x limit 0.00 0.00 0.00
    $jointconstrain "tie3" y limit 0.00 0.00 0.00//-40.00 40.00 0.00
    $jointconstrain "tie3" z limit 0.00 0.00 0.00//-110.00 120.00 0.00

    $jointconstrain "valvebiped.bip01_l_foot" x limit -40.00 40.00 0.00
    $jointconstrain "valvebiped.bip01_l_foot" y limit -40.00 40.00 0.00
    $jointconstrain "valvebiped.bip01_l_foot" z limit -55.00 35.00 0.00
    //$animatedfriction 1.000 400.000 0.500 0.000 0.300
}


This one is heavily edited of course. I have another which is “less edited”.

Check all of your SMDs to see if you don’t have a vertice/bone etc which is far away from the origin in your 3D package of choice.

Also remove those:

$includemodel “m_gst.mdl”
$includemodel “m_pst.mdl”
$includemodel “m_shd.mdl”
$includemodel “m_ss.mdl”

(they’re useless)

None of them do.

I get these errors during compiling though:


WARNING: @ragdoll : bounding box out of range : -131017 -167085 -31452 : 21 -9999 21

and


SMD MODEL C:\Users\James\Desktop\suitmodel/phymodel.smd
WARNING: Unknown command 100.00 in collision series
WARNING: Unknown command 0.00 in collision series
WARNING: Unknown command 115.00 in collision series
WARNING: Unknown command 0.00 in collision series
WARNING: Unknown command 40.00 in collision series
WARNING: Unknown command 0.00 in collision series
WARNING: Unknown command 120.00 in collision series
WARNING: Unknown command 0.00 in collision series
WARNING: Unknown command 40.00 in collision series
WARNING: Unknown command 0.00 in collision series
WARNING: Unknown command 120.00 in collision series
WARNING: Unknown command 0.00 in collision series

…straight after it does the phymodel.smd.

Not sure if that means anything. After a google I couldn’t find anything on it either. Also, when I “kill” myself, it seems to just slump into a heap. What’s more, whilst it’s still moving (e.g. head’s shaking but slowing down to a stop), the shadow area is everywhere.

https://dl.dropboxusercontent.com/u/17094269/gm_construct0002%20(2).jpg[/t]

When it stops

[t]https://dl.dropboxusercontent.com/u/17094269/gm_construct0003.jpg

On a possibly unrelated note, I’ve been trying to find the “ragdoll.qc” file and do a: $include “ragdoll.qc” but I can’t seem to find it. I recall you posting something about a file with all that in? Or is that just my imagination…

Troubleshoot your issue by commenting out various parts of your model (hitbox, ragdoll, bounding boxes) etc until you find what’s causing it

Locked it down to this line:


$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00

Also, this error disappears:


WARNING: @ragdoll : bounding box out of range : -131017 -167085 -31452 : 21 -9999 21

When I remove that, the shadow’s perfectly normal. FPS problem fixed. However, when you die, the ragdoll disappears. Also the eyeball textures aren’t there.

EDIT:

All’s good apart from the disappearing ragdoll on death. After a bit of research it appears that the bounding boxes are outside the maximum (16384 units in any direction), and that’s the whole cause of the problem. If I can reduce those, I’m in business, otherwise I’m fucked. How would I come by doing this?

Set the ragdoll sequence to use your main model smd


$sequence ragdoll "White.smd" ACT_DIERAGDOLL 1 fps 30.00

Works perfectly! Thanks for all your help. :smile:

Albeit, they die strangely, but at this point I’m not going to complain.