Saturday, July 9, 2011

Rigging an Umbrella - The saga begins

In a spark of Friday afternoon creative motivation (or perhaps otherwise known as having had a few too many cups of coffee while enjoying a "lunch" out at Drexels), I decided to brush off my rusty rigging skills and try and rig up a simple umbrella.

The simple model I quickly whipped up. Nothing fancy here... move on, move on...

On one hand I thought, it would be a nice opportunity to check on the current state of rigging tools in Blender (and perhaps pick up some easy fixes to make as part of GSoC11). On the other, I was just curious to try and give this a go (having mostly done organic character stuff in the past, mechanical contraptions were something that I'd only done once or twice).

You may also be interested in trying out this exercise. In which case, skip reading the following until you've had a crack at it first :)

First up, I started taking a look online, hoping to find some diagrams detailing how the mechanics of the open-close mechanism worked. Alas, I only came away with a few simple diagrams labelling the different components involved (every time you do something like this, you always end up learning something... last time when having our kitchen redone, we learnt terms such as "toe-kicks", and the true ramifications of "to the ceiling" - something that the kitchen installers seem to be a bit reluctant about). Nevertheless, I did find some nice reference pics to compare my design against, making some tweaks to make it look even more like the umbrella I had in mind.

Thwarted, I finally trudged to the store cupboard, grabbed a real umbrella, and over to the nearest entranceway. Since it's winter here, it's no long so nice to stick your head out the door, let alone open the door wide so that you can poke an umbrella outside, opening and closing it repeatedly while observing the movements of the mechanism within. It was probably quite a weird sight for the neighbours, with a large red umbrella sticking out the door, being opened and closed repeatedly, as if trying to do some kind of morse-code signalling.

Performing this operation slowly, I observed how the various joints to moving in relation to each other, in particular, what causes that critical point where ribs go from being bent to straight. It was quite interesting watching how the parts all seemed to show a slight degree of flexing at some point or other (but not all at once), something which would actually be a bit tricky to replicate in 3d.


Replicating the movement of the "stretcher" pulling down the upper part of a "rib" as the "runner" moved downwards, slowly pulling that in from being slightly curved to being in a straight line tucked close to the shaft proved troublesome.

Early on, I figured that although I could get the result I wanted by hand-keying an Action Constraint for the exact trajectory that things should take, I wanted to avoid this approach, since such a mechanical system should conceivably be possible to replicate without needing to resort to such hacks. Besides, after setting this up for one rib, I'd need to be duplicating the setup a few times. With an action constraint, that means refining the keyframes a few more times, vs just copying and repositioning the rig setup.

First attempt - nth iteration
An early setup I tried involved a combination of tracking/stretching constraints, combined with some Limit Distance magic involving some "helper" controllers.

As can be seen in the second pic, there are two small helper bones moving on the shaft above the runner - those were weakly copying the movements of the runner to provide some additional points that could be used to reign in the point where stretcher and rib meet (without these, the rib really wouldn't have a chance of getting pulled in close enough).

However, the main problems I was having in this setup revolved around inappropriate stretching (note how top rib is stretching), but if the stretchto's were replaced with tracking, they would fail to converge appropriately.

Also note how there's a pesky angle between the upper and lower rib bones - when closed, the umbrella shouldn't have this segmented, but rather in a single straight line. This I'm still thinking of ways to resolve.

The other main problem though, I believe I have managed to solve now (though I'd have to check carefully tomorrow). It's getting late here now, so I'll leave the story up to this point for now :)

No comments:

Post a Comment