Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Better Mechanics

with
by S68
who, in the real word answers to the name of Stefano Selleri
www.selleri.org
selleri@det.unifi.it

29-07-2002 -> updated 01-10-2002

Introduction
My 4th tutorial. Background: there's plenty
of people doing mecha things, lately, a
lot of spiders in particular. Someone is also
on animating them (walkcycles etc.), and
this again is great... BUT...

But, many mecha I've seen (except few


notable exceptions) lacks a proper way of
moving the arms, no gears, no pistons,
well, at least not realistic ones.

The true drama comes with animation.


How do you animate a piston properly?
Well, here is my solution :).

The Arm
First step is to create the mesh for the arms. We are not here for organic, we are here for
mechanics. So no single mesh thing. The arm/leg/whatever is made of rigid parts, each
part is a single mesh, parts moves/rotates one with respect to the other.

Although cover image has


four arms, each of which
have 5 sections, it is clearer
to start with just a single joint
arm.

My suggestion is this, the


arm, on the left, made by
two equal sections, and the
forearm, on the right, made
by just one section. Note the
cylinders which represents
the shoulder (left) the elbow
(center) and the wrist (right).
S68 - Better Mechanics Page 1/1
The other cylinders in the middle of the arm and forearm are the places where the
piston will be linked to.

Note that it is much easier if


the axis of mutual rotation
(shoulder, elbow, etc.) are
exactly on grid points. This is
not necessary though.

Pivoting axes
Then add the mechanical
axes in the pivot points.
Theoretically you should add
one at each joint and two for
every piston. For the sake of
simplicity here there are only
the two axes for the piston,
made with plain cylinders.

Note two things:

1 - It is fundamental that the


center of the mesh is exactly
in the middle and exactly on
the axis of rotation of the
piston

2 - Each axis must be


parented to the pertinent
arm mesh.

The Armature
Now it is time to set up the
armature. Just a two bones
armature is enough.

Please note that, to have an


accurate movement, the
joints must be precisely set
on the pivoting axis (this is
why I told you to place such
axes on grid points before,
so that you can use the
Move Selected To Grid
feature)

Name the bones smartly (Arm

S68 - Better Mechanics Page 2/2


and Forearm, for example). Parent the Arm Mesh to the armature, selecting the 'Bone'
option and the Arm bone. Do the same with the forearm mesh and forearm bone.

If you switch to pose mode you can move your arm by rotating the bones. Nothing new
up here.

The Piston
Make a piston with two
cylinders, a larger one and a
thinner one, with some sort of
nice head for linking to the
pivoting points.

It is is MANDATORY for the two


pieces to have the mesh
center exactly on the
respective pivoting axis.

Place them in the correct


position and parent each
piston piece to the pertinent
mesh representing the axis.

If you now rotate the two


pieces in the position they
should have to form a
correct STILL image you get a
nice piston.

But if you switch to pose


mode and start moving the
Arm/Forearm the piston gets
screwed up...

S68 - Better Mechanics Page 3/3


A working Piston
To make a working piston you must make
each half pison track the other half's axis
mesh This is why the position of all the
mesh centers is so critical.

Select half a piston, select the other half


piston's axis mesh, press CTRL + T.

Beware, this might bring to very funny


results. You must experiment with the
various track button in the Animation (F7)
window. The buttons top left TrackX,Y...
and pay attention to the axis of the
meshes.

Theoretically I expected things to work by selecting the correct tracking axis, but this
proved false. Blender is funny sometimes. Sometimes you might have to rotate the mesh
180° after the track is set.

Remember also to press the 'PowerTrack'


button for a nicer result.

Now, if you switch to pose mode and


rotate your bones the piston will extend
and contract nicely, as it
should in reality.

My next issue now is, since


pistons work with pressurized
oil which is sent into them, for
a really accurate model I
should add some tubes (two
for each piston is best.

But how to place a nicely


deforming tube going from
arm to piston? The two ends
should stick to two rigid
bodies reciprocally rotating.
This requires IKA! Go to the
next section!

S68 - Better Mechanics Page 4/4


Adding a flexible tube
First add a mesh in the
shape of the tube you want
to model.

Personally I prefer to draw


the tube in its bent position
as a beveled curve.

This is done by adding a


Bezier curve, adding a
Bezier circle, and using the
Bezier circle as BevOb of
the Bezier curve. Then
convert that to a mesh (ALT
+ CKEY)

The image hereabove shows what I mean for tube.

Then add an armature. A couple of bones are enough.


This armature should go from the tube 'fixed' end to the
tube 'mobile' end. Add a third bone which will be used
for the Inverse Kinematic solution.

Be sure that the armature is parented to the object where


the 'fixed' part of the tube is, well, fixed. In this case the
robot arm.

Add also an Empty at the 'mobile' end of the tube.

Parent the Empty to the 'mobile' part of the structure. In


this case the outer part of the piston to which the tube is
linked.

In pose mode go to the 'Constrains' window (chain


icon).

Select the last bone, the one which starts from where
the tube ends, and Add a constrain. Select the 'IK solver'
type of constrains and Select the newely created Empty
as target Object 'OB:'.

You can play with Tolerance and Iterations if you like.

Lastly, parent the tube to the Armature via the 'Armature'


option. Now if, in pose mode, you move the arm, the two parts of the piston keeps
moving appropriately, and the Empty follows. This obliges the IKA Armature of the tube
to move, to follow the Empty, and, consequently, the Tube to deform.

S68 - Better Mechanics Page 5/5


Tube deformations can be unappealing. To make them better you can:

a) Work with weight/bone paint and Vetex Groups as if you were animating a living
body;
b) Resort to a very limited number of vertexes and use the SubSurf option.

Adding a Spring (the easy way)


Lots of mecha stuff has
springs... and in reality they
do deform!

So we would like to do the


same.

I will describe to ways of


adding a spring, an easy
and a realistic one.

Easy is, well, easy, fast and


less accurate. It works if
springs are thin and if they
do not extend/compress
much.

Add your spring, around the piston, for example. To


make a spring use the Screw tool... if you don't know
how to use the screw tool.. hey! This is an advanced
tutorial!!!!

Add a three bone armature going from beginning to


end spring. Add a last fourth bone, again for the IKA.

Note that the armature is much bigger than the spring and that I've done my best to
keep the first and last working bones as perpendicular as possible to spring axis.

Set the first and last Bone deformation distance to a value equal to the spring length.

S68 - Better Mechanics Page 6/6


Create a IKA constrains as for the previous case (That is, parent armature to the 'fixed'
end - here the left half of the piston - add an Empty where the 'mobile' end is, parent
this Empty to the 'mobile' end - here the right part of the piston, add an IKA constrain
from the fourth Boneto this Empty, parent the spring to the armature.

This way you'll have an extending/compressing spring:

Bad news is that spring gets deformed in an unappealing way, especially if it is thick. To
have better solution...

Adding a Spring (the hard way)


A slightly more accurate
approach... not perfect
anyway... is to follow the true
shape of your spring with
your armature. Four bones
for each turn are a nice
choiche.

The rest of the procedure is


the same. The Armature must
be parentes to the 'fixed'
object and the end IKA bone
linked with a constrain to an
Empty parented to the 'mobile' object. Results are better, even if not perfect.
Improvements can be achieved with weights and/or SubSurfing...

S68 - Better Mechanics Page 7/7


Conclusions
An overview of mechanical device animation has been presented. Soon to come:
Gears - how to make weel rolling the right way...

Happy blending!

S68 - Better Mechanics Page 8/8

You might also like