criar minhoca blender

4
This issue’s question is answered by Bassam Kurdali, a freelance animator and director. He recently directed Elephant’s Dream, the world’s first open-source animation http://orange.blender.org F or a worm that just has to move a bit, simple methods suffice: for instance, just using a curve deform and moving the worm on a path is often enough. But if the worm is a central character, it may need to act: this means a more elaborate rig to give the animator better control over the mesh, while keeping to the toony ‘worminess’ of our hero. The first reaction most people have to the word ‘rigging’ is to slap an armature on to the character and start painting weights. While this works for many situations, it’s far better to start by considering the problem at hand before deciding on the tools needed to solve it. Since our worm is essentially one long tube, it seems ideal to use a curve rather than bones to deform it. In this tutorial, we’ll start from there, then build on top of the curve, finally adding discrete controls for each aspect of the worm’s motion. We’ll use an armature as an elegant way to tie all the controls together. Users of other software might use discrete objects as controllers. In Blender, bones are better: they let you have multiple channels in one action, provide a rest position to go back to, and can be given customised shapes to look like any arbitrary modelled object. The downside is that you cannot simultaneously pose a bone within an armature and another object or armature, but this is a relatively small price to pay. Further advantages only become apparent in large projects, when armatures in referenced files can be proxied to animate the same linked character in multiple scenes. In this tutorial, we’ll attempt to show you some novel ways to use a combination of object parenting, constraints and modifiers for rigging, as we encourage you to think about character set-up in new ways. This isn’t a modelling tutorial, so we’ll begin with the worm_initial. blend file that’s included on this issue’s CD: The file has some meshes in it: the worm mesh and some pre-made meshes that will later act as shapes for the controller. However, you can model your own worm and use that instead, if you prefer. Q&A | xxxxxxxxxxxxxxxxx FOR Blender DIFFICULTY Intermediate TIME TAKEN One hour ON THE CD Full-sized screenshots Supporting scene files ALSO REQUIRED N/A FACTFILE Q &A SOLUTIONS / FIXES / ADVICE SOLUTIONS / FIXES / ADVICE Submitted by Claes Wim, via blenderartists.org QUESTION OF THE MONTH 062 | 3D WORLD 3D WORLD June 2007 BLENDER BLENDER “How can I rig a cartoon worm character?” TDW91.qa_lead 062 TDW91.qa_lead 062 4/4/07 10:34:05 4/4/07 10:34:05

Upload: douglas-duarte

Post on 27-Jun-2015

67 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Criar Minhoca Blender

This issue’s question is answered by Bassam Kurdali, a freelance animator and director. He recently directed Elephant’s Dream, the world’s fi rst open-source animation http://orange.blender.org

For a worm that just has to move a bit, simple methods

suffi ce: for instance, just using a curve deform and

moving the worm on a path is often enough. But if

the worm is a central character, it may need to act:

this means a more elaborate rig to give the animator better control

over the mesh, while keeping to the toony ‘worminess’ of our hero.

The fi rst reaction most people have to the word ‘rigging’ is to

slap an armature on to the character and start painting weights.

While this works for many situations, it’s far better to start by

considering the problem at hand before deciding on the tools needed

to solve it. Since our worm is essentially one long tube, it seems ideal

to use a curve rather than bones to deform it. In this tutorial, we’ll

start from there, then build on top of the curve, fi nally adding

discrete controls for each aspect of the worm’s motion. We’ll use an

armature as an elegant way to tie all the controls together. Users of

other software might use discrete objects as controllers. In Blender,

bones are better: they let you have multiple channels in one action,

provide a rest position to go back to, and can be given customised

shapes to look like any arbitrary modelled object. The downside is

that you cannot simultaneously pose a bone within an armature and

another object or armature, but this is a relatively small price to pay.

Further advantages only become apparent in large projects, when

armatures in referenced fi les can be proxied to animate the same

linked character in multiple scenes.

In this tutorial, we’ll attempt to show you some novel ways

to use a combination of object parenting, constraints and modifi ers

for rigging, as we encourage you to think about character set-up

in new ways.

This isn’t a modelling tutorial, so we’ll begin with the worm_initial.

blend fi le that’s included on this issue’s CD: The fi le has some meshes

in it: the worm mesh and some pre-made meshes that will later act as

shapes for the controller. However, you can model your own worm

and use that instead, if you prefer.

Q&A | xxxxxxxxxxxxxxxxx

FORBlender

DIFFICULTYIntermediate

TIME TAKENOne hour

ON THE CD• Full-sized screenshots• Supporting scene fi les

ALSO REQUIREDN/A

FACTFILE

Q&A SOLUTIONS / FIXES / ADVICE SOLUTIONS / FIXES / ADVICE

Submitted by Claes Wim, via blenderartists.org

QUESTION OFTHE MONTH

062 | 3D WORLD3D WORLD June 2007

BLENDER BLENDER

“How can I rig a cartoon worm character?”

TDW91.qa_lead 062TDW91.qa_lead 062 4/4/07 10:34:054/4/07 10:34:05

Page 2: Criar Minhoca Blender

In Side View, right-click to select the mesh, type [Shift]+[S] (Snap Menu) and select Cursor > Selection to place the 3D cursor. Go to Add > Curve >NURBS

Curve, select the two middle points, delete, select all (press [A]) and subdivide twice ([W] > Subdivide). In Curve Tools press Endpoint U, hit [Tab] and name the curve ‘spine’. In Curve and Surface, untick Back and Front; tick 3D and CurveStretch.

01At the same location, add a lattice and scale up by 3 on the Y-axis (by pressing [S], [Y], [3], [Enter]): this makes the length the same as the curve. Scale

down in cross-section until just about bigger than worm (by pressing [S], [Shift]+[Y]). Change the lattice resolution for better deformation to U: 23, V:3 and W:3. Name the lattice ‘wormcage’.

02In the Modifi ers panel, add a Curve modifi er with the name of the curve in the Ob fi eld. Similarly, add a Lattice modifi er to the mesh pointing at the lattice.

Now editing the curve deforms the mesh. (Make sure you undo these edits.)

03

STAGE ONE | Setting up the curve

Rotating the curve rotates the up-vector. To animate this, we need to parent the curve to a bone. In Side View, snap the cursor to the middle seg bone. Hit

[Tab], then [Shift]+[A] to add a bone. Name it ‘twistfi x’. Press [Tab] again, then select the curve and parent it to this bone. Bring up a Transform panel, and lock the bone to only rotate on Z. Verify it works.

07In the Buttons panel, press [F7] or Object Buttons; then, in the Draw panel, select Drawtype Wire and Draw Extra X-ray. Go back to Editing Buttons ([F6]).

Select each seg bone and give it the mesh ‘Wsball’ in the OB: fi eld: this will make all those bones look like the pre-made wire-ball mesh. Do the same for bone ‘twistfi x’ and object ‘Wstwistfi x’. Put twistfi x on armature layer 3.

08Let’s make some rotational controls. Edit the armature, and add a bone. Snap its tip to the middle segment and its tip to the fi rst segment. Name it

‘head’, then subdivide it (press [W] for the menu). Do the same for the tail, but name the bone ‘tail’ instead. Now parent each segment to the head or tail bone it lies on. (Bones on boundaries can go either way.)

Select the curve and hit [Tab] to go into Edit Mode. Select the fi rst point by the head and press [Ctrl]+[H], then select Hooks > Add, New Empty.

Select the next point in the curve, and repeat the same operation until each point is controlled by an empty. As an optional step, try improving the Empty Drawtype as shown.

04In Object Mode, add an armature at the same location as the mesh. Move the tip of the bone down a bit, then select the bone and name it ‘seg’. Move it

(press [G]) to the location of the fi rst empty. Press and hold [Ctrl] to snap to grid and complete the move. Duplicate and move the bone until you have one seg bone per empty. Use cursor snaps to be exact.

05Put the armature in Pose Mode ([Ctrl]+[Tab]). Select each empty, [Shift]-select its bone and press [Ctrl]+[P] (Make Parent To > Bone). Finally deselect the last

empty ([Shift]+double-click), then move the newly created bones around. Hit [Alt]+[G] to Clear Location. Do the same in Top view, and you’ll see some bad twisting: this is due to the points going through the curve’s up-vector.

06

09

Rigging using curves | Q&A

June 2007 3D WORLD3D WORLD | 063

STAGE TWO | Getting hooked

TDW91.qa_lead 063TDW91.qa_lead 063 4/4/07 10:34:164/4/07 10:34:16

Page 3: Criar Minhoca Blender

We want our worm to be able to twist its head, tail and middle independently: go into Edit Mode in the armature and add a chain of bones along the worm’s

main axis, as shown in the image above. Use cursor snaps and subdivision as before. It’s best if the joints lie roughly on lattice points. The joints represent the neck, middle and tail. Name them ‘twist’, ‘twist.001’ and ‘twist.002’.

10In Pose Mode, make all three bones Hinge bones, and the long ones six-segmented as shown. Select the lattice and press [Tab]; click on New to add two

vertex groups, for twist and twist.001. Assign points to each group by selecting points in the viewport and hitting Assign in the Vertex Group buttons. (Each group should have exactly the same name as its bone.)

11Add an armature modifi er to the lattice, and use the little arrow to move it above the curve modifi er. Untick Envelopes and enter the name of the

armature in the Ob: fi eld. To twist the worm, rotate one of the twist bones on its Y-axis. (For safety, lock all other transforms on these bones.)

12

To make ‘on model’ controls, fi rst create three parent bones. Select the Armature, hit [Tab], and add bones snapped at the head, middle and tail as shown.

Name them ‘aimhead’, ‘aimmid’, and ‘aimtail’. Parent each to its closest seg bone: go to Pose Mode, and assign a Track To constraint to the ‘aim’ bones, with the target being the adjacent seg bone. (Select ‘seg.001’ bone, [Shift]-select ‘aimhead’ bone, [Ctrl]+[Alt]+[C], repeat for the other two.)

13Hit [Tab], add a new bone, and make it horizontal. Name it ‘twister’, and then duplicate it twice. Move each twister bone to the same location as the

previous three bones, and parent them to the ‘aim’ bones. Press [Tab] and lock all transforms but the Y rotation. Add a Copy Rotation Constraint as shown from each twist to twister bone. Finally, place the twist and aim bones on a hidden bone layer.

14To add squash and stretch, we need another lattice: duplicate the original lattice and scale it up slightly in cross-section ([S], [Shift]+[Y]). Remove the curve

modifi er on the new lattice, and decrease the U resolution to 5. Name it ‘wormsquash’. Go into Edit Mode and delete both vertex groups. Add a lattice modifi er to the fi rst lattice, between the Armature and Curve modifi ers. In the Ob: fi eld, type ‘wormsquash’.

15

Create a new bone at the head of the armature and move it to armature layer 3. Switch visibility to that layer, then align the bone with the main axis of the

worm. Name this bone ‘scaler’. Go into Pose Mode, and lock all its transforms except the X and Z scale. Select ‘wormsquash’, press [Tab] and create a new vertex group called ‘scaler’. Assign all points to it.

16Next, we’ll add the ability to squash the centre of gravity of the worm towards the tail or head, with local squash and stretch. To do this, select the

armature and go into Edit Mode. Create two bones - one at the head of the worm pointing to the middle, and the other at the tail, pointing to the middle. Name them ‘squash’ and ‘squash.001’, and parent them to ‘scaler’.

17Create a new bone in the middle; move its tip down to distinguish it. Name it ‘midbone’. Press [Tab] and add a Stretch To constraint, targeted at this bone

on both ‘squash’ and ‘squash.001’. Select the lattice ‘wormsquash’, go into Edit Mode, delete the VGroup ‘scaler’ and add two new groups: squash and squash.001. Assign them all the points corresponding to each bone.

18

STAGE TWO (Continued) | Getting hooked

064 | 3D WORLD3D WORLD June 2007

Q&A | Rigging using curves

STAGE THREE | Controls plus squash and stretch

TDW91.qa_lead 064TDW91.qa_lead 064 4/4/07 10:34:254/4/07 10:34:25

Page 4: Criar Minhoca Blender

066 | 3D WORLD3D WORLD June 2007

Q&A | Rigging using curves

We want moving the armature object to move everything along with it. To accomplish this, parent the lattices and the mesh to the armature object.

First, select the armature – hit [Ctrl]+[Tab] to exit Pose Mode, select the mesh, [Shift]-select each lattice, then fi nally [Shift]-select the armature. Now hit [Ctrl]+[P] and select To Object from the menu.

22

Finally, we need to clean up the scene. Select everything except for the shapes for the bones – those wire-only meshes with names beginning with

‘WS’ – and press [Ctrl]+[G], then choose Add to New Group. Go to the buttons panels and rename that group to ‘worm’. This helps linking the worm into other fi les. It’s good practice to arrange objects in layers: place the mesh on layer 1; the

armature on layer 2; and the lattices, empties and curve on layer 3. Finally, open an Outliner panel ([Shift]+[F9]) and hide things the animator doesn’t need to see – the lattices, empties, curves and control shape objects. As a further exercise, try adding an armature modifi er to the mesh as the very fi rst modifi er (before the lattice), make some shapes and do some facial rigging – add eye movement and blinks to your rig. ●

24

STAGE FOUR | Adding animator controls

Cont

act u

s | S

end

your

Q&

A q

uest

ions

to 3

dw.q

anda

@fu

ture

net.c

o.uk

Now we’ll give the head twister bone a double duty by making it the uniform scale control. Select it, lock its Y scale transform, [Shift]-select scaler, and press

[Ctrl]+[Alt]+[C] to add a Copy Scale constraint. To be on the safe side, untick the ‘Y’ component of the constraint.

19For the middle control, we need a slightly more complex set-up. Create a new bone with its base at the tip segment, and base at the tail. Parent this to

the tail ‘seg.008’. Name it ‘tip2tail’. Add a new bone in the middle, then instantly press [G] and pull the tip down. Name this ‘cog’ (for centre of gravity) and make it a child of ‘tip2tail’.

20In Pose Mode, give ‘tip2tail’ a Stretch To constraint to ‘seg’. Then give ‘cog’ a Copy Scale constraint to ‘twistfi x’. (Any bone that doesn’t scale will do.) Now

give ‘midbone’ a Copy Location constraint to ‘cog’. In the Constraints panel of the Copy Location constraint, tick Local and untick X and Y. Lock the transform of ‘cog’ to just the Z translation.

21

Make the armature more user-friendly by assigning the animator bones shapes as earlier. ‘twister’ gets ‘WSYrotscale’, ‘twister.001’ and ‘twister.002’ get

‘WSYrot’, and ‘cog’ gets ‘WSarrows’. Move all non-animatable bones to hidden armature layers, so the animator sees only the animation controls, as shown in the image above.

23

TDW91.qa_lead 066TDW91.qa_lead 066 4/4/07 10:34:344/4/07 10:34:34