smallarrows.GIF

156 syllabus      site index      3D artists      past student work        DMA

ballbounce.gif

Animate a Bouncing Ball
Change the velocity between keyframes

Animating an object is similar to animating the camera, move the time slider, move the object, select the channels and set keyframes.

Set up your Maya options for animation:
Use Windows->Settings/Preferences->Preferences
     Choose the Time Slider section
          Set Framerate: 30 fps

          Set Playback start/end: between 1 and 30.
          Set Animation start/end: between 1 and 30.
          Set Playback speed:  30 fps x 1 (This might skip frames to play the correct speed)
          Click Save



Set Keyframe 1
Set the minimum playback on the time slider to 1, over to the left on the time slider.

Set the maximum playback on the time slider to 30, over to the right on the time slider.
timeslider.jpg

Place a poly sphere above the origin (0 7 0), use the front view.

Select  the sphere.

Set the time slider over to frame 1 at the bottom of the screen.

Hold down the Ctrl key while highlighting Translate Y, Scale Y in the Channel Box
     On a Mac use the Apple key.
Use the right
mouse key over the channel names, choose Key Selected.



Set Keyframe 15
Set the time slider over to frame 15.

Move the sphere down to the ground.

Select the Scale Tool button from the side tool box. mscale.jpg
Click and drag on the green box to scale down the y axis smaller. This will give the sphere a volumetric squish when it impacts the ground.

Hold down the Ctrl key while highlighting Translate Y, Scale Y in the Channel Box
     On a Mac use the Apple key.
Use the right
mouse key over the channel names, choose Key Selected.
keys_tY_sY


Set Keyframe 30
Move the time slider over to frame 1. (Yes frame 1)
Use the middle mouse key to slide the time slider over to frame 30, notice when you use the middle key the animation does not move, this will let us set frame 30 the same as frame 1.

Hold down the Ctrl key while highlighting Translate Y, Scale Y in the Channel Box
     Mac use the Apple key.
Use the right
mouse key over the channel names, choose Key Selected.



Preview the animation
Select
the front view.

Hit the play arrow on the time slider. timesliderplay.jpg

Stop the playback by clicking the mouse on the red square over the play arrow.

You should notice a few problems with your animation. The ball squishes before it hits the ground. The motion is constant, it does not feel like a ball bouncing with the pull of gravity.



Fix the ball from squishing before it hits the ground
Move the time slider over to frame 1.

Use the middle mouse key to slide the time slider over to frame 14.
(When you move the time slider with the middle mouse button, there is no change.)

Highlight Scale Y in the Channel Box. (Do not highlight Translate Y this time!)
Use the right mouse key over the the Scale Y channel name, choose Key Selected.

Preview the animation again.



Add the Feeling of Gravity and Edit the Graph Editor
Select the Sphere

Windows->Animation Editors->Graph Editor
Time is horizontal and value is vertical.


Click and drag a box to highlight all the curves. They should appear white.

Select Tangents->Flat or use this button tangents_flat  to change the shape of the curves, notice the tangent handles are horizontal. This will give you an ease in, ease out feeling. (The curves may have been set to Auto tangency by default, this may be similar.)



Fix the move in Y curve
Highlight Translate Y over on the left of the Graph Editor, this will select the sphere moving in Y channel only.

Select keyframe 15 in the middle of the curve.

Click the Break Tangents button. graphbreaktangents.jpg
This lets you move each tangent separate from each other.

Select the Move Tool button from the the tool box on the left. mmove

Marquee select over the left tangent for keyframe 15,  (Select the keyframe first to see the tangent handle), move the tangent until it looks like this.

Do the same for the right tangent.

bounce_ball_tangent_close

Playback the animation, the ball should have a feeling of gravity, it speeds up as it falls.

grapheditor.jpg



Fix the scale curves
Highlight Scale Y over on the left of the Graph Editor

Click and drag a box over keyframe 30

Select the Move Tool button from the side tool box above. mmove.jpg  (Not in the graph editor)
Time snap button on the Graph Editor should be selected by default.  You may need to make the graph editor window larger to see it. gridsnap.jpg

Hold down shift while dragging keyframe 30
horizontally to keyframe 20.
(This will make the ball appear to snap back into shape quicker, less like a water balloon, more like a rubber ball.)



Type an expression to create volumetric squashing
This expression will not work in Unity.

In the Channel Box:
Highlight Scale X, Choose Edit->Expressions... in the Channel Box menu.

Input the following under Expression:
         sx = 1/sy ; 
         sz = sx;


Click Create.

The scale in X and Z will be effected by any scaling in Y.



Render Settings

Turn off Color Management:

Select Windows->Settings/Preferences->Preferences
     Select Color Management
          Uncheck Enable Color Management


Press Render Settings icon upper right or middle  srender_settings
Under the Common tab:
     Choose Image format: tif
     Uncheck Dither
     Choose Frame/Animation ext:    name.#.ext
     Input Start frame:  1
     Input End frame:  30

Under the  Image Size
     choose 960x540

With these settings below, your scene will render faster with a preview quality.
Under the Arnold Renderer tab:
Under the Sampling arrow:
     Set Camera (AA) to 2      (default 3)
     Set Diffuse to 2      (default 2)
     Set Specular to 1      (default 2)
     Set Transmission to 0      (
default 2)
     Set SSS to 0      (
default 2)
     Set Volume Indirect to 0      (
default 2)

Under the Ray Depth arrow
     Set Total to 1      (
default 10)
     Set Diffuse
to 1      (
default 1)
     Set Specular
to 1      (
default 1)
     Set Transmisssion
to 0      (
default 8)
     Set Volume
to 0      (
default 0)
     Set Transparency Depth
to 0      (
default 10)

Click Close
to close the window



Add a Directional Light
Create->Lights->Directional Light
     Increase the Intensity to 1.2 in the Attribute editor or the Hypershade window.
     Change the Shadow Color to a dark gray.
     Under Arnold
          Change the Exposure to 2

Rotate the Directional Light   X: -45, Y 45


Render an image to the Render View
In the persp window
     Select View->Camera Settings->Resolution Gate
     Uncheck View->Camera Settings->Gate Mask
This will let you see how the image will be cropped.


Click the
Render View icon upper right render_view
Click the Render the Current Frame icon  render_current_frame_render_view



Save Your Scene




Render an Animation Sequence
Change to the Rendering Module
render_module

Select Render->Render Sequence from the top menu bar.

You can always hit the Esc button to stop the render.



Where are the files?
The image is stored locally in the images folder on your computer. You can change the default location, or they are stored in your project area. File->Project Window

PC: (This PC) C:\Users\%USERNAME%\Documents\maya\projects\default\images

Mac: /users/$user/Documents/maya/projects/default/images



View the Animation with fcheck
PC: Use Windows Start Menu (lower left)->Autodesk->fcheck from windows
or C:\Program Files\Autodesk\Maya2020\bin\fcheck.exe

Mac: Use Applications\Autodesmaya2020\Fcheck

Select File->Open Animation  Find the files in your projecto area, Select the first frame.



Unity

You may save the file into a Unity Assets folder. The Maya expression will not transfer.The Directional Light will. You may want to delete it in Maya.

There is a script for squash and stretch on the Scripts page:
http://users.design.ucla.edu/~cariesta/MayaCourseNotes/html/unity_scripts.html

smallarrows.GIF