No announcement yet.

Inverse Kinematics (freeIK) [beta 2]

  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    This loops over and over:

    Leave a comment:

  • replied
    That's weird, I didn't notice this kind of behaviour. I've tested it extensively for the last half an hour and it failed to assume correct direction only once - when I dodge-jumped right through the middle of a test mesh. And that could be easily fixed by increasing solver's accuracy.
    Can you provide a screenshot (or better a couple of screenshots) of what happens? I assume the log shows nothing? (it can't show anything, it really couldn't be caused by some accessed nones...)

    Leave a comment:

  • replied
    Originally posted by Farseer View Post
    If by "twitchy" you mean that the meshes in the test map don't move smoothly - then yes, it's normal.
    I mean that they freak out all over the place. Sometimes they'll nicely follow me at 0.1 second intervals, at other times they'll flail every which way.

    Leave a comment:

  • replied
    awesome tried to think of somthing constructive to say but i think awesome covers it

    Leave a comment:

  • replied
    If by "twitchy" you mean that the meshes in the test map don't move smoothly - then yes, it's normal. I was just too lazy to implement some interpolation mechanism in this release, so the bones are updated only when calculations occur (every 0.1 second by default). The animations of the test mesh are crappy as well, but they were only prepared to show that the system works with animated meshes.

    How it is done? The IK-part itself is really simple - most appropriate rotation for each bone is found by a method similar to gradient following - just a couple of dot and cross products. Look up the code, it's pretty clear.
    The hard part was to apply this rotation to the real bones in a skeletal mesh. This is done by refering to bone's individual coordinate system and the coordinates of its parent. The functions responsible for that weren't really written by me - credit goes to matariel from BU forums. It's a funny story btw, that guy already made a functional IK-solver about a year ago, just didn't released it. I found his thread on BU when I was searching for a way to convert those calculated rotators to bones' rotations, talked to him a little, and now it's very likely that you will soon see two sets of IK-solvers released - his and mine

    PS. I tried to apply IK to pawns in ordinary gameplay. And kinda realized it's completely useless, unless you try to stand on a slope and stare at your character in tpp. Otherwise the subtle adjustments done by IK aren't really noticeable in the middle of a firefight. So the IK-pawns mutators has been (temporarily) cancelled, I will work on an interpolation system instead. Features list updated.

    Leave a comment:

  • replied
    Never say no to free inverse kinematics!

    Awesome work. How did you do this? I wouldn't have known where to begin.

    It's a bit... twitchy in places. Is that normal?

    Leave a comment:

  • started a topic Inverse Kinematics (freeIK) [beta 2]

    Inverse Kinematics (freeIK) [beta 2]

    Name: freeIK (Inverse Kinematics system for UT2004)

    Version: Beta
    Compatibility: UT2k4 + latest patch (3369)
    An universal IK-solver for UT. This version is mainly a test, although it can already be used to achieve many interesting effects. If you want to use it for your custom vehicle/monster/whatever just read the instructions included in the pack. It's completely free (hence the name), just drop me a pm or post here, so I know what cool mods it can be used for.

    Current features:
    - IK-solver adjusting a chain of bones, so that the last one (the tip) constantly touches a specified point. This point can be set dynamically by overriding GetTarget() in subclasses of the solver. Clear and simple.
    - Blending with animations. The solver can take the animations into account and therefore adjust the bones of a fully animated mesh. However it's also possible to make a fully IK-driven movement by providing some calculated positions for legs for example.
    - Two methods of rotating the bones - multi-directional or hinge-like. See for yourself and choose what you like.
    - Handy debug-display, showing the calculated positions of bones, along with the target.
    - Interpolation functions to lower the IK-calculations rate - it's not necessary to go through those performance-costly algorithms every tick - interpolation will ensure smooth movement between the cycles.
    - FULL NET SUPPORT. freeIK works in netplay now.
    Features planned for the next release (when? in two weeks):
    - Rotational constraints (so the knees don't bend backwards).
    - Adjusting the tip bone to a specified normal (think: foot on terrain).


    matariel for advises on how to convert global rotations to bones and for some very helpful bits of code.
    Epic for the engine.
    me for the code, test map, test vehicle etc.

    -freeIK - get the basic IK-solvers and full source code here.
    -IK tests - and here's a test map with a couple of meshes and examples on how to use the system.