Image 1 IKinema Rig Editor
IKinema RunTime Rig Editor is the integrated toolset within Unreal to create, edit and tune IKinema rigs on the skeleton. It includes all of the rig creation features available in Action for Maya. The purpose of this tool is to replace IKinema Action as the main tool for creating IKinema rigs for in-game animation needs.
Creating IKinema Rigs
Note: Updating From Earlier Versions To 4.15+ Plugin - Pole Vector Knee Tasks
With the update to Unreal Engine 4.15, the way in which knee pole vector tasks are visualized and customized have been changed. In earlier versions of the plugin, the way in which knee tasks were visualized and their actual positional values were different. This has been changed in the 4.15 update and they are now visualized according to their actual location.
Previously the knee tasks would be visualized at the location of their associated bone but their actual position passed to the solver were different.
Pole vector tasks are now visualized according to their calculated position and are also moveable/editable in the rig. If updating from an earlier version of the plugin, this may result in the following compile error in your animation blueprint due to these changes:
"Warning Possibly Outdated IKinema Rig. Knee Task Pole Vector is (0,0,0). Please Update rig file: ***The Rig In Question*** if needed."
If you receive this message, you can either delete and re-add the knee task (it will be initialized and set correctly) or you can edit the position manually yourself using the tasks widget (figure 2 in the image below) or through the numeric entry in the Rig (figure 1 below).
IKinema Rig assets can be created from any Skeleton asset within the Content Browser. To create an IKinema Rig asset, follow one of these steps:
- Right click on the Skeleton asset and select Create IKinema Rig as shown in Image 2
Image 2 Create IKinema Rig asset for a Skeleton asset
Image 3 Create Advanced Asset
The IKinema Rig will be created, enter the name for the asset, by default this will be_IKinemaRig.
Depending on the number of bones in the Skeleton, a message might pop-up suggesting an edit to the number of bones in the IKinema Rig. For a biped character normally, there would be around 28 bones in the IKinema Rig.
The IKinema Rig Editor can be opened by double clicking on the newly created asset in the Content browser
Image 4 Opening Rig Editor
Once the IKinema Rig Editor is open, you will get the interface shown in Image 5.
Image 5 IKinema Rig Editor Interface
IKinema Rig Editor Modes
The Rig Editor has two main modes of operations, the first shown in Image 5 allows you to edit the bones properties in the Rig. The second mode is for editing the IK constraint properties.
Switching between the two modes can be done by using the Editing Mode button shown in Image 6 just on top of the 3D viewport.
Image 6 Editing Mode Selection
This mode allows you to edit the properties of the different bones/segments in the rig and create tasks of different types. The User Interface in this mode consists of the following main sections
- The 3D viewport, to show the Skeletal hierarchy in the IKinemaRig and the associated SkeletalMesh with this rig. The viewport will also show the task location of the different IK constraints. Non-Active bones are marked highlighted in Red
- The Details tab, if no bone is selected it will show the general IKinema solver settings. If a bone is selected from the Viewport or the Hierarchy tab, this will change to show the properties for the selected bone
- The Hierarchy tab, shows the hierarchy of the bones that is currently in the IKinema Rig asset
A bone can be selected from either the Hierarchy tab or by clicking on the bone in the Viewport. Once a bone is selected the defaults properties will be shown in the Details tab.(See Bone Properties Tab).
Once a bone is selected, if you right click on the bone in the Viewport, you will get the Context Menu shown in Image 7.
Image 7 Bone Mode Viewport Context Menu
The context menu allows you to perform a number of operations related to the selected bone. You can create different constraint types as follow
- Add Dual Task: Create a position and orientation IK task on the selected joint
- Add Position Task: Create a position only IK task.
- Add Orientation Task: Create an orientation only IK task.
These three task types are created with the default tuning parameters. Under the Constraint Type sub-menu, there is a list of different tasks pre-sets. These settings for these tasks are tuned by IKinema engineers for these bones. This list includes
- Hip Task: Most suitable for the hips pelvis joint in the skeleton. This pre-set creates a dual task, tuned for the most natural response from the pelvis of your character
- Foot Task: This option creates a dual task with high weights (increased importance). This is suitable for tasks on the heels and toes for your character, to ensure the feet are correctly planted on the ground.
- Hand Task: This is useful for tasks that are required for grabbing objects or holding weapons. Most suitable for the wrist joints in your character
- Head Task: Creates a Look-At task that is suitable to be attached to the head joint of your character. Tuning the Look-At direction will be described later on
- Chest Task: Creates a position task on the chest as well as a Look-At task to allow for the upper body rotation when aiming with your character.
- Knee Task: Creates Pole vector tasks to maintain point direction of the bone. Most useful for Knee and Elbow joints.
These different task pre-sets has Keyboard shortcut keys, as shown in Image 7.
Note: It is not a requirement to attach these tasks to the mentioned bone name. You can attach them to any bone where a task with similar properties is required.
The Reset commands restores the bone settings to the default values when the rig was first created.
The Select Hierarchy Below select all the bones in the hierarchy below the currently selected bones to allow us to delete the entire selected hierarchy from the IKinema Rig
The Copy and Paste properties commands allow for copying the properties of the selected bone and pasting them to any number of other selected bones.
The Delete command deletes the selected bone from the hierarchy if it has no children. If we need to delete all the bones from the rig, then we will have to use the Select Hierarchy Below, then the Delete command
Image 8 Context bone from the Hierarchy Tab
If you right click on a bone name from the Hierarchy tab, the context menu in Image 8 will be shown. This is very similar to the viewport context menu. It has one extra command Delete All Bodies Below This function in a similar way to the Select Hierarchy Below followed by Delete sequence. This has the quick access key combination Ctrl + Delete.
Bone Properties Tab
When a bone is selected in the Hierarchy Tab or the Viewport, the different properties for this bone will appear in the Details tab. The most used of these properties are shown in Image 9.
Image 9 IKinema Bone Properties
These properties and their function are listed below
General Bone Settings:
- Name: The Bone name.
- Parent name: The parent bone name in the hierarchy.
- Active: Whether the bone is being solved or not. If the bone is set as not active, it will maintain its local transform.
- Weight: The mobility of the bone in the local bone axes. A value of 1 means the bone is very mobile, while a value of 0 is equivalent to disabling that bone.
- Retargeting Gain: The influence of the FK animation in relation to the IK constraints. A value of 1 is to follow the FK animation closely, while a value of 0 is similar to disabling retargeting for that bone.
- Retargeting DoF Gain: This is a multiplier to the bone retargeting gain, defined in the local bone axes. Normally, these are left at 1 except for the rotation axis of the Knee bone.
General Bone Settings - Advanced Settings:
- Dof X, Dof Y, Dof Z: The active degree of freedoms for the bone. The axes are the local bone axes.
- Mass: The assigned mass of the bone. Fetched from the skeletons corresponding physics asset.
- Reset To Rest: Resets the pose input to the solver to rest at each frame.
- Enable Retargeting: Enables retargeting
- Max Velocity: The maximum rate of change of displacement of the bone
Stretch IK Settings:
- Enable Stretch Along X, Y, Z: Select the axis (in bone local space) for which you want to enable Stretch IK.
- Stretch Weight: The relative weight you wish to assign the stretch task relative to the other assigned tasks. A higher weight relative to another task means it is given a higher priority in reaching its target transform.
Limits: (Not yet implemented)
- Enable Limits: Enable/Disable limits
- Min Degrees: Minimum rotation limit in degrees.
- Max Degrees: Maximum rotation limit in degrees.
- Enforce Limits: Always pull the bone to the centre of the limits range.
- Limits Gain: The importance of the limits. Value is from 0 to 1. Zero similar to disabling limits completely.
Constraint (Task) Mode
This mode allows you to edit the properties of the different IK constraints in your rig. The Hierarchy tab will change to show a list of all the constraints, while the Details tab will show the properties of the selected constrained
Switching to this mode can be done through the Editing Mode button shown in Image 6. Or through the drop down menu at the top of the Hierarchy tab and selecting constraints.
Similarly, to the Bone Mode when a constraint is selected and right clicking on the constraint name in the Hierarchy tab or inside the Viewport, a context menu appears as shown in Image 10
Image 10 Constraint Mode Context Menu.
- Copy and Paste Properties: Copy the settings of a selected constraint and paste it on a different constraint.
- Reset: To reset the constraint properties to their default settings.
- Delete: Delete the selected constraint.
Constraint Properties Tab
When a constraint is selected, its properties will appear in the Details tab. The most common ones are shown in Image 11. These properties are divided into three main section. The "General Task Settings", "Position Task", "Orientation Task", "Orientation Task: Look At".
Image 11 IKinema Task Properties.
General Task Settings:
- Name: The name of the constraint.
- Has Position Task: Boolean to enable or disable the position task in the solver.
- Has Orientation Task: Boolean to enable or disable the orientation task in the solver.
- Is VR Task: Marker to specify if the task is associated with VR application (i.e. motion controller or HMD task).
- VR Controller Offset: The transform offset of the Motion Controller/HMD tasks. Used to align the controller to the character mesh.
- Enable As Pole Vector: Enable or disable this task being treated as a pole vector task (used for knees, elbows, etc.).
- Pole Vector Local Space: Set the pole vector offset if the task is a pole vector ( set above).
- Position Weight: The relative weight you wish to assign the stretch task relative to the other assigned tasks. A higher weight relative to another task means it is given a higher priority in reaching its target position.
- Position Precision: An internal solver parameter - values of 2-4 are recommended.
Position Task - Advanced:
- Position DoF X,Y,Z: Enable or disable the position task along X, Y, Z in bone local space.
- Position Depth: The number of bones (above task bone in the hierarchy) which will be modified to allow the current bone to meet its position target.
- Rotate DoF X,Y,Z: Enable or disable the Rotation task along X, Y, Z in bone local space.
- Rotate Depth: The number of bones (above task bone in the hierarchy) which will be modified to allow the current bone to meet its rotation target.
- Rotate Weight: The relative weight you wish to assign the stretch task relative to the other assigned tasks. A higher weight relative to another task means it is given a higher priority in reaching its target position.
- Rotate Precision: An internal solver parameter - values of 2-4 are recommended.
Orientation Task - Look At:
- Look At: Enable or disable this task as a look-at task.
- Use Local Space Axis For Look-At: If ticked, look at axis is defined in bone local space. If unticked, look at axis is defined in component space.
- Look At Axis (Local Space): Set the position of the Look At Axis vector in bone local space.
- Look At Axis (Component space): Set the position of the Look At Axis vector in component space.
- Look At Limits: Set the limits in bone local space for which look at behaviour can take place.
Task type colour codes
Green offset in the direction of the Look-At axis
3D Viewport Options
The 3D Viewport has three command menus at the top left corner. These are
- Camera: Control the camera view direction.
- View: Gives control over what is shown in the viewport. The Skeleton structure, The Non-Active bones, The Constraints, or the different bone names through the Hierarchy option
Image 12 View Menu.
- Mode: Selects the Mesh rendering option between the options, Solid, Wireframe, None as shown in Image 13
Image 13 Modes Menu.
Global Solver Settings
When no bone or constraint is selected in the Hierarchy or the Viewport, the Details tab will show the global solver settings as shown in Image 14.
Image 14 Global Solver Settings
IKinema Solver - General Settings:
- Max Iterations: The maximum number of iterations the solver uses to get a solution. A higher value here will result in more accurate solves with increased performance cost.
- Global Task Precision: Internal solver parameter. Set to 2 or 4.
- Global Retargeting Gain: This determines the influence of the FK animation on the resultant solve. Recommended range 0-1.
- PCoefficient: This is an internal solver parameter set automatically when "Auto-Tune" is enabled.
- Auto-Tune: Automatically determine the PCoefficient to stabilise the solve.
IKinema Solver - General Settings - Advanced:
- Limits Gain: Not Yet Implemented
- Translate Root: Enable or disable the root being translated during solving.
- Root Translation DoF X, Y, Z: Enable or disable root translation in specific axix in solver space (space of the root bone)
- Root Translation Weight: Sets the mobility of the root translation. Increases/decreases the range of possible translation covered in a single solve of the root. A value of one, means a maximum mobility.
IKinema Balance Task:
- Active CoM: Enable or disable a centre of mass task.
- Figure Mass: The total mass of the skeleton. Fetched from the skeleton's physics asset.
- CoM Properties - CoM DoF X,Y,Z: Enable or disable the centre of mass task in a specific axis.
- CoM Task Weight: The relative weight you wish to assign the CoM task relative to the other assigned tasks. A higher weight relative to another task means it is given a higher priority in reaching its target position.
- CoM Task Precision: Internal solver parameter - set to 2 or 4.