View this tutorial (12 MB - PDF)

Transcription

View this tutorial (12 MB - PDF)
TUTORIAL 1: Dictyostelium - The Social Amoeba
The goal of this tutorial is to review the main aspects of Maya that were covered in the
introductory class. It is meant to cover all the basic categories: modeling, surfacing, rigging,
animation, dynamics, expressions, MEL, rendering and compositing.
The tutorial is composed of 3 separate scenes that depict a different phase of the life cycle:
1) Amoeba feeding
2) Amoeba aggregation
3) Slug migration
Each of these scenes will also offer a unique challenge and opportunity to review Maya’s different
sets of tools. You’ll also notice that I describe every step in detail in the beginning pages, but
progressively reduce the amount of detailed instructions assuming that people now have an
intermediate level and are familiar with Maya’s various UI elements and tools.
Scene 1 – Amoeba feeding
Summary: In this scene (check out the feeding.mov reference footage), we’ll model a simple
amoeba using a NURBS cone and then apply 3 blendshapes to morph its shape. The position of
the animated amoeba will then be keyed over time (both linear motion & then along a motion
path) - the tangents will be adjusted to achieve a pulsing migratory motion along a NURBS plane.
Next we’ll cover the ground plane with bacteria using instanced particles. We’ll use expressions
on goalU, goalV to place the particles on the plane, and then create a custom attribute to
randomize the orientation (rotation) of each bacterial instance on the ground plane. Finally we’ll
use the migrating amoeba as a collision object for the bacteria instanced particles and use the
particle collision event editor to have particles die on collision (this is to mimic the amoeba eating
the bacteria it comes into contact with). We’ll use a couple of point lights with shadows and
create basic shaders for each element in the scene (blinn with bump for the agar/ground surface,
phong with glow for the bacteria, and ocean shader for the amoeba).
Modeling & animating the amoeba
To create your basic amoeba shape, go to
Create -> NURBS Primitives -> Cone |
Options and ‘Reset Tool’ to get defaults. Drag
from the center of the grid and then up a bit to
create the cone shape (if ‘Interactive Creation’ is
on). By default, the model is actually two
NURBS surfaces: the cone shape itself and a
‘bottomCap’ (expand the hierarchy in the
Outliner). Tumble under the model, select the
bottomCap and delete it. Now with the cone
selected, go to the channel box and change the
number of spans to 2 (instead of the default 1)
– sections can remain at 8. Make the radius 1
and the height ratio 0.5 (see image on the right).
It will be convenient later on to have the pivot
point of this object at its base (for instancing
purposes), so switch to side view, press F to
The base shape for the amoeba is a NURBS cone with 8 sections
and 2 spans.
The pivot is edited and placed at the base of the cone. The model is
then grid-snapped to the origin and transformations frozen.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
1
frame the object, and press the ‘insert’ (PC) or
‘home’ (Mac) key to edit the pivot. Drag down
on the green vertical (y) axis manipulator and
position the pivot right on the base of the
cone (press ‘insert’ again to exit ‘edit pivot’
mode). Still in side view and with the move tool
activated (w), drag down while holding the x key
to grid snap the base of the cone to the origin.
Now Modify -> Freeze Transformations – all
the Translate and Rotate channels for the cone
should now be zeroed out (see image on the
right).
To round out the shape of the amoeba a bit,
RMB-click over the cone and select ‘Control
Vertex.’ Select the top vertex and drag it down
to the level of the row of CVs below it. Now
select that row of CVs (along with the top one
you just moved) and drag those to the level of
CVs below them (see image on the right).
Switch back to perspective view, press 5 to
enter shaded mode, and – under the ‘Shading’
drop-down - turn on ‘Wireframe on Shaded.’
Moving several rows of CVs down to round out the amoeba’s shape
Now to animate the shape of the amoeba, we’ll
duplicate the model several times, sculpt each
duplicate a little differently, and then apply all of
the duplicates back to the original model as
blendshapes. Let’s edit the shape of the base
model a bit before we begin – I would
recommend doing all of this in the top viewport
so that you don’t inadvertently move CVs below
the grid (only along the x and z axes). In top
view, switch to CV mode, select, drag, scale
groups of CVs to achieve the shape in the image
on the right. I would recommend stretching the
shape by selecting the 2 outer CVs for each
section (i.e. leaving the CVs at the center alone).
Now duplicate your base model (Ctrl-D) 3 times
and move each duplicate to the side. Repeat
the sculpting process with the CVs of the
duplicates (still in ‘top’ view).
When you are done modeling, shift-select all 4
models (starting with the duplicates and ending
with the original model – this last one should be
green, the others white, see image) and – in
animation mode – go to Create Deformers ->
Blend Shape | Options – Reset settings and
click Create. Hide all duplicates by selecting
them and Ctrl-H. Select your main amoeba and
in the channel box expand the blendShape1
node – you should now see, in addition to the
Envelope channel, 3 new channels
corresponding to the names of the duplicate
models (likely nurbsCone 2, 3, 4). Select one
The shape of the base model is modified before duplicating it and
sculpting blendshapes.
Blendshape models are sculpted and then selected (with the original
amoeba selected last) before creating the blendshape.
Amoeba model without (left) or with (right) 1 blendshape applied
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
2
of these channels and enter a value of 1 watch your amoeba assume the shape of that
blendshape (see image on the right).
Rename your amoeba ‘AMOEBA’ in the channel box. Let’s begin by simply animating the
migration of the amoeba along the x axis. Extend your timeline to 500 frames, make sure you’re
on frame 1, select the AMOEBA and, in the channel box, click on the Translate X channel,
RMB-click and “Key Selected” the value to 0 (channel turns orange when keyed). Now go to
frame 120 and set the Translate X to 5, and key the value. The amoeba moves as predicted but
has no internal motion – for this let’s key the blendshape values. Expand the blendShape1 node
in the channel box, select all blendshape channels and key their values to 0 on frame 1. Move to
frame 30, change the value of the first blendshape to 1, reselect all blendshapes key their values.
Move to frame 60, and key the first blendshape back to 0 and the second blendshape to 1 reselect all blendshapes key their values... Continue setting keys in this way alternating
successive blendshape values from 0 to 1 and back to 0 on frames 1, 30, 60, 90, 120. When
finished, marquee-select all the keys in the graph editor (Window -> Animation Editors -> Graph
Editor), and set them to flat tangents (figure below).
A summary of the amoeba’s motion – translate X values and amoeba positions (top), and keys (channel box and graph editor) set
on blendshapes at frame 0, 30, 60, 90, and 120 (bottom).
To introduce a little ‘pulse’ in the motion of the
amoeba, set keys on the translate x channel
at frames 30, 60, and 90 (frames 1 and 120
already have keys). With that channel selected,
in the Graph Editor, marquee-select all the
Translate X keys and set them to flat tangents
(image on right).
Default (top) versus flat (bottom) tangents applied to the keys set
Spring semester
on the amoeba’s Translate X channel.
advTutorial 1: Dictyostelium
Gaël McGill
3
Play your animation and notice that there is a
slight pause in the motion of the amoeba that
coincides with its transition from one blendshape
to another… this is, admittedly, a poor imitation
of the amoeba motion we see in reference
footage, but it does help give the illusion that the
cell’s movement is driven by the stretching and
contraction motions of its body.
We’ll now have the amoeba move along a
motion path. Return to frame 1 – select the
Translate X channel in the channel box, RMBclick over it and ‘Break Connections’ to remove
the animation (the blendshape keys/morphing
motion is still there though!). Go to Create ->
CV Curve Tool, and draw a curve that starts
roughly around the origin and slightly zigzags
down the x axis for 10 units (i.e. to the edge of
the grid). Use no more than 8 to 10 CVs and try
not to put too much curvature into your curve.
Now select the amoeba, shift-select the curve
and go to Animate -> Motion Paths -> Attach
to Motion Path | Options (reset the defaults) –
let’s study the settings for a minute... Our
previous linear animation test had a complete
blendshape ‘cycle’ while the amoeba moved 5
grid units over 120 frames. If we want to get the
same amount of cell morphing per distance
traveled as before and our curve roughly covers
10 grid units, we need the motion to occur over
240 frames (or 2 blendshape ‘cycle’
equivalents). So in the ‘Time Range’ section of
the motion path options window, switch to
‘Start/End’ and set the Start time to 1 and the
End time to 240. Now click ‘Attach.’
When you play the animation, the cell moves
along the curve but the morphing stops halfway.
This is because we’ve only keyed the
blendshapes up to frame 120 – it would be nice
to just tell Maya to repeat the cycle. To do this,
open the graph editor, and in the dropdown
menus in the upper left of the graph editor
window, go to Curves -> Post Infinity -> Cycle
and then go to View -> Infinity (see images on
the right). Notice the repeating dotted blue line
that starts after frame 120 in the graph editor. If
you play your animation again you’ll notice that
Maya is repeating (‘cycling’) the keys set on the
blendshapes all the way to the end of the motion
curve at frame 240 (and will continue to do so
indefinitely).
A NURBS curve is drawn from near the origin to the edge of the
grid down the x axis (with minimal curvature).
Settings for the creation of the motion path animation.
Default (top) versus flat (bottom) tangents applied to the keys set
on the amoeba’s Translate X channel.
We need to introduce the same pulsing motion
along the curve as we had before – with motion
paths, keys are automatically set for you on ‘U
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
4
value’ of the motion path node. Select the
amoeba and, in the channel box, expand the
motionPath1 node – notice the orange ‘U
value’ channel. Set keys on this channel at
frames 30, 60 and 90 and, in the graph editor,
select all keys and set them to flat tangents.
Adding a bacterial lawn and collisions
Create a NURBS plane and scale it roughly to
the size as the grid. After creation, in the
channel box, increase its U and V patches to 6.
There are multiple methods for getting particles
to appear on the plane – we will goal them (we
could also have had them emitted from the
surface). In the Dynamics menuset, go to
Particles -> Create Emitter | Options (Reset)
and click Create. Press play to confirm that you
have an omni emitter spewing particle points out
into the scene. Select the particle object and, in
the Attribute Editor (particleShape1 node),
change the particle Render Type to Spheres.
Click on ‘Current Render Type’ and lower the
Radius to 0.1. In the Per Particle (Array)
Attributes, click on the ‘Color’ button at the
lower right – in the pop-up window, check ‘Add
Per Object Attribute’ and click ‘Add Attribute.’
Go back to the Render Attributes section and
notice that Maya ahs now given you 3 new
channels for color (RGB) – set the particle to
Red (i.e. enter a value of 1) – this will make the
particles easier to see as we troubleshoot their
positions in space.
Select the particles, shift-select the NURBS
plane and go to Particles -> Goal | Options –
set the goal weight to 1 and make sure that
‘use transform as goal’ is unchecked. By
default, all the particles go immediately to the
NURBS plane’s CVs. In order to randomize
their position along the U and V of the plane,
we’ll need to invoke the goalU and goalV
attributes and write a creation expression for
each. With the particles selected, go back to
the Per Particle (Array) Attributes section in
the Attribute Editor and click on the ‘General’
button in the lower left. In the pop-up window
that appears, select the ‘Particle’ tab at the
top, and then select goalU form the list – then
click ‘Add’. With the window still open, repeat
the process for the goalV attribute. Both of
these attributes should now appear in the Per
Particle (Array) Attributes section. RMB-click
over the goalU line and select ‘creation
An omni emitter emits sphere particles.
Color is changed to red by adding a Per Object color attribute.
When the particles are goaled to the NURBS plane, they
automatically go to each of the CVs.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
5
expression.’ In the window that opens, type
the following expressions:
particleShape1.goalU = rand(1);
particleShape1.goalV = rand(1);
Click ‘Create’ in the bottom left of the window.
When the particles are first ‘birthed’ from the
emitter, these expressions tell Maya to assign
a random number between 0 and 1 to each
particle. Rewind and press play – particles
are now randomly positioned on the plane.
The goal is to produce a large number of
bacteria on the plane and then to shut off
particle production (bacteria will not animated
in this scene). To do this, rewind to frame 1,
select the emitter and in the channel box, key
the rate to 10,000. Set another key on frame
5 (still with a value of 10,000) and then set a
key on frame 6 with a value of 0. This
creates a rapid burst of particles that live
forever (due to default settings).
Now we’ll instance bacteria onto these
particles. First we’ll create a very simple
bacterium model – go to Create -> Polygon
Primitives -> Cylinder | Options. Depending
on whether or not ‘Interactive Creation’ is
checked, you can either drag and create the
cylinder, or one will appear by default at the
origin. The important thing is that you go to the
channel box and enter ‘on’ (or 1 – same thing)
in the ‘Round Cap’ channel and enter a value
of 4 for the ‘Subdivisions Caps.’ Also enter
a value of 8 for the Subdivision Axis – this
will reduce the weight of the geometry when it
is instanced on hundreds of particles. Size the
model proportionally so that it is roughly the
height of one of the red particle spheres. Now
position the model at the origin with its
length facing down the x axis. Now freeze
transformations on the model and delete
history (see image to the right). These steps
are important prior to instancing the geometry
and will help control the rotation of the
instances.
To instance the geometry you only need to
select it (not the particles) and go to Particles
-> Instancer (Replacement) | Options
(Reset) – click Create. You may not see the
bacterial instances because they are hidden
by the spheres – select your particle object
and switch its Render Type back to Points.
To add some random rotation to these
Adding a creation expression on both goalU and goalV attributes.
Particles randomly positioned on the NURBS plane.
Bacterium polygon cylinder settings and sizing relative to spheres
Bacterium ready for instancing… at origin, facing down x axis.
Bacteria instanced onto particles.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
6
instances we’ll create a custom attribute and
map the instancer’s Rotation attribute to it.
Select the particles and go to the Per Particle
(Array) Attributes section in the Attribute
Editor. Click on the General button and, in the
pop-up window, select the first tab (‘New’).
For the attribute name, enter
‘random_rotation’, make sure the Data Type
is set to Vector and the Attribute Type is set
to ‘Per Particle (array)’ – click Add and then
Close. Back in the Per Particle (Array)
Attributes section, RMB_click over the newlyadded ‘random_rotation’ attribute in the list
and add a Creation Expression to it. In the
expressions window, under the existing goalU
and goalV creation expressions, write the
following:
Creating a vector custom attribute and writing an creation expression on it
particleShape1.random_rotation =
<<rand(45), rand(360), rand(45)>>;
Click the ‘Edit’ button before closing the
window. This expression basically tells Maya
to pick a random number between 0 and 45
degrees for the X and Z rotations and a
number between 0 and 360 for the rotation
along the Y axis. This will orient the bacterial
instances with full randomness lying along the
plane, but with a little tilt ‘into’ the plane as
well. Before we see any difference, we need
to ‘map’ the instancer’s Rotation channel to
this new attribute: find a section of the
particleShape1 Attribute Editor called
‘Instancer (Geometry Replacement)’ and
expand it. Under the ‘Rotation Options’
select the ‘Rotation’ menu and in it you
should now find your ‘random_rotation’
custom attribute listed – select it. When you
rewind and play the animation, bacterial
instances should now be randomly arrayed
along the plane. You can always go back and
edit the values in your expressions to achieve
the look you’re after.
Finally, let’s have the amoeba collide with the
bacterial instances and have them disappear.
The first step is to have m collide: select the
particles in the Outliner, shift-select the
amoeba, and go to Particles -> Make Collide
| Options (Reset) – click Create. If you play
the animation you’ll notice that the bacteria are
popping over the surface of the amoeba as it
runs into them! With the particles selected, go
to Particles -> Particle Collision Event
Editor. At the very bottom of the window that
Mapping the Rotation channel of the instancer to
the newly created ‘random_rotation’ attribute.
Initial collisions between the bacteria and amoeba.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
7
opens (in the ‘Event actions’ section) check
the ‘Original particle dies’ checkbox and click
Create Event. This is pretty self explanatory
in terms of the behavior you can expect.
Rewind, play and you should now see the
amoeba leave an empty trail on the ground
anywhere it has been and ‘fed’ on bacteria!
The migrating amoeba now leaves an empty path on the bacterial lawn.
Lighting & surfacing the scene
Next we’ll add some very basic shaders and
lights to do some test renders. Let’s start by
creating a new camera: Create -> Cameras ->
Camera. In the Outliner, rename the camera
“RENDERCAM_01.” With this camera
selected, go to the viewport drop-down menu
and select Panels -> Look Through
Selected. Also go to the View -> Camera
Settings -> Resolution Gate (this will bring
up the borders of the image you would actually
render). Now tumble the viewport to position
the camera over the region that the amoeba
will be migrating (key the camera position)
Now let’s add a few lights: Create -> Lights ->
Point Light | Options (Reset). This will be
our ‘main’ point light – select it in the Outliner
and move it over the plane. In the Attribute
Editor, add a tinge of yellow to the light color,
set its Decay Rate to ‘Quadratic’ and up the
Intensity to ~20. Duplicate the light and
move it across the other side of the amoeba
path (see image to the right). Perhaps give
this light a tinge of blue instead and lower the
Intensity to ~ 5-10 (depending on how high or
close to the plane you decide to place it). For
the first light, expand the ‘Shadows’ section in
the Attribute Editor and turn on ‘Use Depth
Map Shadows.’ Up the resolution to 1024
and change the Filter Size to 8 (this will give
a nice little rim of darkness around the cell).
RMB-click on the NURBS plane and go to
Assign New Material -> Blinn. IN the Attribute
Editor for the Blinn that appears automatically,
change he color to a light brownish yellow. To
the right of the ‘Bump Mapping’ channel, click
on the black and white square to map a
texture to this channel – select Granite (#d
Textures) from window that appears. This will
take you straight to the bump3d1 node in the
Attribute Editor – reduce the ‘Bump Depth’ to
0.05 and take a test render (after playing the
animation for a few frames for the bacteria to
Basic camera and lights set-up
Assigning a new Blinn shader to the NURBS plane by RMB-clicking
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
8
appear). To apply a shader to the bacteria,
select the instanced model in the Outliner
(pCylinder1 if you haven’t renamed it) and play
the animation a few frames for the amoeba to
migrate off the origin – RMB-click over the
bacterium and assign a phong shader.
Change the color to a greenish hue, increase
transparency by ~ 25% and add little bit of
incandescence as well. Under the ‘Special
Effects’ panel, increase the Glow Intensity to
0.15. Take a test render and tweak to your
liking. Finally, to get an interesting look to our
amoeba without too much effort (detailed
surfacing is not the goal of this tutorial!), apply
a ‘Ocean Shader’ to the amoeba model. In
the Atttribute Editor, expand the Common
Material Attributes section and change the
Water Color from the default green/teal to a
redish purple. Add ~ 20% transparency, up
the refractive index to 3, add a little
Incandescence and Ambient Color, and up
the Translucence to 0.9.
To render a short sequence from this scene,
make sure to create a project (File -> Project
-> New) and save your scene. Open the
Render Settings (using the UI’s 3rd ‘clapper’
icon at the top or go to Window –>
Rendering Editors -> Render Settings).
Under the Common tab, switch the
Frame/Animation ext: to name.#.ext (this
will make available the start and end frame
fields etc below). Enter the range you want (1
to 240 for the entire sequence), leave by
frame to 1, and enter a frame padding of 3.
Make sure you set the Renderable Camera
to ‘RENDERCAM_01.’ In the Rendering
menuset, go to Render -> Batch Render and,
if you have set-up the project path correctly, all
the rendered images should appear in the
Images directory.
Settings for the Amoeba’s Ocean Shader
Final rendered frame
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
9
Scene 2 – Amoeba aggregation
Summary: In the wild, aggregation is usually triggered by unfavorable environmental conditions
(i.e. starvation). We are depicting scenes from the life cycle under laboratory conditions, so we’ll
mimic a typical experiment – the lowering of a pipet tip containing cAMP onto the substrate. This
induces a rapid aggregation response (see reference movies aggregation_01, _02, and _03). For
this scene, we’ll need many amoeba behaving dynamically – so we will want to instance them
onto particles. You can use particles to instance not only a still object (as we did with the bacteria
in the previous scene), but also an animated object (as in a blendshaped amoeba), or even a
series of multiple animated objects. The latter will give us the greatest variety in the look of the
field of amoeba, so we’ll set-up 3 different migrating amoeba with blendshapes. We’ll use the
blendshape targets we already modeled in the previous scene and change the order of targets
used.
To cover the plate of agar, we’ll use the same goalU/goalV technique from scene 1. Before the
cAMP aggregation trigger we want to have the amoeba behave as individual cells and avoid one
another – to achieve this we will use radial fields emitted from each particle (with a restricted
radius of influence i.e. a low ‘max distance’). We can lower the magnitude of that radial field
when aggregation starts and the cells need to overlap. How do amoeba actually aggregate?...
they migrate up a gradient of extracellular cAMP and in doing so also begin to form streaks of
aggregated cells (see reference footage). It is similar to a vortex effect, but not quite, so we’ll
need something a little more elaborate. We want distinct streams of cells to migrate both towards
one another and ultimately towards the center of the scene. So instead of just using a vortex
field, we’ll create a series of curves that radiate away from the origin (where the pipet tip will
touch down) and have radial fields emitted from each of the curves’ CVs. To attract local cells
that come close to these curves, the radial fields will have a negative magnitude – eventually, all
the cells will also be attracted to the origin by a ‘master’ radial field.
Creating a mini ‘library’ of asynchronously morphing amoeba
We’ll use the previous models from scene 1
as a starting point. Open scene 1 and, in the
Outliner, select and unhide the 3 duplicate
amoebas. Making sure you’re on frame 1,
select the main amoeba and its 3 duplicates,
and go to File -> Export Selection | Options
(Reset) – File type should be MayaAscii, and in
the ‘Include Options’ section, uncheck the top
checkbox ‘Include these inputs’ but keep the
bottom one ‘Include texture info’ checked.
Click Export and name your file
‘exported_amoeba.ma’ – open scene 2 and go
to File -> Import (Reset) and select the
exported amoeba file. They should appear in
the center of the scene as expected. A few
things to notice however: if you select each
model you’ll observe in the channel box that it
has no additional inputs (i.e. no history or past
animation – this is good) and also the main
amoeba is not exactly pointing down the x axis
or sitting at the origin (this is because of the
placement and orientation it inherited when the
motion path was applied). Make sure to reset
the main amoeba’s ‘Rotate Y’ value to 0 and
the Translate X Y Z values to 0 – it’s now
advTutorial 1: Dictyostelium
Gaël McGill
Selecting and exporting the existing amoebas and duplicates from
scene 1: export options keep texture information but remove any
animation (i.e. keyed blendshape or motion curve information).
Spring semester
10
sitting exactly at the origin facing down the x
axis (again, this is important for instancing
purposes later).
Rename the main amoeba ‘AMOEBA_1’ and to
apply the other 3 models as blendshapes as
in scene 1 (select the 3 duplicates, shift-select
AMOEBA_1, go to Create Deformers -> Blend
Shape | Reset). Select the 3 duplicates,
group them, rename the group ‘targets_1’
and hide the group. The idea is to keep the
same blendshape targets but to key the entire
blendshape ‘cycle’ differently so that we have 3
different morphing amoebas that differ in the
order of blendshapes they traverse during their
morphing cycle. Select AMOEBA_1 and go to
Edit -> Duplicate Special | Options (Reset).
Use the following settings: Group under ‘World’,
Number of Copies = 2, check ‘Duplicate input
graph’ and check ‘Assign unique names to
child nodes’ (see image on the right). The
most important concept here is the ‘Duplicate
input graph’ – this keeps the blendshapes on
each new amoeba but does not have them all
connected together. Had you checked the
‘Duplicate input connections’ instead, then
setting one blendshape channel on one amoeba
would automatically have changed the
blendshape on all the other amoebas as well.
Duplicate Special options
[If you really want to understand this, you can undo the
‘Duplicate Special’ operation (press Z several times until you
see the duplicated geometry disappear from the Outliner)
and repeat the operation with ‘Duplicate input connections’
checked instead. Test the effect by going to one amoeba
and changing the blendshape – all will follow!... not what we
want for setting up these different morph cycles.]
Before you proceed, rename your duplicates so
that you have 3 ‘main’ amoebas: AMOEBA_1,
AMOEBA_2, AMOEBA_3, and 3 target groups:
targets_1, targets_2, targets_3. Now key the
blendshape cycles for each of the 3 ‘main’
amoebas such that the order of blendshapes on
frames 1, 30, 60, 90, and 120 is different for
each one (i.e. no two amoebas will have the
same shape on any given frame). The key
combinations are mapped out for you in the
table on the right! Also, a few important things
to remember from scene 1:
1) Make sure to key all blendshape channels
at each of these frames (and not just the ones
that change – this will affect the ‘Post Infinity –
Cycle’ behavior in the Graph Editor if you don’t).
advTutorial 1: Dictyostelium
Gaël McGill
Renaming and organizing the Outliner
Table showing the combination of blendshapes keys required to
get a different amoeba shape on any one given frame.
Spring semester
11
2) When you are done setting all the keys, go to
the Graph Editor, select all keys and set the
tangents to flat.
3) In this longer scene, the amoeba will traverse
their blendshape cycle multiple times, so in the
Graph Editor, remember to set Curves -> Post
Infinity -> Cycle and View -> Infinity.
Amoebas will now morph asynchronously and continuously throughout
the scene with Curves -> Post Infinity -> Cycle in the Graph Editor
Check your animation: move AMOEBA_2 and
AMOEBA_3 to the side of AMOEBA_1 and play
your animation over several hundred of frames.
You should see the morphing continue (with
each cell assuming a different shape on any one
frame). Before we begin instancing, put
AMOEBA_2 and AMOEBA_3 back at the origin
(make sure all transforms are 0 0 0).
Creating a field of morphing amoeba
We’ll start with a basic NURBS plane for our
ground – make it roughly the size of the grid and
give it 6 patches in U and V. Increase your time
range to 1500. We’ll get particles to grow on the
plane using the same steps as in scene 1:
1) create an omni emitter – change the particle
render type to ‘blobby surfaces’ (radius to 0.1)
to get a better sense for particle behavior.
2) set the plane as a goal (particles go to CVs
with a goal weight of 1).
Blobby particles randomly distributed on a NURBS plane.
3) Add goalU and goalV attributes to your
particles and then write a creation expression
on those attributes to randomize the position
of the particles on the plane.
As before we’ll key the emitter rate over a few
frames to avoid overcrowding of the plane with
particles. At frame 1, key the rate to 2000 and
then drop the rate to 0 on frame 5.
Now we’re ready to instance the particles – shiftselect the 3 animated amoeba and go
Particles -> Instancer | Options (Reset).
Before you click ‘Create’ make sure you see the
3 amoebas listed in the ‘Instanced objects’ list
(see figure on the right). Notice that each
amoeba as a number or ‘index’ in front of it in
the list (index always starts with 0). Rewind and
play the animation – animated amoeba
geometry now appears on every particle but
you’ll notice that it’s only one amoeba (even
though you selected all three). This is because
advTutorial 1: Dictyostelium
Gaël McGill
The objects in the ‘Instanced objects’ list of the instancer window show
up in the order you selected them and are assigned an ‘index’ number
from (0 to n).
Spring semester
12
by default the Maya instancer grabs the first
object selected (i.e. the one with an index of 0 in
the instancer list). We’ll need to create a custom
attribute to instruct Maya to randomly select
among the three amoeba objects. Select the
particle and go to the Attribute Editor – find the
‘Add Dynamic Attributes’ section and click on
the General button. In the ‘New’ tab, name the
attribute random_index, make it a float, check
‘Per particle (array)’ under Attribute Type and
click Add and then Close. This new custom
attribute now shows up in the list of ‘Per Particle
(Array) Attributes.’ RMB_click on it and select
‘Creation Expression.’ In the Expression Editor,
write the following:
particleShape1.random_index = rand(3);
The number ‘3’ corresponds to the number of
instanced objects in the instancer list (the object
index begins with 0, but the rand function rounds
down, so ‘rand(3)’ will return values of 0, 1, 2).
Now that we have values of 0, 1, 2 being
randomly generated at birth and assigned to the
random_index attribute, we need to tell the
instancer to use this attribute to select objects
for instancing. Still in the Attribute Editor of the
particle object, find the ‘Instancer (Geometry
Replacement)’ section and expand it. Under
‘General Options’ go to the ‘ObjectIndex’ pull
down and you should find your ‘random_index’
attribute in the list. Rewind and play – you have
a variety of morphing amoebas!
The next thing to address is rotation of the
instances – this will be the same process as for
the bacterial instances in scene 1:
1) add a custom attribute (vector, per particle
array) – call it ‘random_rotation’
2) write the following creation expression on it:
particleShape1.random_rotation =
<<0,rand(360),0>>;
This will assign a random rotation to each
particle instance – but only along the y axis.
3) assign the ‘random_rotation’ attribute to the
instancer’s ‘Rotation’ pull-down menu (in the
‘Rotation Options’ section of the Instancer
section.)
At the end of the instancing process, you should have a random
selection of 3 asynchronously morphing amoebas, each with a random
orientation and lying flat on the substrate.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
13
Rewind and play. Before you move onto the
next section, rewind, select the 3 amoeba at the
origin and hide them.
Faking collision avoidance with instanced amoeba
In the early frames of this scene, we want the
amoeba to behave as individual cells and
therefore would like them to avoid bumping
into one another. We’ll fake this effect by
applying a radial field to each particle so that
any time they get close to one another, they
begin to repel.
Select the particle object, and go to Fields ->
Radial | Options (Reset) – click Create. (If
you rewind and play nothing will happen
because the goalWeight of the particles to the
NURBS plane is still 1). In the Outliner,
double-click on ‘radiaField1’ and rename it
‘radialField_amoeba_collision.’ Select the
radial field, shift-select the particle object and
go to Fields -> Use Selected as Source of
Field. Notice that the radial field is now
parented under the particle object in the
Outliner. One last setting is needed to get this
to work: select the radial field and, in the
Channel Box, find the ‘Apply Per Vertex’
channel – change this from ‘off’ to ‘on’ (can
also just type 1 in the field). This will ensure
that the field is being emitted from each
particle (or vertex if this is done on geometry)
in the particle object.
Playing the animation at this point will still
show you nothing because of the particle’s
goal weight of 1 to the NURBS plane. In the
Channel Box for the particles, let’s key the
‘Goal Weight[0]’ value so we can begin to
observe our collision avoidance behavior: set
it to 1 on frame 1, 1 on frame 10, and then 0
on frame 11. This way the particles are stuck
to their goalU/goalV values for the first 10
frames (while the emitter rate is keyed high)
and then loose their goalWeight and are
therefore free to be affected by fields starting
at frame 11.
The field is ‘emitted’ from the selected particle object
The radial field is now parented to the particle object in the Outliner
(left). In order for the radial field to actually emit force from each
individual particle (or vertex of geometry), the ‘Apply per Vertex’ channel
must be set to ‘on.’
Time to tweak the radial field and particle
settings to achieve the look we want… Several
aspects are going to influence the fake
collision behavior of the amoeba: on the one
hand, the Magnitude, Attenuation, and Max
Distance on the radial field, and on the other,
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
14
the Conserve on the particles. Magnitude is
self-explanatory – it’s the strength of the field.
Attenuation defines a fall-off over the area that
the field has an effect (influences the entire
area when set to 0 and has a strong fall-off
when set to 1). Max Distance (in scene units)
specifies the cut-off for the field’s ‘reach’ of
influence. In other words, if a particle is 5 grid
units away from a field that has Max Distance
set to 2, the particle will ignore it. However, if
the particle is within a 2 grid unit radius from
the field, then how strongly it is affected is now
determined by aspects like the field’s
magnitude and the attenuation. A critical
attribute is also the Conserve of a particle
object – this stands for ‘conserve momentum.’
With a conserve of 1 (the default value), a
particle that is set in motion by an emitter, field
or collision event continues to move
indefinitely. Conversely, with a conserve of 0,
the particle will only move as far as it is
‘pushed/pulled’ by a field and then stops.
Small changes in conserve can have a huge
impact on your dynamic simulations.
Position of amoeba between frames 1 and 10 (goalWeight is still 1).
For the each amoeba’s radial field, it is OK to
keep a magnitude of 20 and an attenuation
of 1 – however, the critical change is to lower
the max distance to something like 3 (the
actual value will depend on the size of the
object you have instanced). For the particle’s
conserve, a value of 0.5 seems to work well.
Note that this will not yield 100% collision
avoidance – the cells will spread out nicely
once the goalWeight is lowered to 0, but a few
may still overlap… we’ll just say that these are
in the process of undergoing mitosis ;)
Position of amoeba after frame 11 (goalWeight is now 0).
Scene overview & aggregation
For the next steps it’s important that we plan
the timing of the various events in the scene
carefully. We already have particle birth
happening between frames 1 and 5 (by keying
the rate of the emitter) and we have the goal
weight lowered to 0 at fame 11 so that the
particles are now controlled by surrounding
fields (not their goalU/goalV). Let’s have the
amoeba remain individual cells for the first 400
frames and, starting at frame 400, then begin
to aggregate until frame 1200. There will also
be different ‘phases’ in the aggregation
process between frames 400 and 1200, but
let’s begin by finishing the amoeba behavior
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
15
for the first 400 frames. To get the amoeba to
still move around a bit during these frames, a
simple trick might be to transiently increase
the goalWeight again (in order to ‘pull’ them
back slightly towards the goalU/goalV
positions they were born with). Key the
goalWeight[0] value to 0.3 at frame 200, and
then back to 0 at frame 400 – observe the
resulting behavior. There are many other
things you could do to the amoeba during
these first 400 frames, but this slight slide in
position will suffice for our purposes.
It’s now time to create an ‘aggregator.’ As
noted earlier, to get closer to the observed
aggregation behavior of amoeba, we’ll create
a series of curves that each have radial fields
emitted at their CVs – these should ‘pick up’
and attract nearby amoeba (i.e. fields will have
a low max distance) and cause streaks of
aggregated cells. These streaks will
subsequently be drawn to the origin by a
‘master’ radial field that affects all particles in
the scene (high max distance).
5 curves (with 6-7 CVs each) are drawn radiating from the origin..
Rewind the scene and, in top view, create 5
NURBS curves that radiate roughly from the
origin (each curve should have no more than
6 or 7 CVs). Once they have all been
created, select all 5 curves and switch to
component mode (F8) – select the 5 central
CVs and delete them (see images on the
right).
Now create a radial field (default creation
options) and, in the Channel Box, change its
Max Distance to 5. We have 5 curves so we’ll
need one radial field per curve: duplicate your
radial field 5 times. You’ll then need to repeat
the following procedure 5 times: select a radial
field, shift-select a curve and go to Fields ->
Use Selected As Source of Field. And then
go to the channel box for each field and set
the ‘Apply per Vertex’ to ‘on.’
The CV closest to the origin is deleted on each curve.
You now have 5 parented radial fields – we
will be keying their magnitude during the
course of aggregation… but it would be nice
not to have to key the magnitude channel on
each of the 5 field! Instead we’ll create a
‘master controller’ attribute that drives the
magnitude channel for all 5 fields (so we’ll only
need to key one channel).
Radial fields to which ‘Use Selected as Source of Field’ has been
applied are now parented to each curve.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
16
Create an empty group node (Create ->
Empty Group) and rename it
‘curve_RADIAL_CONTROL‘ in the Outliner.
With this group selected, go to the Channel
Box and, under the ‘Channels’ drop down
menu at the upper left of the Channel Box, go
to ‘Add Attribute’ (towards the bottom) – this
bring up a familiar window! Name the attribute
‘mag_master_controller’, make it a float,
scalar and press Add and Close. This
attribute now shows up at the bottom channel
of your empty group in the Channel Box.
Select the attribute by clicking on it, and then
RMB-click over it and select ‘Connection
Editor.’ Your empty group (now renamed
curve_RADIAL_CONTROL) and all its
attributes should be loaded in the left-hand
panel. In the Outliner, select the first radial
field and click on ‘Reload Right’ button at the
top of the Connection Editor window. Now
you want to find and select your custom
attribute ‘mag_master_controller’ on the left
panel, and find and select the radial field’s
‘magnitude’ attribute on the right. By
simply having both selected in that window,
they are now connected. With the Connection
Editor window still open, select each of the 5
curves in the Outliner (click on ‘Reload Right’
every time you select a new one) and link the
‘mag_master_controller’ to the magnitude.
When you are done, check your work: in the
Channel Box, enter a value of 88 in the
“mag_master_controller’ channel an now
select a radial field and you should see it’s
magnitude automatically set to 88… magic!
Now let’s key ‘mag_master_controller’:
Frame 1, magnitude = 0
Frame 400, magnitude = 0
Frame 500, magnitude = -10
Frame 800, magnitude = -5
Frame 1000, magnitude = 0
The idea is to have it turn on early during
aggregation (when the amoeba are attracted
to the curves) and then progressively shut
down as the principal aggregation force
becomes a central radial field (which we have
yet to create). Before we see any effects on
the particles, we need to connect these fields
with the particles. Go to Window ->
Relationship Editors -> Dynamics
Relationships. Select the particles on the left
and, in the Fields section on the right, click on
all 5 radial fields (see image on next page).
An empty group node in the Channel Box (left) and adding a custom
attribute to this group (right).
‘Add attribute’ window with creation settings for ‘mag_master_controller’
(left), and the new attribute at the bottom in the Channel Box (right).
Invoking the Connection Editor from the Channel Box (left) and
connecting the ‘mag_master_connector’ attribute to each of the radial
fields’ magnitude channel (right).
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
17
Finally, let’s also add a little bit of spin to the
curves so that the aggregation streaks rotate
slightly as they attract cells. Select all 5
curves, group them, and then rename the
group ‘aggregation_curves.’ On frame 1,
key the group’s Rotate Y channel to 0, and
on frame 1200 key it to a value of 120.
Before we test the scene, let’s adjust and key
the magnitude of the amoeba’s ‘repulsive’ field
so that it is strong early in the scene, but then
diminishes as the curve ‘attractive’ fields bring
the cells together. Select the
‘radialField_amoeba_collision’ field that is
parented to the particles and key the following
(empirically-derived) values:
Connecting the new fields to the particles using the ‘Dynamic
Relationships’ window.
radialField_amoeba_collision:
Frame 1, magnitude = 20
Frame 500, magnitude = 20
Frame 650, magnitude = 5
Frame 800, magnitude = 0
Play the scene! Not bad – but we’re missing a
final draw towards the center. Create one last
radial field – this time, in the creation dialog
window, set the Attenuation to 0.5 and make
sure that the ‘Use max distance’ checkbox
is off. We want this field to have an effect on
the entire grid of amoeba (hence turning off
max distance completely). Rename it
‘radialField_aggregation’ and connect it to
the particles using the ‘Dynamic
Relationships’ window. Set the following keys
on the magnitude:
radialField_aggregation:
Frame 1, magnitude = 0
Frame 800, magnitude = 0
Frame 1000, magnitude = -3
A final quick trick to make the aggregation
result a little more realistic… as the amoebas
form a single aggregate during the final
frames, there is clearly no volume
conservation! You can increase the Scale X
Y Z of the 3 instanced amoebas slightly
towards the end so that the aggregate
appears a little bigger (for example key the
default value of 1 on frame 1000 and enter a
value of ~1.8 on frame 1200).
Finally, let’s build and animate the pipet tip. In
‘side’ view, draw a curve and revolve it around
the y axis (see image to the right for the curve
profile and end model). You can play the
Progression of amoeba aggregation
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
18
animation a few frames to get cells onto the
plane and then adjust the scale of the pipet tip
according to the cell size. The animation
simply involves keying the position of the pipet
tip such that it is out of the visible frame at the
beginning, touches down onto the substrate
shortly before the aggregation begins (i.e. ~
frame 400) and either stays on the substrate
or leaves (perhaps ~ frame 650).
For basic lighting/surfacing, you can use a
similar set of point lights as in the previous
scene. The agar surface can also be the
same (yellow/brown blinn with a small granite
bump). Try applying an anisotropic shader to
the pipet tip (with a slight blue color, ~75%
transparency, and adjust the specular angle
and Fresnel index to get the highlight you want
coming off the point light). Because we
imported the amoeba model with texture
maintained, it still has the ocean shader from
scene 1. For this scene, a cute trick to use is
to make sure the transparency of this ocean
shader is high enough (~50%) so that the
blobby particles are visible through the
instanced amoeba geometry. Add a simple
(blinn) shader to the blobbies, increase their
incandescence and add a little shader glow (in
the Special Effects’ section). This is a really
way to get a glowing nucleus to show through
for each amoeba (particles are already there
after all, so might as well use them in
rendering as well!).
There are many ways to improve this scene –
mainly by adjusting all the attributes on the
multitude of fields and particles that drive the
aggregation process. We have barely touched
on lighting/surfacing as well. Adding even
more randomization and organic motion to the
amoeba could be achieved with additional
and/or different blendshapes, as well as
offsetting frames on which the various
amoebas arrive on a blendshape target. All
amoebas in the current scene have keyed
blendshapes on the same frames (1, 30, 60,
90, 120) for ease of set-up and explanation varying these frame intervals would add some
nice variation.
* Final tip: trying to render the final frames of the scene
with MANY overlapping amoeba (each with the ocean
shader with high transparency) pretty reliably crashes
Maya. A quick and benign workaround is to key the
transparency of the ocean shader down over the last
frames – this actually gives the aggregate an interesting
change in look towards the end (and saves your render)!
Modeling the pipet tip with a NURBS revolve operation.
Positioning and animating the pipet tip.
Mid-aggregation render
Late-aggregate render (ocean shader transparency is keyed down!)
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
19
Scene 3 – Slug migration
Summary: After aggregation (but before fruiting body formation), the aggregated cells migrate as
a single entity called a pseudoplasmodium (also called a grex or ‘slug’). A slug can contain
anywhere from a few hundred to one hundred thousand cells – these amoeba have been ‘called
in’ within a one centimeter radius of the aggregation site. In the wild, slugs are thought to migrate
for several hours and are typically guided by light (see phototaxis.mov), humidity and temperature
(they are extremely sensitive to small temperature differences). Slugs are polarized – they have
anterior and posterior cells - and can only move forwards. They lay down a cellulose sheath
(secreted by anterior cells) that acts as a ‘sleeve’ through which they move – this sheath
collapses in the slug’s wake and makes it easy to tell where it has migrated on a Petri dish.
For this scene we’ll assume that all the cells are already aggregated into a single entity and
therefore we’ll use geometry (a smoothed polygon cube), instead of instanced cells, to create the
body of the slug. Take a look at the reference footage (slugmotion_01) to come up with ideas for
how to rig the slug motion... it is actually quite a complex motion! The anterior part of the slug’s
o
body thins out as it extends in the air at ~45 angle (while the posterior is dragged forward), and
then the anterior collapses onto the ground and starts over. We will try to address these different
aspects and focus on animating a single ‘cycle’ of motion (after which it can just glide along the
ground for a bit - as seen in the other reference footage slugmotion_02). We’ll model a ‘thinned’
version of the slug and apply it as blendshape to the original. Then we’ll create a skeleton and
skin the original slug to it – so we’ll have both joint control and blendshape control over the body
shape. We’ll use a curve path and spline-IK to animate the skeleton. The curve itself will also be
animated – we’ll control a few CVs with clusters. We’ll also apply a lattice to the whole animation
for additional body deformations as it migrates. Finally, we’ll create a ground of blobby particles
and parent a uniform field to the slug so that it creates a trail of ‘depressed’ particles as it moves
along the ground.
Modeling and rigging the slug
We’ll model a slug that is as simple as
possible – start by creating a polygon cube
(1.5 units in X, 1.5 units in Y, and 8 units in
Z, centered at the origin). With default
settings, smooth the cube a few times (Mesh
-> Smooth | Options, reset). You get a
‘blimp’-type shape that is not exactly what we
want. Undo the smoothing and let’s introduce
a few edge loops to affect the smoothing
operation – in ‘side’ view, go to Edit Mesh ->
Insert Edge Loop Tool, and insert an edge
loop at both -2 and 2 units in Z along the slug
body. Now smooth the geometry – the overall
shape looks better. Smooth it one more time
so that you have a model with 896 faces (to
check this, select the slug model and go to
Display -> Heads Up Display -> Poly
Count). Rename the model ‘SLUG” in the
Outliner.
Let’s make a ‘thin’ version of the slug for a
blendshape. Delete history on the slug,
duplicate it, and move the duplicate to the
side a bit. Rename the duplicate ‘thin_slug’
advTutorial 1: Dictyostelium
Gaël McGill
Few divisions along the z axis yield to unsatisfactory smoothing results.
Spring
semester
Edge loops are inserted (bottom image) for better
smoothing.
20
and apply a lattice with X, Y, Z divisions of
2, 2, and 5. RMB-click over the lattice and
select ‘lattice point’ – select the points in the
anterior and scale them down a bit. Continue
to sculpt the thinned version (refer to the
image on the right). Once you have the shape
you want, select the duplicate and delete
history on it (the lattice will disappear). To
apply the duplicate model as a blendshape on
the original, select the duplicate, shift-select
the original and go to Create Deformers ->
Blend Shape (defaults). Hide the duplicate.
In the Channel Box and under the
blendshape1 section for the SLUG model,
check that you have a channel entitled
‘thin_slug’ – change the value to 1 to test your
blendshape. Set it back to 0 before
continuing.
To rig the ‘SLUG’ model, switch to the ‘side’
orthographic view and, with the Joint Tool set
to defaults, click from right to left and create 1
joint at every grid line along the body of
the slug (see image to the right). Press
‘Enter’ to finish your skeleton. Back in
perspective view, click on the root (first) joint,
shift-select the slug and go to Skin -> Bind
Skin -> Smooth Bind (using defaults). Test
your bind operation by selecting one of the
middle joints and rotating it. With the joint still
rotated, now select the geometry and change
the ‘thin_slug’ blendshape setting to 1. You
should have an articulated slug whose shape
is also controlled with blendshape.
Slug model after 3 rounds of mesh smoothing.
Original model and thinned duplicate that was shaped with a lattice
Joints are created form left to right at every grid unit along the slug body.
Animating the slug – FK & spline IK
At this point, let’s test whether simply keying
the rotations of the joints will yield the motion
we want. As seen in the reference footage,
the slug bends upwards about halfway along
its body. Expand the joint chain in the Outliner
(you should have 9 joints total) and rename
joint 5 ‘joint5_boundary’ – this is roughly
where the body should bend. We will be
animating the rotation of the anterior joints (i.e.
5 through 9) while also keying the position of
the whole slug. Since the slug is bound to a
skeleton, you don’t (can’t) key the transform
node of the geometry itself (in fact the
channels are all greyed out and locked) –
instead we need to animate the Translate Z of
the root joint to move the geometry. Select
the root joint (i.e. joint1) and key a Translate
Joint5 – which is roughly half way along the slug’s body (where it
bends) – is renamed ‘joint5_boundary’ in the Outliner.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
21
Z value of -4 on frame 1, and a value of 4 at
frame 400. Back to frame 1, let’s key the
Rotate Z values of joints 5 through 8 (we’ll
leave the last one alone). Select these 4
anterior joints in the Outliner and key their
Rotate Z to 0 on frame 1, key a value of 20
on frame 100, and then back to 0 on frame
200. The slug now bends upwards as it
moves from left to right. Let’s add in the
blendshape as well – back at frame 1, key the
‘thin_slug’ channel to 0, a value of 1 on
frame 100, and then back to 0 on frame 200.
You might also want to put flat tangents on
joint 1’s Translate Z keys. Test the
animation – not too bad.
Anterior joint rotations and ‘thinning’ are keyed as the slug moves.
Let’s stop to think about a way to simplify the
animation controls for this rig. The thinning of
the slug’s body always seems to occur when
its body is rising up above the substrate – so
this would be a good chance to have one
attribute automatically drive the motion of the
other (so you only need to key the ‘driver’).
For this type of set-up we’ll use Set Driven
Key.
First go back to frame 1 and ‘Break
Connections’ on the ‘thin_slug’ channel.
Select the channel and, in the Animation
menuset, go to Animate -> Set Driven Key ->
Set… - this will bring up a window with the
words ‘blendShape1’ and ‘SLUG” in the lower
panel entitled ‘Driven.’ Click on
‘blendShape1’ and its attributes will appear in
the right bottom panel – click on the
‘thin_slug’ attribute to select it. This channel
will be driven by the Rotate Z of joint5, so
select that joint in the Outliner and click on the
‘Load Driver’ button at the bottom of the
window. Select joint5’s ‘rotateZ’ attribute in
the upper right panel. Now that the two
attributes are connected, you need to specify
the range of motion that occurs on one relative
to the other… Select the SLUG and go to the
channel Box to examine what happens to the
‘thin_slug’ channel: on frame 1, press the
‘Key’ button at the bottom left of the ‘Set
Driven Key’ window (notice that the ‘thin-slug’
channel turns orange). Now go to frame 100,
enter a value of 1 for ‘thin_slug’ in the
Channel Box and press ‘Key.’ If you play the
animation, you’ll notice the same behavior as
when you had keyed ‘thin-slug’ manually – the
difference now is that anytime you rotate
joint5’s RotateZ, it will affect ‘thin-slug’ thinning
motion. Test this behavior on frame 1: select
Set Driven Key window
Even on frame 1, with set driven key, rotating joint5 drives the thinning
of the ‘thin-slug’ blendshape attribute.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
22
joint5 and rotate it along the Z – the slug
should automatically thin out.
The problem with the current animation/set-up
is that if you want a more varied set of
rotations on all your anterior joints, you’ll need
to adjust and key them one by one both during
the slug’s upward rise and descent back to the
substrate – this could get tedious. Let’s try
another method that might give us more
intuitive control over the rig and the model.
Rewind to frame 1 and ‘Break Connections’
for the following channels:
• Translate Z channel on Joint 1
• Rotate Z channels on joints 5 - 8
• ‘thin_slug’ channel on blendShape1
Nothing should be moving anymore if you
press Play (and the set driven key relationship
has also been broken).
Let’s have the slug move along a curve – if we
just select the model (or even the joint chain)
and simply apply them to a motion path, this
will not affect the interior joint rotations and the
whole body will move as a block. Instead, we
will draw a curve, and then set a splineIK
control on the skeleton so that each of the
joints moves along the curve. Switch to ‘side’
view and draw a curve from left to right – use
the image on the right as reference. Notice
the sharp loop in the curve to mimic the rising
motion of the slug’s body: this loop is
designed with only 2 CVs – this will simplify
steps to come.
A curve is drawn in side view – the ‘loop’ is created using 2 raised CVs
Now to set a splineIK control on your joint
chain, go to Skeleton -> IK Spline Handle
Tool | Options (reset) – in our case, there’s
an important setting to specify: uncheck
‘Auto create curve’ (because we’ll use the
one we’ve just created instead). With your
cursor over the perspective viewport, follow
the instructions in the lower left of the Maya
interface:
1) LMB to pick start joint (i.e. root joint)
2) LMB to pick end joint
3) LMB to curve for IK handle
When you finish these steps, the skeleton is
automatically positioned along the curve.
Select the ikHandle1 node in the Outliner,
and in the Channel Box, play with the
‘Offset’ value – this is the attribute that will
Settings to create an IK spline handle using an existing curve
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
23
move your joint chain along the curve.
Notice that if you set it to a very high value
(like 100) it will default back to another
number (like 12) – this is the maximum
offset value that takes the joint chain all the
ay to the end of the curve (the number is
based on the number of CVs you used to
design the curve). Let’s key a value of 0 at
frame 1 and use the maximum offset
value (it was 12 in my case) at frame 400.
The slug migrates along the entire curve
over 400 frames.
Now if we want to ‘drop’ the slug to the
ground after it rises along the curve (around
frame 40), we will need to edit the curve
shape over time. We’ll control the curve
shape by creating a cluster for each of the 2
top vertices in the loop as well as the 2
adjacent ones on either side (that’s a total of
4 clusters - see image on the right for
reference). To create a cluster, select an
individual curve CV and go to Create
Deformers -> Cluster (in the Animation
menu set).
Animating the Offset attribute of the IK handle moves the joint chain
along the curve.
To animate the shape of the curve over time, individual CVs of the loop
region are selected and turned into clusters.
Go to frame ~45 where the slug is half way
up the loop and adjust the cluster
positions to get the slug look you want (i.e.
may want to stretch some of the top CVs up
a bit more to match the look in the reference
footage). Then key the Translate X Y Z of
each cluster at that frame. Now go ~20
frames later (frame 65) and position the
clusters such that they are all in a line along
the z axis (the slug should flatten out as a
result) – key those Translate X Y Z values
on that frame. If you playback the animation
you’ll notice that we’re getting closer to the
motion we’re looking for.
A few more tweaks to improve this – let’s
add the blendshape! Key the ‘thin_slug’
blendshape attribute using the following
values:
Frame 1 - value of 0
Frame 45 - value of 1
Frame 60 - value of 1
Frame 80 - value of 0
Set all keys to flat tangents. Finally, it might
be nice to set an intermediate key on the
Offset attribute so that we can introduce a
short pause in motion: go to frame 45, set a
On frame 45, when the slug is fully extended, the position of a cluster is
adjusted to achieve the intended shape before the slug collapses.
Combining the IK Offset, cluster and blendshape animation.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
24
key and, in the Graph Editor, give the key a
flat tangent.
As a final touch, we can also add a lattice to
the entire animation of the slug – this will
give us even more control over any
deformations we want to introduce during
the migration cycle. Take another look at
the footage slugmotion_01.mov – there is a
bulge that occurs at the slug’s ‘bending
point.’ It’s as if the slug passes through the
bulge as it moves (i.e. the bulge stays
essentially stationary). This effect can easily
be accomplished with a lattice…
On frame 1, select the ‘SLUG’ geometry
node and add a lattice to it: Create
Deformers -> Lattice | Options (Reset) –
enter Division values of 2, 8 and 12 for S,
T and U. In the Outliner, select both the
ffd1Lattice node and its base ffd1Base –
scale and move these together so that the
lattice covers the entire animation area of
the slug (see images on the right). At frame
45, select lattice points in the bend region of
the slug and move/scale them to get a
bulge. Animating the slug will now appear
as though that region of the slug is passing
‘through’ a deformation (or a stationary
bulge).
Leaving a trail
A lattice is added to the slug – it’s scaled and moved to cover the area
Lattice points are moved to create a bulge in the slug as it migrates
Before creating a NURBS plane, it is best to
se tup your shot so we do not waste
particles on areas of the scene that won’t be
rendered. Create a new camera and
rename it RENDERCAM_01 (in the render
settings, set the frame to 800x450). Now
look through the camera and bring up the
resolution gate. Tumble around the scene
and frame the slug and the curve it will
move along – key the camera’s position
on frame 1 so you can always go back to
this shot even if you inadvertently move your
RENDERCAM_01 position.
Create a NURBS plane that sits below the
entire region of the animation and give it 8
patches in U and V. Switch to side view
and lower the plane about 1 grid unit
Final deformed lattice for the slug to migrate through.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
25
below the bottom of the slug geometry at
frame 1.
Select the NURBS plane and, in Dynamics
menu set, go to Particles -> Emit from
Object | Options – use the following
settings:
Emitter type: Surface
Rate: 10,000
Speed: 0
This will rapidly create particles on the
surface of the plane. Select the particles,
switch them to Blobby Surfaces and set the
Radius to 1 and the Threshold to 0.2 –
play the animation for ~30-40 frames and
stop it. Select the particles and go to
Solvers -> Initial State -> Set for Selected.
Now delete the emitter (which is parented
under the NURBS plane node in the
Outliner).
With the particles selected, go to Fields ->
Uniform | Options (Reset). Use the following
settings:
Surface emission settings for the ground plane.
Direction X: 0
Direction Y: -1
Direction Z: 0
Use max distance is check ON
Mac distance = 2
Volume shape: Cube
Direction Y to -1 will displace particle
downwards as they come within the max
distance of the field (which is set to 2 units).
In the Outliner, MMB-drag the field over
joint1 to parent it to the rig. Select the field
and move it down a bit (this is to make sure
that with a max distance of 2 the ground
particles will actually pass within the cube
shape. Now play the animation (might be
slow) and you should see blobby particles
pushed down at the rear of the slug. This is
the basic effect we’re going for – a few final
adjustments will make just right:
• to prevent the particles from traveling down
indefinitely, lower their conserve to 0.5.
• increase the Uniform field’s magnitude to
10 and lower the Attenuation to 0.
Uniform field creation settings – this will ‘depress’ the ground particles
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
26
To really test this effect, select the curve
for the animation in the Outliner, switch to
component mode and select a few of the
end CVs (after the loop) – move them to the
side to create a curving path along the
surface of the plane.
Now play the animation all the way through
and take a render!
The uniform field parented to the root joint at the back of the slug.
Final render of frame 45.
Final render of frame 329.
advTutorial 1: Dictyostelium
Gaël McGill
Spring semester
27