• How to animate and export my viewmodel animations?
    2 replies, posted
Hello again, I'm still trying to grasp how to actually create the animations for my knife swep. Is there any tutorials that people know of that can help me learn how to export animations into a format that source will recognise. I'm using 3DS Max.
I think you need to export the animations all as their own .smd files, so you would have: idle.smd knifedraw.smd knifestab.smd etc. I recommend you decompile some of valve's viewmodels (v_crowbar) and download these programs if you don't already have them: A simple decompiler - [url]https://sites.google.com/site/zeqmacaw/tools/crowbar[/url] For viewing and extracting valve files - [url]http://nemesis.thewavelength.net/index.php?p=26[/url] For qc/qci viewing and text editing - [url]http://notepad-plus-plus.org/#[/url] For compiling .smd - [url]http://www.wunderboy.org/apps/guistudiomdl2.php[/url] Also this site can usually answer most questions somewhere - [url]https://developer.valvesoftware.com/wiki/Viewmodel[/url] Here is what the .qci for v_crowbar looks like: $bodygroup "studio" { studio "crowbar_reference.smd" } $cdmaterials "models\Weapons\V_hand\" $cdmaterials "models\Weapons\V_crowbar\" $texturegroup "skinfamilies" { { "crowbar_cyl.vmt" "v_hand_sheet.vmt" "head_uvw.vmt" } } // Model uses material "crowbar_cyl.vmt" // Model uses material "v_hand_sheet.vmt" // Model uses material "head_uvw.vmt" $attachment "0" "ValveBiped.Tip" 0 0 0 rotate 0 0 0 $surfaceprop "default" $contents "solid" $illumposition -8.644 -25.37 -15.379 $bbox 7.416 -17.287 -33.063 43.324 0 2.306 $cbox 0 0 0 0 0 0 // The hitbox info below was automatically generated when compiled because no hitbox info was provided. $hboxset "default" $hbox 0 "ValveBiped.Bip01_Spine4" 0 0 -1.93761 2.033355 1.000771 0 $hbox 0 "ValveBiped.Bip01_R_UpperArm" -1.763428 -2.282606 -2.7001 11.692552 4.552054 3.363354 $hbox 0 "ValveBiped.Bip01_R_Forearm" -1.957748 -3.134501 -2.803662 11.4817 2.550362 3.046589 $hbox 0 "ValveBiped.Bip01_R_Hand" 0 -3.14122 -19.575346 10.937266 0.794102 14.726171 $hbox 0 "ValveBiped.HandControlRotR" 0 -1.935452 -15.150156 11.1231 0 0 $sequence "idle01" "anims\idle01" { fps 30 "ACT_VM_IDLE" 1 loop } $sequence "draw" "anims\draw" { fps 30 "ACT_VM_DRAW" 1 snap } $sequence "misscenter1" "anims\misscenter1" { fps 30 "ACT_VM_MISSCENTER" 1 snap } $sequence "misscenter2" "anims\misscenter2" { fps 30 "ACT_VM_MISSCENTER" 1 snap } $sequence "hitcenter1" "anims\hitcenter1" { fps 30 "ACT_VM_HITCENTER" 1 snap } $sequence "hitcenter2" "anims\hitcenter2" { fps 30 "ACT_VM_HITCENTER" 1 snap } $sequence "hitcenter3" "anims\hitcenter3" { fps 30 "ACT_VM_HITCENTER" 1 snap } $sequence "hitkill1" "anims\hitkill1" { fps 30 "ACT_VM_HITKILL" 1 snap } $sequence "holster" "anims\holster" { fps 30 "ACT_VM_HOLSTER" 1 } If you don't understand some of the $parameters then look them up on the site I linked. ( https://developer.valvesoftware.com/wiki/$sequence ) So for your knife you would have the idle animation (The animation that is constantly played whenever no other animations are being played) which usually doesn't contain any movement. $sequence "idle01" "anims\idle01" { fps 30 "ACT_VM_IDLE" 1 loop } $sequence "knifedraw" "anims\knifedraw" { fps 30 "ACT_VM_DRAW" 1 } $sequence "knifestab" "anims\knifestab" { fps 30 "ACT_VM_PRIMARYATTACK" 1 } I'm not to sure about the ACT_VM parts, but I think they should be chosen from a list of these: ACT_VM_DRAW, ACT_VM_HOLSTER, ACT_VM_IDLE, ACT_VM_FIDGET, ACT_VM_PULLBACK, ACT_VM_PULLBACK_HIGH, ACT_VM_PULLBACK_LOW, ACT_VM_THROW, ACT_VM_PULLPIN, ACT_VM_PRIMARYATTACK, // fire ACT_VM_SECONDARYATTACK, // alt. fire ACT_VM_RELOAD, ACT_VM_DRYFIRE, // fire with no ammo loaded. ACT_VM_HITLEFT, // bludgeon, swing to left - hit (primary attk) ACT_VM_HITLEFT2, // bludgeon, swing to left - hit (secondary attk) ACT_VM_HITRIGHT, // bludgeon, swing to right - hit (primary attk) ACT_VM_HITRIGHT2, // bludgeon, swing to right - hit (secondary attk) ACT_VM_HITCENTER, // bludgeon, swing center - hit (primary attk) ACT_VM_HITCENTER2, // bludgeon, swing center - hit (secondary attk) ACT_VM_MISSLEFT, // bludgeon, swing to left - miss (primary attk) ACT_VM_MISSLEFT2, // bludgeon, swing to left - miss (secondary attk) ACT_VM_MISSRIGHT, // bludgeon, swing to right - miss (primary attk) ACT_VM_MISSRIGHT2, // bludgeon, swing to right - miss (secondary attk) ACT_VM_MISSCENTER, // bludgeon, swing center - miss (primary attk) ACT_VM_MISSCENTER2, // bludgeon, swing center - miss (secondary attk) ACT_VM_HAULBACK, // bludgeon, haul the weapon back for a hard strike (secondary attk) ACT_VM_SWINGHARD, // bludgeon, release the hard strike (secondary attk) ACT_VM_SWINGMISS, ACT_VM_SWINGHIT, ACT_VM_IDLE_TO_LOWERED, ACT_VM_IDLE_LOWERED, ACT_VM_LOWERED_TO_IDLE, ACT_VM_RECOIL1, ACT_VM_RECOIL2, ACT_VM_RECOIL3, ACT_VM_PICKUP, ACT_VM_RELEASE, ACT_VM_ATTACH_SILENCER, ACT_VM_DETACH_SILENCER, I've never actually made a SWEP or custom animations but I think it doesn't matter too much what $sequence you assign to each ACT_VM, it just makes it easier if you have your knife drawing animation assigned to ACT_VM_DRAW. Hopefully someone else with more experience replies, I tried :V
Ah, I didn't even think to check their actual website. *Bonks noggin* Thanks for the overview though, it's definitely brought clarity. I'll eventually get the hang of it :)
Sorry, you need to Log In to post a reply to this thread.