Insurgency: Sandstorm

Insurgency: Sandstorm

Create and share custom maps, gamemodes and mutators for Insurgency: Sandstorm.

Learn more and find the game on Steam, Homepage, New World Interactive, Community Discord.

Animations + Blueprint Guide

In this guide, you will be learning how to create custom animations in blender, and use them in Unreal Engine 4. Note: This guide will not help you with learning how to use Sandstorm Modding Tool (UE4).

3 comments

Posted by on (updated ago)


Required Tools



modtools


Description: This tool contains everything related to Insurgency: Sandstorm modding project (SDK - Software Development Kit).



blender


Description: This tool is an open-source 3D computer graphics software used for creating animated films, visual effects, art, 3D printed models, motion graphics, interactive 3D applications, virtual reality, and computer games.



Animations Summary



For adding new Animations, you will need to select one of these targets.

There are 2 animation types:

  • First Person (1P) : Weapons, Arms.
  • Third Person (3P) : Characters, Equipment, Vehicles.

There are 4 main Armatures/Skeletons:

  • First Person (1P) : SK_1P_Master
  • Third Person (3P) : SK_3P_Final
  • Vehicles : SK_Vehicle_Master
  • Mounted Weapons : SK_MNTGN_Master

For Equipment, weapon attachments:

  • First Person (1P) : SK_1P_Attachment
  • Third Person (3P) : SK_3P_Equipment, SK_3P_Equip


Some weapon attachments will only need a socket to be attached to the weapon, such as mounted optics (Sights), lasers and flashlights.


Important!

To save you some time, before you replace any weapon, click on that weapon, then Save As > to any location of your choice > Name It to the weapon name you will add.

Now, all Sockets for Sights, Attachments are now carried on, so you don't have to create or copy all of the sockets 1 by 1. But you still need to make tiny adjustments for alignment.

Finally, click on the weapon you have saved, now you can Reimport With New File to replace the mesh.




Sockets



Sockets are used for attaching objects/items to weapons or characters. They are very important for gameplay.


screenshot 1820


Socket Names and Functions :

Sockets are used in both 1P and 3P. Placement of sockets is very important.

  • Eject : Used for ejecting rounds from weapons.
  • Muzzle : Used for displaying weapon's Muzzle flash particle effect, typically placed in front of the muzzle, or at the end of the barrel.
  • A_S : Stands for Attachment Sight, any socket starting with A_S is used for sights, example: A_S_Kobra. 1x Kobra sight.
  • A_FL : Stands for Attachment Flashlight, used for the placement of flashlights on weapons.
  • A_LS : Stands for Attachment Lasersight, used for the placement of lasersights on weapons.
  • A_B : Stands for Attachment Barrel, used for the placement of compensators and suppressors, flash hiders etc.
  • A_FG : Stands for Attachment Foregrip, used for the placement of foregrips below the barrel of weapons.
  • A_AC : ???? used for attaching mounted optics rails.


We will start with First Person (1P) Animations targets first.



First Person Animation Target



For almost every weapon animation, you will need Idle state animation, this is similar to Base Animation, where all animations are based on 1 main animation in order to achieve smooth transitions.

Category of weapons you may choose to animate:

  • Anti-Material Rifles (AMR)
  • Assault Rifles (AR)
  • Battle Rifles (DMR - Designated Marksman Rifle)
  • Heavy Machine Guns (HMG)
  • Sub Machine Guns (SMG)
  • Machine Guns (MG)
  • Shotguns (SG)
  • Sniper Rifles (SR)
  • Sidearm (Pistols)
  • Explosive
  • Grenade
  • Melee

Replacing these weapons will require a weapon that resembles the right category, and weapon the most to avoid replacing a lot of weapon animations.



Weapon Blueprints Folder


The location of these weapons can be found at Content > Game > Actors > Weapons


screenshot 1807


Weapon Blueprint - Animation

In order to replace or export existing animations, you will need to open the targeted weapon blueprint (You are going to replace).


screenshot 1821


Here in this example, I will open the M240 (MG) blueprint to look for animations. If you are going to replace this weapon with M60, that would be perfect.


  • First Person Firearm Anims : Replace anything related to weapon's actions, such as Fire, Reload and parts movement etc.. in First Person.
screenshot 1809

  • First Person Animations : Replace main weapon animations including arms, such as Idle (Base Animation), movement and sprint. Also, you can replace weapon's origin and sight location while aiming down sight.

screenshot 1810

Origin/Iron : adjust the location of weapon on screen in both free aim and aim down sight (Iron).


  • Third Person Firearm Anims Native : Replace weapon fire, reload, and hand pose (Fingers) in Third Person view.
screenshot 1812

  • Third Person Character Anims Native : Replace main character animations, this includes standing, crouching and prone. This is where you can have most control of third person character animations.
screenshot 1822

First Person Animation - Replacement


(1) Find the Asset


Inside of weapon's blueprint, go to Animation > First Person Animations > Idle Asset, then click on the Magnifier icon to browse to asset.


screenshot 1811


(2) Export [UE4]


Right click on the animation asset (AN_1P_M240_B_Idle) to export.


screenshot 1814

screenshot 1816b


Make sure Preview Mesh is checked only if you want to export the Skeletal Mesh with the animation.



[UE4] Exporting Preview Meshes




If you want to export Arms + Weapon to make animating a lot easier, and more accurate. Then, you will need to Export the animation Twice.


Note: I will be using G36, because M240 has issues with exporting arms. In this case, you will have to start from an empty animation, by exporting the weapon skeletal mesh (1P).

ex. SKM_1P_M240 + SKM_CH_1P_SH_ARM_Bare

For G36, you can directly export any animation without issues with parenting arms.


  • Open the animation asset (AN_1P_G36_B_Idle), then change the Preview Mesh. Make sure you Backup the original animation. You can Save As a new animation to replace later.

exportweaponfirst


  • Export the animation asset (AN_1P_G36_B_Idle) again, this time, change the Preview mesh to arms instead of Weapon. So you can animate things better.

exportweaponsecond




Third Person Animation


WORK IN PROGRESS! coming soon.





Blender


Import



Animations Import Settings : Click on [+] icon to save the current Operator Preset.


blenderimport



  • Now, you should have 2 exported Fbx files for animations.

blenderanimmeshimport


1. Import both of the files in blender


2. Inside Blender Outliner, you will have 1 duplicate armature.


blenderoutliner


3. Select the Arms, then press Alt+P to Clear Parent > Clear and Keep Transformation


blenderclearparent


4. After Clearing Parent, go to Properties > Modifier > Armature then, hit Apply.


blenderapplymodifier


5. Next, select the old armature and its parents. Then, delete all of them. (This will delete duplicate armature that belongs to arms, which is missing weapon bones)


blenderdeleteduplicatearmature


6. Finally, select the arms (First), and Weapon's Armature (b_root). Then, press Ctrl+P to Set Parent To > Armature Deform. Now, the arms have joined Weapon's Armature (b_root).

(Because character arms already have the correct Vertex Groups, they will work properly) Some weapons don't work with arms, so you have to start from scratch.


blenderjoinarmwithmainarmature



IK + Animations



Insurgency Sandstorm's First Person (1P) and Third Person (3P) rigs, both have IK bones.


ikboneslist


IK Bones


  • ik_hand_root : Root for both ik_hand_r, and ik_hand_l
  • ik_hand_r : Inverse Kinematics (IK) for the right hand.
  • ik_hand_l : Inverse Kinematics (IK) for the left hand.

Weapon Bones (b_wpn)

  • ik_hand_wpn_l : Inverse Kinematics (IK) for the left hand attached to the weapon.
  • ik_hand_wpn_r : Inverse Kinematics (IK) for the right hand attached to the weapon.



Bone Constraints


To keep IK attached to the correct hands, you will need to add Bone Constraints.


  • Select b_wpn, then Add Bone Constraint > Child Of.

Target: b_root.

Bone: b_ch_r_hand

Do not apply, this will keep the Weapon Bone constrained to the right hand. So when the right hand moves, the weapon will follow.

Note: b_wpn has 2 IK bones for both hands, they will keep both hands attached to the weapon at all times.


b wpn ikboneconstraint



  • Expand ik_hand_root, then select ik_hand_r, Add Bone Constraint > Child Of.

Target: b_root.

Bone: b_ch_r_hand


ik hand rconstraint


  • Expand ik_hand_root, then select ik_hand_l, Add Bone Constraint > Child Of.

Target: b_root.

Bone: b_ch_l_hand


ik hand lconstraint


Now, animating should be easier. You can always watch some videos to help you with animation.

Extra Video:


For adding bone constraint keys. Ex. Magazine attach to hands.



Sandstorm's Rig Blender Tutorial Example: Blender G36 + Arms Example



Animation



You will need to practice with Blender, if you are looking for better animations.

Here's a good video for improving your skills quickly.




Export


Animations Export Settings : Click on [+] icon to save the current Operator Preset.

Make sure everything is selected by pressing A to select all, or simply select the Armature before exporting.

Export .FBX file!


blenderexport



  • Selected Objects Armature: this will make sure you are exporting just the Animations + Armature (Skeleton).
  • Sampling Rate: 1.00 means 100%, it is enough to keep it at 1.00. If you want to adjust the value higher, it will consume more time and cpu power.
  • Simplify: makes the animation less complex, this can ruin realistic animations (Smoothness + frames).


One More Thing Left! :D



[UE4] Import Animation



Import the .FBX file that you have exported from Blender to Unreal Engine 4.


You can see UE4 has detected the .FBX file as an animation file which is correct.


ue4 anim import



  • Skeleton : select SK_1P_Master, this is the main skeleton for first person weapons (1p)


You can now click on Import, to import the animation file.

You can configure other settings as well. Sometimes importing 1 animation file will generate 2 unnecessary files, you can find the correct one, by opening each one.

You will notice missing animation, you can delete it now, but make sure the correct file is imported properly.


I will improve this guide over time.




The End




3 comments

Join the community or sign in with your gaming account to join the conversation:

Snakeyio
Snakeyio @snakeyio

Unreal Engine 4 animation IK curves tutorials will be added later to this guide.

nop_from_insurgency
nop_from_insurgency @nop-from-insurgency

Thanks so much for sharing this info, Snakeyio! :')

WintorOperator
WintorOperator @wintoroperator

You're doing the gods work! Thank you lord Snakeyio!