Flippin' bones

I am having problems with bones that flip when I move the IK target very close to 0 degree mark (or 90 or 180 degrees… I’m not sure what the reference is).

I’m animating a swimming whale shark - with it’s tail swaying from side to side. Here’s a preview:

All works fine - up to close to the “zero” point of the tail, when the following happens:

As I get close to the “zero” point, the tail’s orientation is:

On (and in close proximity of) the “zero” point of tail, it suddenly flips straight:

…and just after the “zero” point, it flips in the opposite direction:

I want the tail to move in a flowing motion in the one direction (and do the opposite in the opposite direction), as indicated in the diagram:

It should not go straight at the zero and then suddenly flip immediately afterwards.

I think that it has something to do with where the “zero” is, because I have similarly NOT had the same type of problem if the “zero” was defined elsewhere, but I cannot seem to put my finger on it.

(I’m sure that I am asking a question that has already been answered, but I did a search on the forum and looked at Wavez’s BSoD document - and could not find anything in there either.)

Can somebody help?

Thanks,

AnyMation

I think I managed to solve the problem 80%. (The reason it is not solved 100% is that I am still not able to get a DOUBLE-kink into the tail, as per my sketch above. But at least the tail does not jump around anymore.) For the sake of somebody doing another search in future, I’ll document it here. I did it by making another bone lower down point to a second target bone:


As normal, the top yellow bone targets the IK bone immediately above it. The other bone (second yellow one from the top in the picture above) now targets the IK bone on the far right. It therefore keeps the kink in the tail pointing towards that second IK bone.

When the tail crosses the “zero”, the second bone with the target still points towards the 2nd IK bone:

…and even beyond the “zero” point, it still keeps the kink in the right direction:

It keeps the kink even far beyond the “zero” - as long as you do not cross an imaginary line between the origin and the 2nd IK bone

This solution has the limitation that I have to get to a point in the animation where the tail is straight. The moment the tail becomes straight, I swap the 2nd IK bone around to the other side:

If I then drop the FIRST IK bone (for demonstration), the kink points towards that now-moved 2nd IK bone, which gives a good approximation of a fish’s tail movement.

If anybody knows how to get a DOUBLE-kink in the tail, I would appreciate that, because a THIRD IK target does not accomplish that :frowning:

AnyMation

Try turning on “Rot” on your IK constraint. This will help. You still will have flipping in some cases, so you need to key your extremes. But you can get the effect you’ve drawn in the diagram using the Rot option, which determines the rotation of the IK solver bone based on the IK target.

… I may have misunderstood the question. Hope this was some help.

the real problem here is that you are trying to use IK where FK is more appropriate. Get rid of that IK solver and manually key the rotation of each bone by hand. It will take longer, but the end result will be much better.

Btw, that model is gorgeous!

Thanks bugman & sketchy,

I opted for the FK yesterday afternoon and it works much better! I was hoping that one couild do it with IK - but trying with IK took a lot longer than FK in the end!

I’m trying to make the model quite realistic, including the “lens”-effect of the sun shining through the water - and it starting to look great. I may just post a thread somewhere for others to crit it.

Glad I could help. You could automate the animation a bit using an action constraint, if the tail is going to be making roughly the same motion repeatedly. There are some good tutorials about action constraints in these forums.

Looking forward to the finished project!

hehe, looks like this problem is solved, just wanted to second that gorgeous model comment- are you going to show the final anim?

Hi,

I’ve done the animation, but before I release it, I want to incorporate feedback I get from where I submitted the UV-mapped version on this thread.

To tickle your interest, here is one of the pictures from the above thread:

Looking nice.

For anybosy interested, I’ve now placed the animations here.