User Tools

Site Tools


gamedev:deigde:editors:rig

This is an old revision of the document!


IGDE Rig Editor

The rig editor allows to create rig resources for your game (*.derig or else depending on used modules). Rigs are used for Physics with Colliders using Shapes. They are also used for Animators and Animations together with the Animator Editor (*.deanimator).

Rig editor preview

Rigs can contain these elements:

  • Rig shapes (entire rig)
  • Bone shapes (bone only)
  • Bone constraints (between bones)

Rigs can be used in different configurations depending on what kind of Collider they are used with.

Using Volume Colliders only rig shapes can be used. Rig Colliders or Component Colliders bone shapes and constraints can be used too.

If any bone shapes are present all bones without a shape do not collide and rig shapes are ignored if present.

If no bones have shapes the rig shapes are used for the entire rig.

In paticular this means a rig without any shapes is a Ghost Rig colliding with nothing unless Model Collision is enabled.

The editor window composes of the preview area and the properties panel on the left side.

Preview Window

The preview window shows the preview of the rig. See 3D-View Navigation for how to navigate the view. To see the rig you have to assign a Model Resource and Skin Resource in the view panel. Alternatively you can switch on bones display mode in the Edit menu.

In addition to the regular 3d-view navigation you can activate Physics Simulation by pressing CTRL+Q. With physics simulation activated the rig is set to dynamic collision response and falls to the ground. You can then MOUSE_LEFT dragging on shapes of the rig to move them to check out the physical response. To exit the physics simulation mode press CTRL+Q again. You find simulation mode switch also in the Simulation menu.

Rig

Rig panel

The Root Bone defines the bone to synchronize with the object position and orientation. This is required for rigs used with physical simulation. If missing the object position and orientation is not synchronized to any bones which causes bones to move all over the place potentially far away from the object position. For kinematic or static rigs the root bone is not used.

The CMP parameter defines the Central Mass Point of the entire rig. This is used only for rigs without any bone shapes.

If Model Collision is enabled all shapes (rig and bone ones) are ignored and the Model resource assigned to the collider is used as collision shape. This works only for Component Colliders with a Component resource assigned which has a Model resource assigned.

It is tempting to use model collision as default but it is discouraged. Model collision is usually complex to calculate causing performance drops if used heavily. Try using Shapes whenever possible to get the best performance. If you have to use Convex Decomposition Tools and assign them as Hull Shapes. This is way faster and more stable than model collisions.

If Dynamic is enabled the rig can be used for physical simulation. If this parameter is disabled colliders using this rig will always be animated kinematic even if set to dynamic.

Bone

Bone panel

Shows parameters of the selected bone. To select bones switch to the Bone selection mode in the Edit menu.

The Name is the unique name of the bone. Model, Animation and Animator resources match bones against this name. Hence the rig bone name is the master bone name so to speak.

The Parent is the name of the parent bone. Bone loops are not allowed since bones are organized in a tree like structure. Root bones have no parent. Multiple root bones are possible but for physical simulation only one can be assigned as the rig root bone.

The Position and Rotation are relative to the parent bone or the rig if no parent bone is set.

The CMP is the Central Mass Point of the rig.

The Mass parameter defines the mass in kg of the bone and all the matter connected to it. All bone mass summed together is the rig mass and thus the collider mass.

The best workflow is to set the mass of the bones using a virtual mass like “1 unit” or “5 units”. This allows to specify the mass of the bones relative to other bones. Once you have all bone mass assigned use the Bone → Scale Mass menu command. You can now enter the mass of the entire rig (for example the mass of your actor). The bones mass are then scaled uniformly to make their total sum match the desired rig mass.

If you do not want to figure out individual bone mass for the first step you can use Bone → Mass from Volume menu command. This will calculate bone volumes from the Model resources. You can then specify a scaling factor. The mass assigned to the bone is the calculated volume times this factor.

Activate the Dynamic parameter if this bone has to be simulated using physics. This parameter has no effect if the rig itself is not set dynamic. Dynamic and non-dynamic bones can be combined in the same rig. Be careful using non-dynamic bones parented to dynamic bones. The results might not be what you expect. Using dynamic bones on non-dynamic parents is usually safe to do.

Shape

Each bone can have one or more shapes assigned. This panel show parameters of the selected bone shape. To select bone shapes switch to the Shape selection mode in the Edit menu. You can only select visible bones. Rig shapes are always visible. Bone shapes are only visible if a bone is selected or if Bone → Show All Bone Shapes menu is checked.

The content of the panel depends on the type of the selected shape. These parameters are though present on all shape types.

The Parent is read-only and shows the parent bone of the shape. If this value is empty the shape belongs to the rig itself.

The Property parameter allows to assign a game specific custom property value to the bone shape. This can be used to add per-shape information which can be used during collisions.

Although this field can contain any kind of value it is recommended to store here a game specific Identifier. This way you can use in game scripts a mapping table to store additional information. The Blender Export Script supports assigning shape properties too so you can incorporate them into your modelling workflow.

Preview Video

You could leave a comment if you were logged in.
gamedev/deigde/editors/rig.1585949076.txt.gz · Last modified: 2020/04/03 21:24 by dragonlord