Results 1 to 2 of 2

Thread: Fish IK

  1. #1
    Super Member khalid's Avatar
    Join Date
    Aug 2003
    Location
    Kingdom of Bahrain
    Posts
    358

    Fish IK

    Hi all,
    I have been trying to create proper IK for the last day or two, I always end up with the wiggly effect, plus it snaps at sustain points, well I got tired finally and I think I probably have done everything wrong, Does anyone have a better concept on were is what!! can you check the scene file with the bones and IK and tell me what to do to improve!!
    Thanks for your support,
    khalid
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,844

    Forward IK may be easier, or MathMotion

    If you're trying to make a bone chain move in both directions around its rest position, forward IK may be easier. I've never had much success avoiding the "snap" in IK chains for snake/fish/wave type motion. There may be a trick to it, but I don't know what it is. In other words, just position each bone using keyframes to make the tail move the specific way you want.

    I tend to use MathMotion for specific, smooth motion. For example, setting up a fish-tail chain with 5 bones works pretty well with the following values for the Heading on each successive bone in MathMotion:

    Bone (1) = 0 (stable fish body)
    Bone (2) = 0.4 * sin( (f + 0) * 20 * 3.141 / 180.0)
    Bone (3) = 0.5 * sin( (f - 20) * 20 * 3.141 / 180.0)
    Bone (4) = 0.6 * sin( (f - 40) * 20 * 3.141 / 180.0)
    Bone (5) = 0.7 * sin( (f - 60) * 20 * 3.141 / 180.0)

    The leading multiplier (0.4, 0.5, etc.) can be increased or decreased to change the magnitude of the wave at each bone. In this case, the value increases for each subsequent bone to give the "flip" at the end of the tail, while closer to the body has less angular variation.

    The "f" is the frame number, and the subtraction from it (0,20,40,60) causes the wave to propogate down the tail. The value subtraced can be increased or decreased to slow-down or speed-up the wave motion down the tail.

    The "20" multiplier determines the speed of the wave, and is a divisor for 360. In other words, a value of 20 means a complete cycle of the wave will occur in 18 frames (360 / 20). A value of 1 would mean the complete cycle is 360 frames. A value of 10 would complete a cycle in 36 frames. The same value must be used for all equations to make the wave propogation smooth.

    The "3.141 / 180.0" is just converting the degrees calculated from the frame into radians for compatibility with the sine function.

    mTp

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •