Source SDK

Source SDK

75 ratings
Working with $IncludeModel
By мяFunreal
Ever wanted to know just how you use $includemodel? Now's your chance
   
Award
Favorite
Favorited
Unfavorite
Tutorial
In the video below you'll learn how to use $includemodel and its cousin $declaresequence.
Mostly used to just copy animations from another model onto yours.

Notes:
  • If the decompiled model looks like it got taken apart with magazine being in the wrong spot, check the second video on how to put it back together.
    Then you can continue with the rigging section of the first video.
    I am sorry for the inconvenience, I did not think about it when I made the includemodel tutorials.
  • If the model you take anims from has an .ani file, this one must be renamed aswell. BUT inside the renamed mdl file, at the very bottom, it lists that .ani file. THAT line must also be renamed to the new .ani file name!

The only requirement, other than blender itself, is the blender source tools, to import/export smd.
http://steamreview.org/BlenderSourceTools/




Dead 4 Mods Discord[discord.gg]
My Discord[discord.gg]
Paypal[paypal.me], for don't-ations
Removing Camera Shake
Working with $includemodel also copies all attachments.
Including the one that handles camera movement.
Deleting an attachment on your viewmodel will just end up copying them from the $includemodel.

To remove camera movement, load the "A_..." model into a hex editor and look for every word called "Camera" and rename it to something else.


This will cause the "a_..." model to animate the "bamera" bone and attachment, but because your gun doesn't have them, nothing is going to move on your actual viewmodel.


Repairing rotating Camera.
If your camera rotates 90° when you equip your weapon, its because either the bone or the attachment is rotated.

This can be fixed by rotating the "attach_camera" attachment itself so that it fits.
The correct orientation for the attachment in HLMV is "Red line in looking direction, blue line upwards, green line will point left.

Just enter the attachment tab in HLMV, select the Camera attachment and play with the rotations until the croshair aligns as it should.
Then copy-paste the String into your qc and compile.




Entire process Video.
If you for some reason just can't follow the guide and you'd rather watch one and a half hour long video of me just making a mod like this, here you go :v