Fine Tuning the Motion


In the last page of the tutorial, we set up the basic motion of a fish swimming. The motion looks good, but notice that the fish really looks more like an eel swimming; its head moves too much. What we want is for the front of the fish not to sway at all and for the tail to sway the most.

  1. To keep the head from moving and to get the tail to sway the furthest, add "* z" to the equation:

    Since the points at the head of the fish are modeled at a Z of 0, the distortion amount created by the sine wave will be multiplied by 0 for the points at the head, but will be multiplied by a bigger and bigger number down the length of the fish. At the tail, the distortion amount is multiplied by 2, since the points at the tip of the tail are at Z=2. This makes the amount of distortion 0 at the head which is what we want.

    Make a preview and notice that the tail seems to swing too much compared to the head.

  2. To make the tail swing less, divide the z by 3, giving: sin(z - 7*t) * z/3.

    Make a preview. This is good, but really the head should move a little bit.

  3. To give the head a small bit of motion, add something small, like 0.7 to the z before it's divided: sin(z - 7*t) * (z + .7)/3.

    This makes a nice, natural-looking swimming motion for the fish. Try making previews from some other perspectives on the fish.

Other Ideas

Don't be afraid to keep experimenting on your own. It's just math, it won't hurt you.
3D Page Tutorials Previous Page No Next Page