# Posts tagged ‘Spline-Ik’

I’ve been looking into curves for quite awhile now, along with waves and dynamics eventually hoping to combine all three. Along with these ive been trying to understand the rules of rigging especially layer and hierachal rigging. A lot of riggers i know dont undestand the idea of ‘layers’ in a rig. In simple terms its like a layer in photoshop but in rigs it free up a lot of issues if you keep aspects of a rig to a layer – so for example your base skeleton could be your first layer, then basic setup then twist, then deformation. So its more like layered relationships – deformation is a good example. If we can modularize deformation in a simple system we can use it all over the place.

Major deformations like  skin simulation are outside of this, but twist, stretch, compression and bulge could be driven by one system. If we treat this system as a curve the issue arises is that its not uniform so control objects along it would bunch up so we need:

• A simplified curve, that possibly introduces horners rule (for speed)
• Uniformity across the curve (important if the tangent vectors are straight)
• The ability to overshoot the curve at both ends* (-0.5, 1.5)

*Why do we need this, well basically to allow for length between the points along the curve to be maintained, for example if we dont want the curve to compress the points along it need to overshoot the curve. This can be pretty simply acheived using a subdivision method. To keep a value at the same value i.e a length of 10 along the curve, all we do is divide this length by the curves length eg. 10/100. = 0.1 10/200 = 0.05. Problem comes in if the length of the curve is shorter than the defined length the ‘bucket’ inwhich t resides wouldnt exist. So you need to do some fiddling around. I’ll post some links accompanying this post.

So Ive been away on vacation over the past two weeks in beautiful Montreal (an amazing city). I had time to think about rigging, ways to break it up and what it is at its heart: intergrating systems.

Rigging can be regarded as modular in one sence and choatic in another. It can also be though of a group of systems that interact with each other in simple and hybrid types of ways. There are three main ‘Driven Systems’ at its heart:

Kinematic – the animator drives the rig with keyframes, purely controlling the puppet and f-curves

Procedural – the animator drives values which adds automatic driven motion, the wave if you will doesnt however have to be procedural and handmade in a fourier synthetic way.

Dynamic – the animator drives controls in which there ‘children’ act in a physically based way. The controls themselves could also act dynamic.

Theses are the bases, but many hybrid versions of these can be combined, waves driving dynamics for instance. A rig should only support this if its really really neccesary – we need to understand what a rig needs. At its heart is what the animator wants, especially interms of control. But we can also make our own assumptions and give some basic rules in constructing a rig:

1. A rig is a series of systems.

This can be a hard idea to understand, but if we treat a part of a rig as a system than a series of joints (more of an outwardly looking in analysis), we can work out what we need. A good example is a tentacle – because were are treating this entirely as a system – e.g. a splineIK base with a layer of FK controls. The tentacle is treated as a whole unit and this is how we should look at it when rigging. Lets break it down:

A tentacle that needs to be fk, dynamic, driven and procedural – we’ll first off we can pair these together fk/procedural and dynamic/driven as a system. By doing this we can see that the fk/procedural can ‘ride’ the dynamic driven system. And this dynamic driven system itself can be treated as one: A dynamic chain solution that rides a bezier spline based on tension, and a fk procedural system that rides this in tern.

A tentacle is essentially an easy example as we regard it as unit, but can this be the same for a wing, leg or even spine? A spine or torso can be summed up as three independant units that are glued together either or additionally by a positon or a main control. It can be regarded as a system. A wing is essentially an arm, that feathers ride along and intern have dynamics (air resistance etc)

I thought of a new character pipeline tool today. It would be essentially split into two part: Main character and hands – and would work complete differently to tools on the market, including the ones i use at work which I cant say anything about. Eventually it would support quads, birds etc all predefined but very very simple and fun to setup.

SplineIK Rules:

SplineIK essentially comes in three distinct flavours,

Chain Stretches

This means the chain stretches across the entire length of the spline from end to end. even if the spline gets shorter.

Chain Aproximates

This means the chain doesnt stretch, but the bones  aproximate there position along the spline -they find there average to spread evenly across the length.

Chain is fixedThe Length of the chain stays fixed no matter how long or short the chain gets. – This is by far the most complicated setup as it needs to know how much to compensate for when the length becomes too short.You could regard ‘fixed length’ as a constant option of all three. It could be a base control of the spline itself i.e. never get shorter than its defined length. This could be an option of the rig. In all three setups the longest length can be anything – it’s how the bones run along it that’s key. Whether they stretch, approximate or stay fixed in length – the one caveat of the fixed length setup is that compensation of the length is essentially mandatory. It can’t get shorter than its defined length else it will crumple. Unless you cross breed setup e.g. it compresses, or it approximates the new shorter length.

This is good and bad – in one case the rig doesn’t break, its automated. But in another the setup is two beasts now, changing on the fly. For an animator this could be a headache. You could have three setups, but when and how do you do the blends? Mixing three very unique setup could have horrid results – In the end it’s a balance what does the shot need plus having the option to change it when necessary.

Ive had change of heart, essentially animatable pivots are pointless. As a flashy rigging setup for your reel, there great. But in rigging and animation they dont work- additive affect and counter rotation fixes makes them pointless. So heres an updated version of my ground rules:

1. Independant hip control, that doesnt affect the chest.
2. Independant chest/neck control that doesnt affect the heads orientation.
3. Independant head control, thats orientated to the root/torso control.
4. Shoulder controls that are orientated with the chest, but dont control the orientation of the arms – allowing for shrugging.
5. IK/FK arms/legs with natural hand/foot. This means if the controls move further than the ik the legs/hand naturally peels away (in ik mode)
6. Knee/elbow controls
7. Foot/toe control
8. Heel/Ball of foot left/roll
9. Ball of foot twist eg. stubbing out a cigerette.
10. Finger curl control & independant digit control

*8 & 9 using the same control object.

For quads this is essentially the same, but front foot lock is needed to allow for unlocking during the passing position.

The head is important, as it deals in two transform spaces, its parented to the chest bone, but orientated to the root. So as you twist the upper torso it stays locked. The neck stays with the chest -this is important else it would get crunched. This both fixes the issues of blending the head between a look at and orientation, as general movements of the root it stays with but the upper torso it stays locked.

To John: Ontop of this the three bone spine is perfect candidate for a skin pipe, essentially building a nurbs or custom spline ik system ontop of it. The animator doesnt need to see this but the skin rig can and it could inherit average rotations from the the 3 bones. The arm twist could be added as part of the skin rig to.

One way for this is to do a frame by frame pass at the end of the animation, work out the twist range and bake it into the skinning rig. This essentially would defeat gimbal as its looking at the average on a frame by frame basis.

Stretching rigs, bend bone, length, curvyness next.

A lot of people ask me what goes into a rig? – This really isnt a question you should be asking but rather what does the character need to do?. There are however a certain set of key features most rigs have and need, bar all the stretch and even twist setups:

1. A method to control the entire torso.
2. A method to control the upper torso.
3. A method to rotate/move the hips independent of the torso.
4. A method to rotate/move the chest independent of the hips and head.
5. Shoulder controls
6. FK/IK arms and legs
7. FK foot controls
8. A method to rotate the foot at the heel, ball and toe.*

Extras:

1. Animatable pivots
2. Curl controls on fingers, pose tool etc.

*I generally have an expression that drives the entire foot roll – its an important feature to have, as for quick lifts etc it’s neccesary. Eg walking up a ladder. I also introduce ‘Natural Foot’ which allows the foot to ‘peel’ off its controls, if it reaches to far.

From developing  40 or so rigs for my last company, we came up with a pretty solid rig splitting the torso into two parts: ‘Torso’ and ‘Upper Torso’ – Torso essential drives everything from the pelvis up. With Upper Torso driving the head, neck arms and chest.

The need to lock the head either by a target or just its orientation is crucial too – personally I still like to be able to move/rotate the head with the torso and upper torso controls, including a  blend to lock the head when needed.

With skinning you need to introduce twist bones, these essentially can be as many bones as you want. Valve with HL2 introduced ‘interpolator’ bones at elbows, shoulders, knees etc, to aid skinning.