> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinemation.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# How to swap weapon mesh

> In this tutorial you will learn how to replace gun meshes in this pack.

<Tip>
  **Note**: [Blender](https://www.blender.org/) software is required for this tutorial.
</Tip>

Replacing weapon models from the **FPS Animation Pack** requires rigging a custom weapon to one of the skeletons in the pack. As an example, we will use the AKX model.

## Export weapon mesh from Unreal Engine

First, open up the contents of the **FPS Animation Pack** (if you can't see this directory, please visit this page:

<CardGroup cols={1}>
  <Card title="🌌 Overview" href="/fps-animation-pack/unreal/tutorial/overview" />
</CardGroup>

Next, locate the weapon mesh you want to replace:

<Frame caption={"We will replace this AKX mesh."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/f62174f4f42d53cb84a9.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=f9ce99ba750a89b93906d7311112c9b9" alt="" width={563} data-path="images/fps-animation-pack/unreal/f62174f4f42d53cb84a9.png" />
</Frame>

Right-click on it and select the exporting option:

<Frame caption={"Click the \"Export\" button."}>
  <img src="https://mintcdn.com/kinemation/PlmzVQHJ3J_C1x92/images/fps-animation-pack/unreal/269c60b6f9881c9a03e9.png?fit=max&auto=format&n=PlmzVQHJ3J_C1x92&q=85&s=64f6743a06578e9127b7ad1bd6ecf1a6" alt="" width={563} data-path="images/fps-animation-pack/unreal/269c60b6f9881c9a03e9.png" />
</Frame>

Select the "Export Preview Mesh" option and export the model from Unreal Engine:

<Frame caption={"Export the model from Unreal."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/ea4d9e0bfc8b38f7c730.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=4672745203f82887b73047e679a90266" alt="" width={472} data-path="images/fps-animation-pack/unreal/ea4d9e0bfc8b38f7c730.png" />
</Frame>

Now, it's time to do the rigging. We will use Blender in this example, but you can use any other 3D software.

## Import weapons into Blender

Open Blender (or a software of your choice) and import both models as FBX:

<Frame caption={"Import the FBX files."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/bcf981a2efb75fe966b2.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=68f9d357c2bb1e9b8881b19e74090723" alt="" width={461} data-path="images/fps-animation-pack/unreal/bcf981a2efb75fe966b2.png" />
</Frame>

<Frame caption={"Add models to the scene."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/6d7e67b267dab33b10b0.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=c5b3335b31942b4fd69c08790e404855" alt="" width={563} data-path="images/fps-animation-pack/unreal/6d7e67b267dab33b10b0.png" />
</Frame>

If your model already has a skeleton, make sure to remove it:

<Frame caption={"Select the weapon\u0027s armature and delete it."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/7b1ccbed3dfff1481e6d.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=a8e6dd2afd52a5dfce96986da7e42328" alt="" width={250} data-path="images/fps-animation-pack/unreal/7b1ccbed3dfff1481e6d.png" />
</Frame>

Next, we need to create vertex groups for our custom weapon. To do this, right-click on the model and press Tab to activate the "**Edit**" mode. Select the "**Object Data Properties**" icon:

<Frame caption={"Click this tab."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/6327aa80bde956eed7ee.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=7b7983244e65eb9cd62048a02901c657" alt="" width={417} data-path="images/fps-animation-pack/unreal/6327aa80bde956eed7ee.png" />
</Frame>

Now you add new elements to the "**Vertex Groups**" list on the right:

<Frame caption={"These groups bind parts of the mesh to the bones."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/6238b5b5e747576e4907.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=b719c53be4b7724620a7bc2d749f9535" alt="" width={1200} data-path="images/fps-animation-pack/unreal/6238b5b5e747576e4907.png" />
</Frame>

To create a new group, right-click on the "**+**" icon and set its name to the target bone. Make sure to create vertex groups for each bone in the skeleton.

Now, we need to assign parts of the weapon to our newly created groups. Here is how to do it step-by-step:

1. Left-click on the vertex group.

2. Select the part of the weapon you want to include (hover over the part and press L).

3. Click the "Assign" button.

Once all groups are assigned, we need to parent our custom model to the target skeleton. To do this, make sure to align weapons perfectly:

<Frame caption={"Perfectly aligned weapons."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/e54d6c0bbeb447888c0c.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=b9dc2a3b2410849b3eda63eb1d31753f" alt="" width={563} data-path="images/fps-animation-pack/unreal/e54d6c0bbeb447888c0c.png" />
</Frame>

Next, select your custom weapon model, then the target skeleton, and press **Ctrl + P**, select the "**Armature Deform**" option:

<Frame caption={"Parent new mesh to the skeleton."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/ea66a04382466fbc2243.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=14fa809d6e3601be07ddfd1afaf2f632" alt="" width={1088} data-path="images/fps-animation-pack/unreal/ea66a04382466fbc2243.png" />
</Frame>

Now, we can export our custom model as **FBX**. To do this, go to **File → Export → FBX:**

<Frame caption={"Export settings."}>
  <img src="https://mintcdn.com/kinemation/PlmzVQHJ3J_C1x92/images/fps-animation-pack/unreal/58d2243b109eb85cfd36.png?fit=max&auto=format&n=PlmzVQHJ3J_C1x92&q=85&s=f645ee289d0fe087fa7af0c358513b56" alt="" width={227} data-path="images/fps-animation-pack/unreal/58d2243b109eb85cfd36.png" />
</Frame>

Finally, we need to import our model to Unreal Engine. Click the "Import" button in the Unreal Editor, select the weapon FBX model, select the original skeleton, and click import:

<Frame caption={"Import the new weapon model."}>
  <img src="https://mintcdn.com/kinemation/6K2VhvCCGB3AmUKf/images/fps-animation-pack/unreal/a8a6a461df21887be66f.png?fit=max&auto=format&n=6K2VhvCCGB3AmUKf&q=85&s=c7c1c01c7e3712ecdccba34a26143815" alt="" width={431} data-path="images/fps-animation-pack/unreal/a8a6a461df21887be66f.png" />
</Frame>

Now, you are custom weapon model should work with animations from the pack! If something went wrong along the way, do not hesitate to reach out on our [Discord](https://discord.gg/kinemation-1027338787958816860).
