Point SOP: This tutorial shows you how
to use Magnets and the Point SOP in Side Effects
Software's Houdini to quickly create a convincing,
fully procedural stingray motion. The completed
project file is available as stingray.hip.gz
(35k). Note: If you're not familiar with
the sin() expression take a look at Anatomy of
a Sine Wave Expression in the Houdini User Guide
There are four parts to this example:
view larger versions of the thumbnails, just
click on the image - they will open up in a
assemble the body curves
2. animate the body
3. animate the wing
4. add the skin and materials.
the Body Curves
The first step is to build five NURBS curves for
half the body, which will later be mirrored and
skinned. Some important things to remember regarding
the skinning operation are that the curves have
to be drawn in the same direction (from nose to
tail in the example), that they have to have the
same number of points, and that the correct order
is followed when feeding them into the Skin SOP.
Building the curves is straightforward but if you
wish to skip the modelling portion load the file
(25k) and jump to step 14.
up Houdini and create an object called stingray.
Delete or turn off the display flags for any other
objects in the file.
the stingray object SOP Editor and place a Model
SOP. Rename it from model1 to model3 as it will
be the third curve in the sequence. Enter its Model
the top view draw an open NURBS curve with CVs to
represent the outer edge of the body. Start by turning
on snapping (Alt-j) and placing a CV on the X axis
near the right side of the viewport. Turn off snapping
and with the Alt key held down place a second CV
perpendicular to the first with respect to the X
axis. Continue to place CVs as shown in figure 1
until you have almost completed the tail.
you place the last CV, turn on snapping and hold
down the Alt and Ctrl keys so that the last CV is
snapped to the X axis but also constrained in the
Z direction. The reason for keeping the first and
last pairs of CVs to the same Z value is that when
the body is mirrored the ends will skin smoothly
with no breaks in continuity (i.e. no creases).
you're happy with the shape of the curve exit to
the SOP Editor.
the Model SOP selected make a duplicate using the
Alt-C and Alt-V keys. It will name itself model4.
the Model Editor for the duplicate - model4.
the top view drag the CVs up towards the X axis
until they are roughly half way between the original
curve and the axis - figure 2.
the Front view, select all the CVs except for the
first and last and move them upwards a small amount.
Adjust individual CVs to get a shape similar to
the one shown.
up to the SOP Editor and duplicate model4 to create
the model5 Model Editor. This curve represents the
centreline of the stingray and so needs to be flattened
in the XY axis. To move the CVs in one step, hold
down the C key, to enter the Construction Plane
state, and press Z. The Construction Plane should
reorient itself to the XY plane. Then, with all
the CVs selected, press the E key to flatten the
selection to the plane - figure 3.
hold down the Ctrl and Right Mouse Button to get
a context sensitive pop up list of these key controls.
All that remains is to duplicate and adjust the
last two models.
up to the SOP Editor. Duplicate model5 and name
the copy model1, then duplicate model4 and name
the copy model2.
both model1 and model2 do the following: Enter the
Model Editor and select the curve. Use the Tab key
to turn on the Transformation Jack. Press the W
key to snap the Jack to the origin and then press
M to mirror the curve around the horizontal axis.
the five models in order from 1 to 5. Make sure
that the curves are merged in order or else they
won't skin correctly - figure 4.
of Houdini's procedural nature there is no need
to follow the usual build then animate process;
in this case you'll animate the curves first and
then skin the result.
first step is to apply a wave type motion to the
entire body using magnets.
a new network by placing a Metaball SOP to the right
of the model SOPs. The Metaball defines where the
magnetic forces are applied. Set the Radius to 2,
1, 2 and the Centre to 0, -0.5, 0.
a Copy SOP to the metaball with 2 copies and an
X translation of 6.
copy and paste, or Ctrl-C and Ctrl-V, to duplicate
the Metaball SOP. Move the second metaball tile
to the right. Make its Centre values 3, -0.5, 0
and set the Weight to -2. The result is a row of
three metaballs 3 units apart with weights of 2,
-2 and 2. Note that as the centre metaball has a
negative weight it won't be visible in the viewport.
the Copy and Metaball SOPs and append a Transform
SOP. In the Transform make the X translation -$F/15.
This moves the metaballs past the body based on
a stately 90 frame cycle. Translating the body with
stationary metaballs would have the same effect.
The network so far should be as shown - figure 5.
deforming effect comes from a magnet so append a
Magnet SOP to the curves merge. Set its Translate
parameters to 0, 0.1, 0 and wire the metaball Xform
SOP into the second, right hand input.
the animation length to 90 frames, using the Playbar,
and playback the result of the Magnet SOP. As the
metaballs pass the curves they should create a smoothly
arching body shape that responds to the metaball
radius and weight - figure 6.
next step is to add the wing motion. This is done
by giving each part of the edge curve an up and
down sine motion in sequence. This is easy to do
as each point has a unique number.
the Viewport turn on the point and point number
display. Adjust the view to confirm that the outer
edge points are numbered 30 to 33 - see figure 7.
(If you built your own curves your numbers may be
Append a Point SOP to the Magnet SOP and set the
Point SOP Group to 30-33 (or the edge point numbers
in your case) to effect only those edge points.
In the Y translation field enter the following expression,
(turn Expressions on first):
looks intimidating but the only important parts
of this expression are: sin which creates the wave
shape, $F*4 which sets the timing and $PT which
sets the offset based on the point number. The rest
of the expression is just fine tuning.
the animation and check the wing motion. Adjust
the expression to taste e.g. the 0.5 value controls
the amplitude of the motion, the -0.1 controls the
height above or below the body, and the 4 (in $F*4)
controls the timing.
the Skin and Materials
a Skin SOP to the Point SOP. As long as the curves
are merged in the correct order the body should
skin correctly with the default parameters.
a Copy SOP to duplicate the half body. Set the number
of Copies to 2 and set the Scale to 1, 1, -1. You
may want to put a small value in the z translation
to create a gap and so a smoother join; e.g. make
the Translate values 0, 0, -0.05
a Stitch SOP. Set the Direction to in V and
the LeftUV and the RightUV to 0, 1.
Turn on the Stitch, Tangent and Wrap
First to Last options to smoothly join the two
append a Material SOP and assign a skin material
of your choice. In the example this is a simple
flat shader without textures so there's no need
for a Texture SOP. Your final network should be
as shown - figure 8.
the Render flag on the Material SOP and render.
things you could do (look here for a QuickTime
movie (1.6 Mb) and hip
file (172k) of the following): Add
a Fog Object with a blue uniform depth fog.
a bones skeleton, have the bones follow a curved
path and then use capture and deform tools to create
a flowing motion. If you do this set the bypass
on the Magnet SOP.
a projection map for the stingray to move through.