Model messed up in game

I was rigging a model in blender with automatic weights and everything was going fine
http://farm6.staticflickr.com/5549/11525275514_f0c047781a_o.png[/thumb]
but when I compiled it and loaded up tf2, it came up like this: [thumb]http://cloud-2.steampowered.com/ugc/666829240186245884/531CCB23D926232157A738C50487F77FD97F9E9D/

Any idea on what went wrong? I’ve never had this issue before.

A few things I see wrong with your models.

  1. Your scale has not been reset to 1. (I’m a 3ds max guy and I use XReset, which reset the scale and the boundary box of the model)

  2. Your material has invalid type for your model. You must be using vertexlitgeneric or unlitgeneric material type (I’m a bit rusty with VTFedit parameter, excuse me on this one)

Fix both of them and your model should display properly.

This could also have to do with the .qc

Could you show us what you have?

http://cloud-4.steampowered.com/ugc/666830221474973470/818DBFD479EAE59CDDB224345DBF25E4C1DEA678/1024x575.resizedimage

It probably has to do with the actual rigging itself, considering I’m pretty new to this and don’t have a lot of experience, and I wouldn’t be surprised if I messed up making the textures either.


$modelname "player/spy.mdl"
$model "spy" "Zero.smd"

$cdmaterials "models\player\Zero\"
$cdmaterials ""
$texturegroup skinfamilies
{
	{"models/player/Zero/Zero_Body_red.vmt"
 "models/player/Zero/Zero_Hands_red.vmt"
 "models/player/Zero/Zero_Head_red.vmt"
}
 	{"spy_blue.vmt"
 "spy_head_blue.vmt"
}
 	{"spy_red_invun.vmt"
 "spy_head_red_invun.vmt"
}
 	{"spy_blue_invun.vmt"
 "spy_head_blue_invun.vmt"
}
 }
$hboxset "spy"
$hbox 1 "bip_head" -5.000  -7.750  -7.500  5.000  3.750  3.500
$hbox 0 "bip_pelvis" -9.000  -1.000  -6.500  9.000  9.000  4.500
$hbox 3 "bip_spine_0" -8.000  -2.000  -7.000  8.000  4.000  5.000
$hbox 3 "bip_spine_1" -7.500  -2.000  -8.000  7.500  4.000  4.000
$hbox 2 "bip_spine_2" -9.000  -3.000  -9.000  9.000  3.000  4.000
$hbox 2 "bip_spine_3" -9.000  -3.000  -6.000  9.000  1.000  4.000
$hbox 4 "bip_upperArm_L" 0.250  -2.500  -1.750  13.750  3.500  3.250
$hbox 4 "bip_lowerArm_L" 0.500  -3.500  -2.500  13.500  2.500  2.500
$hbox 4 "bip_hand_L" -3.250  -7.500  -2.500  0.750  -0.500  2.500
$hbox 5 "bip_upperArm_R" 0.250  -3.500  -1.750  13.750  2.500  3.250
$hbox 5 "bip_lowerArm_R" 0.500  -2.500  -2.500  13.500  2.500  3.500
$hbox 5 "bip_hand_R" -0.750  0.500  -2.500  3.250  7.500  2.500
$hbox 6 "bip_hip_L" 2.000  -4.000  -3.500  22.000  2.000  3.500
$hbox 6 "bip_knee_L" 0.000  -2.500  -3.250  18.000  2.500  1.750
$hbox 6 "bip_foot_L" -1.500  -11.000  -2.750  1.500  3.000  1.250
$hbox 7 "bip_hip_R" 2.000  -3.500  -2.000  22.000  3.500  4.000
$hbox 7 "bip_knee_R" 0.000  -2.500  -3.250  18.000  2.500  1.750
$hbox 7 "bip_foot_R" -1.500  -3.000  -1.250  1.500  11.000  2.750
// Model uses material "models/player/spy/spy_red.vmt"
// Model uses material "models/player/spy/spy_head_red.vmt"
// Model uses material "models/player/spy/eyeball_l.vmt"
// Model uses material "models/player/spy/eyeball_r.vmt"
// Model uses material "models/player/spy/mask_spy.vmt"
// Model uses material "spy_blue.vmt"
// Model uses material "spy_head_blue.vmt"
// Model uses material "spy_red_invun.vmt"
// Model uses material "spy_head_red_invun.vmt"
// Model uses material "eyeball_invun.vmt"
// Model uses material "/../../effects/invulnfx_red.vmt"
// Model uses material "spy_blue_invun.vmt"
// Model uses material "spy_head_blue_invun.vmt"
// Model uses material "/../../effects/invulnfx_blue.vmt"
// Model uses material "mask_scout.vmt"
// Model uses material "mask_sniper.vmt"
// Model uses material "mask_soldier.vmt"
// Model uses material "mask_demo.vmt"
// Model uses material "mask_medic.vmt"
// Model uses material "mask_heavy.vmt"
// Model uses material "mask_pyro.vmt"
// Model uses material "mask_engi.vmt"
// Model uses material "spy_red_zombie_alphatest.vmt"
// Model uses material "spy_head_red_zombie_alphatest.vmt"
// Model uses material "eyeball_zombie.vmt"
// Model uses material "spy_blue_zombie_alphatest.vmt"
// Model uses material "spy_head_blue_zombie_alphatest.vmt"
// Model uses material "spy_red_zombie_invun.vmt"
// Model uses material "spy_head_red_zombie_invun.vmt"
// Model uses material "spy_blue_zombie_invun.vmt"
// Model uses material "spy_head_blue_zombie_invun.vmt"
// Model uses material "models/player/spy/hwm/spy_head_red.vmt"
$attachment "eyes" "bip_head" 0.00 -2.66 -4.45 rotate 90.00 -90.00 0.00
$attachment "righteye" "bip_head" -1.14 -2.66 -4.45 rotate 90.00 -90.00 0.00
$attachment "lefteye" "bip_head" 1.14 -2.66 -4.45 rotate 90.00 -90.00 0.00
$attachment "cig_eject" "bip_pelvis" 2.00 -29.00 -17.00 rotate -20.00 -100.00 -90.00
$attachment "partyhat" "bip_head" 0.00 -6.88 -1.00 rotate 89.00 93.00 -180.00
$attachment "cig_smoke" "prp_cig" 0.00 -2.13 0.00 rotate -0.00 0.00 0.00
$attachment "head" "bip_head" 0.00 -9.08 0.00 rotate 88.95 90.00 180.00
$attachment "eyeglow_L" "bip_head" 1.22 -2.63 -5.89 rotate 65.00 -0.00 90.00
$attachment "eyeglow_R" "bip_head" -1.22 -2.63 -5.89 rotate 65.00 -180.00 -90.00
$attachment "weapon_bone" "weapon_bone" 0.00 0.00 0.00 rotate -0.00 0.00 0.00
$attachment "weapon_bone_1" "weapon_bone_1" 0.00 0.00 -0.00 rotate -0.00 0.00 0.00
$attachment "weapon_bone_2" "weapon_bone_2" 0.00 0.00 0.00 rotate -0.00 0.00 0.00
$attachment "weapon_bone_3" "weapon_bone_3" 0.00 0.00 0.00 rotate -0.00 0.00 0.00
$attachment "flag" "bip_spine_2" 0.00 -1.39 8.95 rotate -0.08 2.96 1.49
$includemodel "player/spy_user_animations.mdl"
$includemodel "player/spy_animations.mdl"
$surfaceprop "flesh"
$eyeposition -78.222 0.000 0.000
$illumposition 1.680 -0.000 40.090
$sequence ref "ref" fps 30.00
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00

Also, here’s the blend file and materials/textures if that helps any

There’s no typos in the VMT file or $cdmaterials file that I can see, which means it’s either in a wrong folder or listed incorrectly in the SMD file. You can also try removing that blank $cdmaterials “” line. Aside from that, scale could be a problem with the way it’s being stretched. I’m not sure Skibur was referring to the xform, but I have no idea how Blender handles that type of thing anyway. Just make sure he’s the same size of the spy you’re replacing.

Edit: I just converted him to max to compare him to another model. He’s about less than half the size of an HL2 citizen. Scale is definitely a factor there.