Home > Graphics > IK and Pathing

IK and Pathing

This next demo shows off IK working with the animation system and some simple pathing. If you read the post below, the IK in this demo was implemented simply enough as a node, whose input is a goal position, the end effector, and the animation node we’d like to combine IK with. The IK also implements constraints and priorities, however, I personally am quite inexperienced at determining the constraints for a human body. For the pathing I allow the user to define walking positions, however, I use a cubic spline space curve to make the motion look smooth. The cubic spline is continuous, minimizes curvature, and is guaranteed to path through all the walking positions; it makes a great candidate here. One problem with the cubic spline is that as total distance along the spline is nonlinear with the interpolation parameter, therefore I used a look-up table to sample the cubic spline with a distance, rather than an interpolation parameter. For efficiency, I only break up the cubic spline in areas that that experience more curvature (IE straight parts of the cubic spline don’t need to be broken up). To make the animation of the character look a lot better I synced up the animation pace with the character’s motion speed so that his feet would sync up with the ground. I also made sure the character locked to the ground by using a ray trace directly downward to the environment (the ray intersection is done using an accelerated SAH KD-Tree that was preprocessed by the FBX exporter). Here’s a video of the demo:

Categories: Graphics Tags:
  1. No comments yet.
  1. No trackbacks yet.