Jump to content

[3D] Weapon Exporting & Animation

Recommended Posts

Hi modders, Chuc here.


In this series of tutorials we'll be exporting weapons and animations from specifically 3DSMAX, and learning how to set up a typical weapon using the current system available in the Squad SDK.


Going into the future as Weapons themselves are given a rewrite, as well as changes to the animation system get launched, the methods and specifically authoring will need to change. But just for now if you are really keen on seeing your weapons perform in-game and using the current system, please follow this guide.


Exporting a Weapon to the SDK from 3DSMAX


1. Separate out all the pieces that you will be animating, making sure that the pivots are where you want each piece to be. Ensure that the weapon points towards Negative Y axis, and also is set to half scale.


2. Name all pieces in ascending order from 1, using the naming convention Bip01 Weapon<NUMBER> , without the brackets.The main mesh of the weapon needs to be called Bip01 Weapon1, and everything else can go off that. All other meshes will need to be parented to Weapon1.





3. Export the weapon as a FBX file, using the settings below.




4. When in the SDK, import a new Skeletal mesh, using the settings below. Make sure Skeleton is set to None as you want the engine to generate a new skeleton for you.




5. You will need to regenerate its own Physics Asset, by Right-Clicking the newly imported Skeletal Mesh, then Create, then Physics Asset. Simple is best, and you can go into the Physics Asset editor to delete extra volumes the engine might have generated automatically, in order to get the simpliest shape possible to cover the weapon.




Share this post

Link to post
Share on other sites

Setting up your Animation Scene


I won't be covering much on the nitty gritty of actual animation for now, just the simple basics of setting up a new weapon, and a very simple first person rig.


Provided here is a simple Biped skeleton already posed for any standing animation. You can use this to do any animation scene setup, as well as rigging any new characters you wish to put into the game. For content protection reasons I have taken out the skinned model from the skeleton, and have left just the biped configured for Squad, that is native to 3DSMax. 




Squad Skeleton Biped with Stand Reference and Weapon (Small)

(For Max 2016) (5 November 2016)


Squad Skeleton Bipod in T-Pose (Small)

(For Max 2016) (5 November 2016)


1. Import your weapon into your setup scene with the Biped skeleton.




2. Find the Weapon bones in the Biped, and Link Constraint (Animation > Constraint > Link Constraint, then Add Link, at frame 0) them to each of the corresponding weapon meshes. Ensure that the bones themselves are aligned with the weapon mesh's pivot.




3. Provided in the scene are Dummies that will be the hand controllers (L_HandController and R_HandController). The biped wrist bones have already been IK connected to these, but when you start animating you will need to use these hand controllers rather than the biped wrists when dealing with constraints.




4. Finally there is a camera in the right eye of the Biped where the game uses to determine the position of the first person camera. Use this as a guide to see how your animation will look in-game.




You now should be good to start animating!

Share this post

Link to post
Share on other sites

Exporting your Animation and Importing it into the Engine


You've spent the past week grueling over your animation, tweaking those keys, smoothing those curves out.. and now finally comes the moment of truth. Exporting into the engine!


1. Begin by Selecting the entire Biped (all the bones under 'Root'). Make sure the bounds of your timeline encompass the section of the animation you want to export.




2. Go to File > Export > Export Selected




3. Export it as a FBX file, using the settings below.




4. Now in the engine, hit Import, and use the settings below.




5. Now that you've imported the animations themselves, let's go through the animations you'll need for a full weapon set.

  • Deploy - Deploys your weapon
  • Undeploy - Putting your weapon away
  • Fire - Trigger - The animation of the character depressing the trigger.
  • Fire - Recoil - The animated physical recoil of the weapon. Here is where you can add some visual flair to the recoil of your weapon.
  • Fire - Bolt - What happens to the bolt of the weapon when firing. The first frame of this animation will be used if the weapon is configued (in the WeaponBP) to 'Lock Bolt' when empty. So for example, the slide lock when you empty your pistol; or the bolt lock when you empty a M16 rifle.
  • Reload - Reloading your weapon when the weapon is still has ammo in it
  • Reload Dry - Reloading your weapon when the weapon is completely is empty
  • FireRate - Changing your fire rate

You will need to configure the additive settings for each animation. Some do not need to be made additive, see list below.



(Not pictured is FireRate, which needs to be Local Space: Selected Frame: Stand Animation too)




So close!

Share this post

Link to post
Share on other sites

Configuring the Weapon Blueprint


Now comes the fun part, setting up the Weapon Blueprint! This is basically where you tell the engine how the weapon should behave and which animations or effects or sounds to use.


1. Create a Weapon BP Child, using BP_Weapon as the parent.




2. After creating your new Child WeaponBP, rename it to whatever your weapon is, then use the guide below to set up the variety of elements that make up your weapon.




3. Don't forget to point to which weapon mesh to use, for both 1P and 3P.




4. Override the World Settings with your new weapon to try it out! 



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now