Spline IK issue

Hey,

i’m new to this forum and blender and in the middle of learning it. Coming from Max and Maya i’m familiar with concepts of rigging and so forth.

Right now the Spline IK in Blender gives me some headache. I was following this tutorial to set up Spline IK but having some issues setting it up correctly.

  1. As soon i apply the Spline IK to the bone chain (following the steps of the tutorial), the first bone in the chain seems to jump up a unit and its length is halved. This is a Problem cause it also affects the paranted Mesh. Now, i repeated the steps several times but get the same result. Please take a look at the picture below.


  1. Regardless of that described problem above, the chain follows the curve and i can rotate it in X and Z but the twist around the Y axis of the control bones is completely ignored. According to the article about Sline IK on blender.org this should work by twisting the control bone.

Are these bugs or did i something wrong here?

Hi SidV, welcome to the forums!

Best way to get help around here is to post a .blend file so someone can take a look at it. As a new user, your post count has to be above some magic number to allow you to do so under the ‘go advanced’ option. Thoughtful critique in the art work section is a good way to up your post count, think the magic number is something like 10…

In the pic you posted I’m seeing two orange dots, one at the 3d cursor, another off to the side. Those are points of origins for your bezier curver and your armature. They should be at the same location. In blender, you want your armature’s origin and your mesh’s origin to be at the same location, have the same scale & rotation or you can have problems.

You have a bone selected and the orange dot at the center is highlighted in your pic, so that’s the origin point of the armature object. The curve object’s point of origin is off to the side, you need to get that to match the armature’s. In the tool shelf (left panel in the 3d view) at the top is a button for origin, with the cursor at the origin of the armature, choose the option -> to 3d cursor. Remove the constraint before doing this! That while likely screw things up big time, so now is a good time to make sure the rotation and scale of both objects match. Ctrl-A will bring up a menu to apply scale, rot, loc, etc…

Now the curve should be all f#$!ed up, so fix that in edit mode for the curve getting it to line back up with the bone chain. Add the spline ik to the last bone in the chain and set it up. If this doesn’t fix it, then I’d need to look at the file.

As to #2, I can’t comment. I’d have to see the file…

hope this helps,
Randy

Thanks Randy, i actually didnt know that this orange dots represents pivot points. I must have made a mistake setting it up because after restarting blender and starting from scratch, problem nr.1 was gone.

Wich leaves me still with problem nr.2.

SplineIK.blend (505 KB)

Please take a look at this file. As you can see, the curve verts are hooked to control bones. I can grab them and move around, no problem. The curve however doesnt respond to any rotation by the control bones.

Ok, i figured it out the hard way why the hooked control bones didnt rotate the curve properly. In the tutorial i was watching, the guy set the bezier handles of the vertices to automatic. Changing that to Aligned solved my problem.

Anyway right now i try to figure out how to implement a smooth transition twist of the start and end bone of the Spline IK chain. Considering how long it took a moderator to aprove a post here, i’m sure i figured it out by then. This is not helpful at all dear moderators as i am in a learning stage with a lot of questions.

What do you mean by this? Are you talking the bone’s y-axis, along the length of the curve? Or x & y-axis? Can you upload a file showing what’s not lining up correctly?

Considering how long it took a moderator to aprove a post here, i’m sure i figured it out by then. This is not helpful at all dear moderators as i am in a learning stage with a lot of questions.

I know this can be a pain in the a$$, my first few posts took days to be approved, until my post count got above 10ish. Way down in the off-topic section of this forum, there are a few games, like ‘ask the person below you’ & ‘universal vending machine’ that you can post to, to up your count. Or Like I mentioned before, provide some feedback in the artwork/wip threads. Like I said, I know what you mean, but at the same time, it keeps our forum spam-bot free. Forum trolls still troll, nobody’s figured out a way to get rid of those a$$holes…

If you have to wait to have your post approved when posting a file, bypass that by visiting http://www.pasteall.org/
and on the right side, you’ll see 3 icons, middle one is for posting a .blend file. Post your file there, copy the url, and send it to me in a pm. To pm me, click on my user name and choose ‘private message’

Randy

Ok, here is what i got so far:

IK Spine

As you can see, the spine has 2 control bones. One for the chest, one for the hips. They both act independently to each other. Each Control got a scale tangents property to define the spine curve exactly you want.

The SplineIK chain is hooked to 2 empties and each empty is parented to a control bone wich have a custom property that controls the scale of the empties. Scaling the emptys scale also the tangents of the curve and define the shape of the SplineIK chain.

You have a few problems. Grab the chest controller and move it, but don’t release the left mouse button, instead click the right one. That cancels the transform and the controller will return to it’s original position, but the spline bones don’t return. Problem, yes? :confused:

Select the armature and in object mode, tab into edit mode and tab back out. Check the console window for error messages. On a win machine, top header, window -> toggle system console. You have a cyclic dependency going on there, or several, I didn’t look that closely at the messages. I think it’s a problem with the way you are mixing things.

Just now, I was looking at your rig, and didn’t realize what the chest and hips controllers are. They are separate armature objects. In blender, all your armature controls need to be in 1 armature object. More than 1 control armature object will not work while animating. Trust me on that one, workflow wise it will be a major road block…

Rather than sort thru what you have, I decided to start from scratch on a rig with a splineIK spine.

Randy

Edit: Look up b-bones, they are like bezier bones. They can curve and you can control the blending at joints. Don’t know why I didn’t think of them before. I guess because you were asking splineIK. They can take the place of splineIK and generally are used is squash & stretch rigs.

B-Bones are unfortunately no solution for this as they require a strict hierachy and therefore you just end up with another FKspine. Correct me if i’am wrong.

The point is to have 2 independant controllers. Beside the refresh issue you can pose and key it however you want. I dont see a major road block here Randy. Even tho the system console throws out dependency loops.

I found this here in the help files about Bones-on-Curves spines and this issue is well known.

    The design requires the use of outside objects, and can have refresh issues.

Have a try and throw in some keys.

OK SidV, sorry I haven’t got back to this yet.

B-Bones are unfortunately no solution for this as they require a strict hierachy and therefore you just end up with another FKspine. Correct me if i’am wrong.

This I will have to explore and think about. I will say this: all stretchy/bendy rigs I have seen use b-bones, and they all have been created before splineIK was added to blender.

The point is to have 2 independant controllers. Beside the refresh issue you can pose and key it however you want. I dont see a major road block here Randy. Even tho the system console throws out dependency loops.

The road block here is when you move into animating. Ideally it’s best to have all animation controllers be contained in 1 armature object. When animating, you’ll be working in the dopesheet editor to lay down initial keys, secondary keys, etc… At some point in time you might move into the f-curve editor to tweak the animation curves for final polish. Dopesheet has 4 modes: dopesheet mode shows all keys in the scene, camera movements, object movements, armature keys, etc… The GreasePencil mode - skip this. Shapekey mode is for mesh shapekeys. It has all the keyframes for shapekeys on mesh objects, or morphs - think of a ball that you animate the verts to squash as a hand grasps it. Action mode is for working with armatures, all your poses of the rig and keyframes exist here.

In the action editor you see all the keyframes for the current armature. If you are using more than one armature to control the rig, as you switch from one rig to the other, only the current rig’s keyframes are displayed. So if you want to move keyframes for more than one rig, it can be a pain. Move keys for one rig, select other rig, move keys… Sure you could do this in dopesheet mode, but then you have other keys not needed, like camera keys. yes you can filter that stuff out, but why filter it out if you don’t have to by using 1 control rig?

The example you posted is outdated. It’s from before the 2.5x re-write and improvements to blender. At that point in development there was no dopesheet to view all keys. Moving keys to adjust timing would have been a nightmare with that rig as in that you couldn’t move all keyframes at the same time.

Anyhow, took me some time to come up with this, but I’m using 2 armatures and 2 armature modifiers on the same mesh and they are working. It uses 1 control armature and 1 spline ik armature. 2 armature modifiers on the mesh. Each armature modifier is set to work on a vertex group, ‘armature’ or ‘splineIK’ groups on the mesh. Then each bone has a vetex group that controls it. It works decent. The splineIK chain has copy rot constraints targeting the chest and hip controllers at varying levels of influence to handle twist.

I say it works, it’s not perfect. For some reason, I am encountering problems with weight painting the vertex groups. I have to explore what my problems are.

From what I know, if it were me. I think I would use 1 armature as a deform armature, and 1 rig as a control rig. The deform rig would have all the splineIK chains (cause I think you want a few) and other mesh deforming bones. Then the control rig would be keyframed and control the deform rig.

Anyhow, I’m interested to see what you might come up with…

Randy

Attachments

rig_test.blend (628 KB)

Nice to hear from you again. I see you got rid of the refresh issue by using 2 armatures. Only thing missing would be the tangent controls to shape the curve. Right now you have to scale the control itself to adjust the tangets. I used empties for that. I didnt tried to implement it in your solution yet, but i come back to you on that. I have to admit, i didnt had a chance to dive into vertex group weighting yet. All i did so far was armature deform with automatic weights and adjusting the skin weights with brushes. So right now i dont fully understand it. One thing i noticed, somehow you managed to ‘zero out’ the control bones without the use of empties. How did you do that?

From what I know, if it were me. I think I would use 1 armature as a deform armature, and 1 rig as a control rig. The deform rig would have all the splineIK chains (cause I think you want a few) and other mesh deforming bones. Then the control rig would be keyframed and control the deform rig.

That was the initial plan. However, in the meantime i checked out rigify and i was amazed by the freedom of controls you have for the limbs. Hell, even elbow locks are possible. By checking out the IK-FK snap py scripts provided by rigify, i realised that you have to get deep into transform matrices to come up with my own solution and it would took me a lot of time to get into. Time i momentary dont have. Its not that easy i thougt it would be. In Maya or Max, all you have to do is something like this and you good to go:

FKcontrol.transform = IKcontrol.transform

I figured if i could somehow implement the IK Spine into rigify, the rig would be perfect for me as it got all features i had in my Maya and Max rigs. I dont know how complicated this would be, cause the setup is rather complicated and its hard for me figuring out all the relationships just by looking at the outliner(since there is no relationship editor available yet).

If you could help me with that, i would be more than happy. It doesnt have to be tomorrow cause i’m sure you and i have a life beside blender and on top of that i’m facing a new job opportunity that would take a lot of attention away from my private projects.

Let me know if you think its doable.