• Re-Rigging Models to the Gmod Skeleton
    1 replies, posted
I have a few ported view/world models from another source game that technically work in Gmod, but they aren't rigged correctly and the animations aren't quite right. I'm looking to re-rig them to work and use the right animations. Problem is, the last time I'd done any rigging, it was probably 6 years ago on Mount and Blade armors. XD Could anyone direct me to some relatively in-depth tutorials for rigging viewmodels for Gmod, as well as compiling viewmodels for Gmod? I've found very little, and I've been searching for a few hours. Thanks.
Well if you still know the basics of rigging a mesh to a skeleton you can do it without too much effort. Take the stock Valve biped skeleton and position it inside the model you are rigging it to. Make sure not to change any of the bone names. Basically when you rig a model to a foreign skeleton you want to try to reposition the bones in a way that offsets unwanted deforms when it uses the original animations. So for instance if your model has longer legs than the original model that was on the skeleton you want to increase the distance between the bones in the legs to compensate. (It may actually be the other way around, forgive me if I'm wrong I don't actually remember which way the compensation works) Once you have your bones in place, rig the mesh as you normally would, and afterwords you need to write the compile script. This is the one I wrote for Gmod player models, someone else may be able to give you a better one but this works well for me. [code]//ESSENTIAL ATTACHMENTS $attachment "lefthand" "ValveBiped.Bip01_L_Hand" 0.00 -0.00 -0.00 rotate -0.00 0.00 -0.00 $attachment "righthand" "ValveBiped.Bip01_L_Hand" 0.00 -0.00 -0.00 rotate -0.00 0.00 0.00 $attachment "eyes" "ValveBiped.Bip01_Head1" 4.50 -5.00 0.00 rotate 0.00 -90.00 -90.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 //OR WHEN ANIM ATTACHMENT BONES ARE NOT PRESENT (MAY NEED SLIGHT TWEAKING PER MODEL) $attachment "anim_attachment_RH" "ValveBiped.Bip01_R_Hand" 3.50 -1.50 -1.00 rotate 0.00 -0.00 -180.00 $attachment "anim_attachment_LH" "ValveBiped.Bip01_L_Hand" 3.50 -1.50 1.00 rotate -0.00 -0.00 -180.00 //MALE ANIMATIONS $includemodel "m_anm.mdl" $includemodel "m_gst.mdl" $includemodel "m_pst.mdl" $includemodel "m_shd.mdl" $includemodel "m_ss.mdl" //FEMALE ANIMATIONS $includemodel "f_anm.mdl" $includemodel "f_gst.mdl" $includemodel "f_pst.mdl" $includemodel "f_shd.mdl" $includemodel "f_ss.mdl" //GMOD KEYVALUES $keyvalues { physgun_interactions { "onpickup" "boogie" "onlaunch" "spin_zaxis" "onfirstimpact" "bloodsplat" } } //PROPER IKCHAIN VALUES $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[/code] Of course you will also need to inlcude model-specific QC info as well as all that. Consult the Valve Dev Wiki if you need help with QC files. I'm pretty sure you can reuse the phymodel from the original mesh, as long as it's scaled correctly and you have at least 1 vertice on your main mesh assigned to the same vertex group a shape on your phymesh is assigned to. That's what I do for TF2 player phymodels I assume it's the same for Gmod player phymodels. Sorry if it's not the best of help but it's something at least.
Sorry, you need to Log In to post a reply to this thread.