# Meshes and Armatures: Rigging

## Summary

This page will give you a short explanation on why 3d objects are moving.

### Wait, this is not what I want!

* To learn what a rig even is, check [armatures-.rig-files](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/files-and-what-they-do/file-formats/armatures-.rig-files "mention")
* Maybe you want the [weight-painting-for-gonks](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/3d-modelling/meshes-and-armatures-rigging/weight-painting-for-gonks "mention") guide?
* For a documentation of the import/export options in Wolvenkit, check [here](https://wiki.redmodding.org/wolvenkit/wolvenkit-app/editor/import-export/models#choosing-rigs-correctly).
* Guides on how to transfer weights between rigs: [blender plugin](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-tools/wolvenkit-blender-io-suite#transfer-vertex-weights), [youtube video](https://www.youtube.com/watch?v=bR_Vke__voU), [wiki page](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/npcs/custom-facial-piercings-prc-framework#weight-painting)

The connection between a mesh and a rig is made via **vertex groups**. Any number of vertices can be assigned to a group, which is then matched to a rig's bone via **name**.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-435e7159122b03830ed2c33300a00e3eadc397c5%2Frigging_meshes_vertex_groups.png?alt=media" alt=""><figcaption><p>These vertices move with the bone "Spine3"</p></figcaption></figure>

How much every bone influences the vertices is determined by vertex weight, which can be altered in Blender's Weight Paint perspective:

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-69351032b4e751d637729f6f9e7de3deb6a0123d%2Frigging_meshes_vertex_weights.png?alt=media" alt=""><figcaption><p>Weight painting</p></figcaption></figure>

Vertex weights are assigned for every vertex group, and each vertex will move on the basis of the sum of all its weights.

{% hint style="success" %}
To preview the deform in Blender, you can select the mesh's parent armature and enter the "Pose Mode". There, you can either apply an [exported animation](https://wiki.redmodding.org/wolvenkit/guides/modding-community/exporting-to-blender/exporting-rigs-and-anims), or select individual bones and rotate/move them. The **Armature modifier** will morph your mesh according to the pose, letting you spot errors much faster than trying to debug them in-game.
{% endhint %}

{% hint style="info" %}
You can see a video of the process [here](https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/npcs) (courtesy of Vesna).
{% endhint %}
