Wednesday, 8 May 2024

Fish Swim - Free Animation Tutorial

Animate a fish swimming in Maya
In this simple tutorial we show how to animate a fish swimming, and then add some underwater lighting using Maya's software renderer. 

Start with a single side-to-side rotation of the fish; then copy and paste the curves down the fish's body, offsetting each curves by a frame or two. 

The result is the distinctive swish of a fish's tail.  The underwater lighting with caustics can be done with a few clicks. 

Fish Animation Tutorial
You can watch the fish animation tutorial below. It is a little under 20 minutes. 



Herring Rig
Herring from Turbosquid.com
For the tutorial we used a herring rig purchased a while back from Turbosquid.com.  

If you can't find a copy yourself, we'll send it over to you - email us at info@animationapprentice.org.  

Free Fish Rigs

Finally, you could use the free cartoony Snook Fish rig here. All four rigs will work with this tutorial. 

Work Method
Start with a “good bend”
To get started, follow the steps below:
  1. Create a project, set to it, and import the herring rig (or any fish rig) 
  2. Lighting/two-sided lighting
  3. Set your timeline from frame 1 to frame 25. This will be a one second cycle – 24 frames.
  4. Go to frame 1, select all five of the main body controls: A, B, C , D and Tail. Rotate the body to the left (see below). You need a “good bend”, say 15 -17 degrees of rotation. Set a keyframe on all five main body rotations at frame 1 and frame 25.
  5. Now go to frame 13 and rotate the control curves in the opposite direction. Press play, and you will now see the fish flap from side to side (Note that the motion does not look very natural yet).
  6. Turn on your infinity curves. Curves/postinfinity/cycle. Curves/pre-infinity/cycle. View/infinity. 
  7. Select the five Y rotation curves you have created and flatten them using the flat tangents button in the Graph Editor.
  8. Now start to offset the curves, moving them two frames to the right in the Graph Editor. Offset each curve by two frames, going down the hierarchy, adding two frames so that each control curve is offset by two frame more than the last. Now you should see a nice organic fishy motion on the tail. Adjust the curves until it looks smooth (see image below for reference).
  9. Now do the same with the head – animate it from side to side as well. Offset the head curves two frames to the right in the Graph Editor.
  10. Add some side to side motion in the X Translation in the COG control. Offset the curve 4 frames to the right in the Graph Editor.
  11. Now add some motion to the fins. 
  12. Animate the starboard pectoral fin. Again, offset down the hierarchy, offsetting curves. Not just side to side motion in the Y axis here, but a little up and down like the oars of a boat, in the x rotation. The “oar” will dip as it moves forward, to reduce the resistance.
  13. Now do the port side pectoral fin.
  14. Animate the Herring’s mouth open and shut as it swims along.
  15. Save your work.

Underwater Lighting
Underwater submarine lighting tutorial
To create some simple underwater lighting in Maya with caustics, using the Software Renderer, follow the steps below. The lighting tutorial is the same as our free underwater submarine lighting tutorial.
  1. Start in the Modeling menu in Maya (top left)
  2. Windows/Content Browser - Open the Content Browser
  3. FX/Fluids/Ocean Examples/UnderwaterCaustics.ma (NB: Must have NURBS Surfaces turned on in Viewport to see the result)
  4. We get: A Nurbs plane, an Underwater Camera, a directional light, an ambient light and some fog.
  5. Select the underwater Camera. Panels/Look Through Selected. You are now looking through the camera
  6. Position the fish beneath the camera. Adjust the scale of the fish so it fits the camera view. 
  7. Keyframe the fish so it moves through the shot.
  8. Render the scene in Maya Software.

No comments:

Post a Comment