“Rigging a basic fish for Maya”
By
Kiel Figgins
www.3dfiggins.com







Introduction
In a number of recent projects, I've been tasked with animating ambient fish. Typically these fish are for background elements or adding little details to puddles or ponds. From doing so I've come up with a fairly straight forward approach to getting a fish up and swimming in no time.

(Now, before starting out, realize your not going to get Nemo out of this setup, for more advanced fish setups, do a search on CGTalk.com for "Rigging a Fish" for some great threads.)

*Fish Model (Red Parrotfish) found free online at http://toucan.web.infoseek.co.jp/3DCG/3ds/FishModelsE.html

To download the Model, Rig and animation files, click the link below:
Assets


Rigging Process
0. Select fish meshes
1. Edit > Group, name meshes_Fish
2. Deform > Create Non Linear > Sine
3. Rotate the sine deformer in x to 90
4. Move the deformer in tz to a bit in front of the fish's face

5. Inputs > sine1, set High Bound to 0
6. Inputs > sine1, set Low Bound to a value so the handle extends a bit pas the fishes body
7. Group the sine1Handle, name this group sine1_Constraint
8. Create > Nurbs Primitives > Circle, name the circle CTRL_Fish_Body
9. Press F8 to enter component mode, adjust the Control Verts to roughly match the fish outline
10. With the CTRL selected: Modify > Freeze Transformations, Edit > Delete By Type > History
11. Select the CTRL, Modify > Add Attribute
12. Attributes to Add:
- amplitude, float
- waveLength, float, min .1, default 2
- offset, float
- dropoff, float
- twist, float
13. Windows > General Editors > Connection Editors
14. Select CTRL, click Reload Left
15. Select sine1 (not sine1Handle, sine1 is in the INPUTS drop down below SHAPES), Reload Right

16. Connect the CTRL attributes to the sine1 attributes (all but twist).
17. Select sine1Handle, click Reload Right
18. Connect twist to Rotate Z
19. Select CTRL, the select sine1_Constraint:
Constrain > Parent
- Maintain Offset and Constraint Axes All both checked
Constrain > Scale
- Maintain Offset and Constraint Axes All both checked
20. Select CTRL, the select meshes_Fish:
Constrain > Parent
- Maintain Offset and Constraint Axes All both checked
Constrain > Scale
- Maintain Offset and Constraint Axes All both checked
21. Select CTRL, open the Attribute Editor:
- In the CTRL_Fish_Body tab change the rotate order from xyz to zxy

22. Set sine1_Constraint visibility to Off





The Why's
-We could have animated the deformer directly. But this is cumbersome and having channels all on one control makes for easier animation, adjustments and animation transfer to other fish.
-We group the deformer so we could constrain it, but still connect it's rotate channel.
-We added the twist channel so that the fish could swim in different directions or strokes
-Having no min or max on the offset channels allows for constant swimming to be possible.
-Hiding the deformer not only reduces clutter, but also prevents the animator from keying or adjusting it accidently.
-Changing the rotate order to zxy allows for better rotation control in this particular setup. Since a fish is usually swimming left/right, having the Y axis calculated last means you can continue to twist it in the other axis with less chance of gimbal lock.
-We used a deformer instead of joints since this a basic setup and having to not bind or skin the meshes made for a faster setup. Though for closer shots or main characters a joint based solution would more then likely be preferred.


Conclusion
Now that your fish is animatable, its tempting to just hand it off and get going. However, you could spend more time on details that might make your life easier down the line. Things like:
-Locking and hiding the CTRL's visibility channels, since its not connected to anything its just going to create more unnecessary keys.
-Naming the sine deformer more accurately, this will help in a more complex scene.
-Grouping all your Elements together and calling that group something meaningfull, like "Fish_Rig_All_00". This will help with you Duplicate with Input Connections on making a school of fish, while keeping your outliner clean.
-Depending on how much or how many fish your animating, creating a character set can allow you to use the track editor, copy / paste / save animation.

Remember, a stitch in time saves nine.

Enjoy and happy animating!