SimRig Editor Pipeline - Workflow


Basic workflow of the SimRig Editor Project.


As we discussed earlier, here is a simple diagram that shows the processes involved in using the web pipeline:

Creating a New Project

A new Project can be made using the "New Project" button. The screenshots below show how to create a new project:

New project window

This is the create new project window.

Project named

Give your project a name, for this tutorial we are naming it "tutorial". The SimRig Editor allows only alpha-numeric names for projects. You cannot use a project name that is the same as an existing project on your account.

Pick the fbx

Next you want to pick the FBX to create the simulation rig with. Click "Choose File" to open up an explorer window. Navigate to the FBX you want to use and click "Open". The SimRig Editor expects a character to be in a T-pose by default. If your .fbx is not in T-pose, please make sure the actual rest mesh is first changed to a T-pose.

Filled project window

Now all of the necessary fields have been filled. Click "Create!" to upload your fbx to the server and create your project.

If you have multiple projects, you can access them through the "Open Project" button.

Open project window

Each user can have a maximum of 10 projects. To open a project, click on the project name. If you want to delete your project, click the trash can icon next to the project name.

Delete prompt

A prompt will pop up asking if you are sure that you want to delete it. Type "DELETE" in the field and click OK to delete the project.

Below is a sample of how the SimRig Editor window looks on a new project creation:

Newly imported FBX

1) This is the simulation rig bone map. Unassigned bones will be red, and will turn grey once they are assigned. You cannot export until all of the bones are grey. Even though the map is in an A-pose, it is preferable for the imported FBX to be in a T-pose.

2) This is the name of the project.

3) These are the buttons described previously.

4) This is the imported FBX.

5) This is the current mode of the editor that we are in. There are 3 different modes: Bones, Colliders, and Controller Mode. The Colliders and Controller modes will be explained later.


Mapping Simulation Bones

Simulation bones can be mapped by clicking a body part on the reference mapping image on the top-left. You can only map a simulation bone in the "Bones Mode". For mapping a bone from simulation rig to actual rig, select a body part first. Once the body part is selected, click on it and drag it onto the part you wish to map it to as shown below. When you click and drag the sim rig map to a bone, an orange line will appear, showing you which bone you are dragging from. When you approach near a bone, the dot representing it will highlight yellow. Once the dot you want to assign is highlighted Yellow, letting go of the left mouse button will assign the dragged sim rig bone to that FBX bone.

Sim rig bones cannot be assigned to the same FBX bone. Attempting to assign a sim rig bone to an FBX bone already assigned to a sim rig bone will result in the previous sim rig bone being unassigned.

Initially, all of the body parts are red, which indicates un-mapped sim rig bones. When a part is selected, it turns white. A mapped rig bone is colored grey, and the name of the body part is visible. Mapped FBX bone markers are changed from green to blue.

AT THE MOMENT, THE MODEL MUST HAVE CLAVICLE BONES AND MUST BE IN A T-POSE

Assigning bones

When you click and drag the sim rig map to a bone, an orange line will appear, showing you which bone you are dragging from. When you approach near a bone, the dot representing it will highlight red. Once the dot you want to assign is highlighted red, letting go of the left mouse button will assign the dragged sim rig bone to that FBX bone.

As you can see in the image below, assigned sim rig bone regions will turn grey, indicating that it is attached to an FBX bone.

More bones assigned

Click on a region to view more details about the bone and to change physics properties. The currently selected region is colored white. You can also reposition the bone, but it is usually placed in the right position. Continue assigning all the bones as shown:

Continue assigning bones

When we have finished assigning all of the sim rig bones to a corresponding FBX bone, this is how the project window looks. It is ok to have unassigned FBX bones, just not unassigned sim rig bones.

Finished assigning sim rig bones

Assigning a bone will also allow you to have widgets that can be used to move, rotate or scale the bones or colliders attached to it. The figure below shows the widgets for translate, rotate and scale respectively.

Assigning all the bones will turn the refernce image on the left to gray and the bones that are mapped will turn blue. As you can see in the image below, assigning the bones with respect to the sim rig map assumes that the character is facing towards you. Rotating the model will not rotate the sim rig, so keep that in mind. We can go ahead and save the project lest we have to come back to it later. To do this, we click on the save button on the top right.

Mapping the bones to a target bone will provide lots of parameters that you can change under the "Bone Attributes" window.


Bone Attributes Window

The Bone Attributes Window has three tabs:

  • Bone tab
  • Collider tab
  • Global Controller tab

Bone Tab

This is the bone mode window. Here you can adjust the physics for each bone, which will change how it behaves. You can change everything from the mass and collision properties to the MOI and joint type. You do not need to change the joint parent as that is automatically set when you assign the sim rig bone. On the basis of "joint-type" the appropriate bone attributes are generated.

Joint Types Available in the Editor:

  • ball: Ball Joint (can rotate along all 3 axes)
  • hinge: Hinge Joint (can rotate along 1 axis)
  • universal: Universal Joint (can rotate along 2 axes)

The base joint has only one instance which is the root. One can change the joint type for any joint except the base joint. The image below shows how the bone tab looks:

Each joint has it's own set of paramters and properties. The buttons "AutoPosition Pivot" and "AutoPos All Pivots" allow you to auto-posiiton the pivots for the respective joints. The field "target_bone" refers to the bone you have mapped it to. Each bone also has a field specifying the parent bone.

Collider Tab

The colliders are placed at the location of the bones. They can be moved around, scaled or rotated using the widgets provided. The image below shows how the collider tab looks:

The "bone" field tells which bone this collider is attached to. The colliderType gives us the information about the shape of the collider. By default, all the colliders are box. There is a utility button called "Auto Size All" which will estimate the size of the colliders for you. Below is an example of this auto-sizing colliders feature:

Global Controller Tab

The Global Controller consists of control parameters, current and desired pose, limbs information and mass, kp, and kd values. They have been set to default values, however it can be changed to any value as per your requirement. From here you can adjust many properties that affect how the character will walk. The control parameters influence the body posture and gait. For a normal style walk it is not necessary to edit any of these values.The image below shows how the global controller tab looks:

Control Parameters

Terminology

Below is a summary of the Control Parameters that are available for you to adjust for your desired gait and walking style:

Stride Duration: The time duration for a complete walk cycle including two steps for bipedal characters.

Stance Leg: The leg that stands on the ground and supports the body.

Swing Leg: The leg that swings in the air to reach for the next landing spot.

Swing Phase of a Leg: The duration when the leg is a swing leg.

Stance Phase of a Leg: The duration when the leg is a stance leg.


Trajectories

All trajectories are 6-point spines specifying a periodical function during the locomotion. The period of all the trajectories is the Stride duration except that the period of SWING_XXX_XXX trajectories is the swing phase duration and the period of STANCE_XXX_XXX trajectories is the stance phase duration

Some trajectories are specified with one base value plus a 6-point curve that is an "offset" to be added to the base value.

DESIRED_HEIGHT / DESIRED_HEIGHT_TRAJ: The desired height of the root bone of the character

BFRAME_LEAN_FORWARD / BFRAME_LEAN_FORWARD_TRAJ: The root bone's forward leaning angle around the Right vector of the character

BFRAME_LEAN_SIDEWAYS / BFRAME_LEAN_SIDEWAYS_TRAJ: The root bone's sideways leaning angle around the Forward vector of the character

SPINE_TWIST / SPINE_TWIST_TRAJ : The average spine bone twist angle around the Up vector of the character

SPINE_SLOUCH_FORWARD / SPINE_SLOUCH_FORWARD _TRAJ : The average spine bone bending forward angle around the Right vector of the character

SPINE_SLOUCH_SIDEWAYS / SPINE_SLOUCH_SIDEWAYS _TRAJ : The average spine bone bending sideways angle around the Forward vector of the character

SWING_FOOT_HEIGHT_TRAJ : The height trajectory of the swing foot during swing phase

SWING_ANKLE_ROT: The swing ankle rotation trajectory around Right vector of the character

SWING_TOE_ROT: The swing toe rotation trajectory around Right vector of the character

STANCE_ANKLE_ROT: The stance ankle rotation trajectory around Right vector of the character

STANCE_TOE_ROT: The stance toe rotation trajectory around Right vector of the character

STEP_TARGET_INTERPOLATION_FUNCTION: The 6 ordered samples points (i.e. [0, 0.2, 0.4, 0.6, 0.8, 1.0] or [0, 0.1, 0.2, 0.5, 0.7, 1], etc.) in the swing phase duration from [0,1] that provide direct control over the spacing between the 6 values in SWING_FOOT_HEIGHT_TRAJ, with each sample point mapping to the corresponding value. These sample points are not required to have identical spacing.

For further details on each of the control parameters, please refer to them below:

  • stride duration: The time it takes to cycle though the 6 animation positions.
  • desired height: How high the root is from the ground.
  • vforce kp forward: Force that will move model forward.
  • vforce kd forward: Dampening on forward movement.
  • vforce kp coronal: Force that will move model sideways.
  • vforce kd coronal: Dampening on sideways movement.
  • vforce kp vertical: Force that will hold model up.
  • vforce kd vertical: Dampening on vertical force.
  • vforce ff vertical weight percentage: "feedforward" percentage is a way to use the "past" to predict the "future" to stabilize the locomotion. Here is the % of past used to be "averaged into" the future vertical virtual force that is used to hold the body frame in desired vertical position at desired vertical velocity. This is mainly used to quadruped. The angle between ankles and feet sometimes need to be animated to have natural fore leg landing animation. Only effective for certain dog legs.
  • step width: How far the feet are spread apart.
  • step forward offset: How the feet are center under root.
  • swing foot vforce kp: There is a virtual force used to keep the foot to track the desired "trajectory" of the foot height. The virtual force is generated by internal torques of joints. It is not a cheating "external force". If you feel the feet are not tracking the desired ground clearance trajectory (see the "foot height trajectory" parameters) you can increase this value.
  • swing foot vforce kd: Damper to the above virtual force
  • swing foot max force: Max magnitude clamper for the above force.
  • front left leg swing start: Where in the stepping cycle that the front left foot animation begins. The phase in the cycle when the front left foot starts to "swing"
  • front left leg swing end: Where in the stepping cycle that the front left foot animation ends. The phase in the cycle when the front left foot end the "swing" and land on ground
  • front right leg swing start: Where in the stepping cycle that the front right foot animation begins.
  • front right leg swing end: Where in the stepping cycle that the front right foot animation ends.
  • rear left leg swing start: Where in the stepping cycle that the rear left foot animation begins.
  • rear left leg swing end: Where in the stepping cycle that the rear left foot animation ends.
  • rear right leg swing start: Where in the stepping cycle that the rear right foot animation begins.
  • rear right leg swing end: Where in the stepping cycle that the rear right foot animation ends.
  • step target interpolation function: A curve to control how close the foot height trajectory is followed. A linear curve basically follow the original foot height trajectory. You could make it a slow start foot tracking and a fast catch up towards the end of the cycle by a non linear curve here
  • grf regularizer: ground reaction force regularizer. The QP solver tries to optimize a set of ground reaction forces that not exceed maximum friction and still satisfy the needs from the full body gait tracking and other virtual force requirements. This regulaizer controls how much weight to give to the goal to constrain the grf within max friction force.
  • max contact points per foot: The max contract points per foot is used by QP solver to solve for ground reaction forces to keep the creature balanced and not slip. The higher the number the slower the simulation but better balance control.
  • rotation friction kd: The artificial anti-rotation friction generated at the feet. This helps to reduce foot gliding on the ground when only a single contact point exists between the foot and the ground.
  • gyro ratio: Holds model level at the root.
  • stand still threshold: How slow forward movement before foot step animation stops playing.
  • early swing terminate: Footstep animation terminates on ground contact and starts other foot animation.
  • late swing terminate: If no foot contact, time to wait before other foot animation plays.

The latest additional phase the swing foot will remain in "swing" state if it fails to touch ground as expected. 0 means the swing foot will enter stance phase even if it hasn't hit the ground as expected. 0.5 means the swing foot remain in swing phase at most 0.5 of the cycle when it doesn't touch ground.

There are two utility buttons to help auto-scale the parameters for you. The button "AutoScale Params" does the auto-scaling for the values. If you wish to go back to your previous values, the button "Descale Params" can be used to descale them back to previous values.


In the next section, let's look at what we can do with this mapping and how we can use this in the Game Engines.