In this tutorial you will learn:
1. How to use the Bend Deformer.
2. How to make one attribute depend on another.
3. How to use math in expressions to create animation.
Download result here
A plank is hit by a stone and starts to shake from the impact. The plank is stuck at the ground and gets hit at the top so the only thing that actually swings is the top while the bottom becomes the pivot for the
- First you create the scene. In my case I created a plank from a pCube and a stone from a pSphere.
Rename the plank to pPlank and the stone to pStone. When working with expressions naming is very important. The objects doesn't matter really, but for the scenario stated above it does and I'll use it as an example further throughout the tutorial
- We want the plank to stay stuck at the bottom. A regular rotate would rotate the plank in a linear movement. Add a bend-deformer to the plank by selecting it and clicking on "Deform - Create Nonlinear - Bend" This is under the animation-menu. Click "F2" to bring it up. Rename it plankBendDeformer.
After you have applied the deformer you should fool around with it to check out what the attributes do.
decides how much the plank will be affected. 0 = none, 1 = max. Curvature: The actual bendingValue of the deformer
Define how much of the mesh that shall bend above the deformers pivot. High Bound: Define how much of the mesh that shall bend above the deformers pivot
Keep Envelope at 1, don't worry about the curvature, set Low Bound to -1.5 and High Bound to 0. You can move the deformer a bit down in the Y-axis to get it to bend more of the geometry. Play with it to learn how it works. Always do this when using new stuff.
- Create a nurbsCircle and place it half way up the plank. This is our animationControl. Rename it plankControl.
Since we shall not manipulate the plank, it doesn't need any attributes in the channelControl. Nor does the
plankControl. To get rid of the attributes go to "Window - General Editors - Channel Control". Select all its keyable controls except visibility and click move. Do this with the pPlank and the plankControl.
The ball, in contrast to the wall will be shiny. As a highly polished object, it will be used to study the effects of bouncing light. The ball will be a dark grey object with a Diffuse Value of 0.2 (with Hue & Saturation set to 0.0). To give the ball slightly softened highlights, Glossy is set to 1.0. The rest of the reflections will come from the Specular with a setting of 0.7. Shiny is left at 50, just to blur the highlights a little.
Now you want to add an attribute to the plankControl. This is the value that will determine the vibration. Select plankControl and go to "Modify > Add Attribute"
vibrateValue (Note: Maya changes this in the channelBox for readability).
float. If you don't know what a float is look it up in maya's helpfile and make sure you read about the other types too.
0 , Maximum 1 and Default 0 ( I'll explain why in a second).
next page >