Leg Motor
Sunday, June 25, 2017 3:15 AMOverview
Leg Motor is a specialised motor designed specifically to animate 3 limb leg motion. This motor simulates an actual walking motion including the animation of the lifting and landing of the foot on a flat surface.
Installation Requirements
This motor requires 3 consecutive bones to be installed.
Sample
A character with 2 animation clips: walking and running. This demonstrates the functionality of the new Leg Motor using the Smart Ground algorithm.
Usage
Leg Motor usage is very similar to that of the IK Rotate Motor. You can grab the gui manipulation handle of the Leg Motor to make the 3 bones target a specific point. The leg will then simulate walking motion around the target point. Unlike the IK Rotate Motor however, the Leg Motor also simulates the lifting and landing of the base foot ( the last bone in the chain ). This allows you to animate realistic leg animation very easily.
The leg motion goes through the following phases:
-
Lift This is when the foot is off the ground
-
Lift to Land This is when the foot has contact with the ground and transitions from the Lift to Land state
-
Land The foot is in contact with the ground
-
Land to Lift The foot is lifted off the ground and transitions from the Land to Lift state.
Smart Ground Active Mode (Recommended)
The Leg Motor has a mode called Smart Ground Active. To turn on this mode, set the Animatable Property:
- SmartGroundActive Setting this property to 1.0 will enable the Smart Ground algorithm for the Leg Motor
When you first install a Leg Motor, this value is automatically set to 1.0 meaning it is active by default. We recommend using the Smart Ground Active algorithm where possible since it allows you to operate the motor much more easily.
The first thing you want to tweak after installing the motor is to change the smartGroundY property. Setting this value defines where the foot's floor is and the system will make appropriate adjustments to place the foot in the correct orientation:
In the above image, a virtual grey line denotes where the ground is for the foot adjust from the smartGroundY property.
The next 2 properties you will want to tweak are the liftAngle and landAngle properties. You set an appropriate angle for the foot when it lifts off from the ground in the liftAngle property. Similary, you set an appropriate angle for the landing angle in landAngle when it lands.
Without Smart Ground Active
If you want to use the motor without the Smart Ground Active algorithm, here are the properties to tweak:
-
liftTime and liftSpeed. This alters how soon and how quickly the foot lifts off.
-
landTime and landSpeed. This alters how soon and how quickly the foot lands on the ground.
In addition to that, if you want to make the foot assume a much closer state to the landing state at the start of the animation, increase the value of footPhase.
Animatable Properties
-
liftTime The time when the foot starts to lift from the ground. The higher the value, the later the foot lifts off. Values from 10 to 99. You should try a value of 50 first. Only valid without Smart Ground Active.
-
liftSpeed The time when the foot starts to land to the ground. The lower the value, the earlier the foot starts to land. Values from 10 to 99. You should try a value of 10 first. Only valid without Smart Ground Active.
-
landSpeed The angle the foot rotates to when in the land state. Values from 10 to 99. You should try a value of 10 first. Only valid without Smart Ground Active.
-
liftAngle The angle the foot rotates to when in the lift state. Values from -20 to 180. You should try a value of -120 first.
-
landAngle The angle the foot rotates to when in the land state. Values from -20 to 180. You should try a value of 0 first.
-
footPhase An offset value allowing you to shift both the lift and land times earlier or later. Values from 0 to 60. You should try a value of 30 first. Only valid without Smart Ground Active.
-
targetX This determines the x position of the target point.
-
targetY This determines the y position of the target point.
-
speed This determines how quickly the target point rotates around the ellipsoidal arc. Typical values are 0.5 to 3.0. Set a negative value if you want the motion to be in reverse. (Values to try: 0.1 to 5)
-
phase This determines what the initial position of the target point is on the ellipsoidal arc. (Values to try: 0 to 1)
-
width This determines the overall width of the ellipsoidal arc.
-
height This determines the overall height of the ellipsoidal arc.
-
scaleLeft This scales the left half of the ellipsoidal arc by a factor. For example, setting it to 2.0 will scale that portion by two times. (Values to try: 0 to 3)
-
scaleRight This scales the right half of the ellipsoidal arc by a factor. For example, setting it to 2.0 will scale that portion by two times. (Values to try: 0 to 3)
-
scaleTop This scales the top half of the ellipsoidal arc by a factor. For example, setting it to 2.0 will scale that portion by two times. (Values to try: 0 to 3)
-
scaleBottom This scales the lower half of the ellipsoidal arc by a factor. For example, setting it to 2.0 will scale that portion by two times. (Values to try: 0 to 3)
-
smartGroundActive Setting this property to 1.0 will enable the Smart Ground algorithm for the Leg Motor
-
smartGroundY The Y coordinate value of where the Smart Ground is for the foot to automatically place on. This is defined in world space coordinates.
-
smartFootScale How much to scale the end foot when SmartGround is active. Use this to fix unwanted intersections. Any value, this is a scale factor. A value of 1.0 is the default scale.
Static Properties
- Valid IK Angles This will limit the range of angles the chain of affected bones are allowed to pose with. You can select negative, positive or none.