How to do Shatter Effects with Maya 2013 using Dynamics

Image

Animation Methods shares more 3D animation techniques and tips.

Shatter effects are the most crazy-cool looking things you can do with Maya 2013 software to spice up your animation and stories.  I used Maya’s Dynamics Shatter Effects when I did the short video of Disney Owns Lucasarts.  It actually takes less than 5 minutes to do once you know what buttons to press and pull.

I put together this quick 10 step tutorial on how to use Shatter Effects in Maya 2013.  It’s the exact technique I used in the video.  I’ll use a simple sphere to show the effects, but you can do this with any poly object.  Hope you guys use it in your own videos.  Try it out!  It’s fun to see things explode.

STEP 1

Image

Create a polygon plane and add some divisions on the Channel Box and going to the polyPlane settings.  I added 50 on the width and height.

STEP 2

Image

Create a poly Sphere.  Move it above the ground plane and clear the sphere’s history by going to EDIT>DELETE BY TYPE>HISTORY.  Dynamics doesn’t like any history on objects.  If you don’t delete the history it won’t work.  Make sure you always delete this history.

STEP 3

Image

Now press F5 or go to your DYNAMICS main menu bar.  This will change your menu to the fun stuff.  Make sure your sphere is selected and go to EFFECTS>CREATE SHATTER and click on the option box.  This will open up this window shown.  I like to work with the defaults so let’s start with doing an EDIT>RESET TOOLS on this window.  We also have 3 different tabs Surface Shatter, Solid Shatter, and Crack Shatter.  We will work with the first one, Surface Shatter.  Under Shard Count add a number of how many pieces you want when the sphere breaks.  I will go with 7 Shards.  Click APPLY to finish.

STEP 4

Image

When we add a Shatter effect you will get two spheres.  One will be the original sphere we created and the other sphere will be the shattered/broken sphere.  You can hide the original sphere in your channel box by putting in a 0 in the Visibility channel or you can delete it if you’d like.

STEP 5

Image

When we created the shatter effect, Maya automatically created a group of the different pieces.  But Dynamics doesn’t work well when things are grouped.  So to Ungroup these pieces you need to open the Outliner window by going to WINDOW>OUTLINER.  Select your ball so you can see the different pieces in the Outliner.  You might need to click on the small plus + left to the name of the sphere to reveal the pieces under it.  Here’s how to Ungroup the pieces.  Select ALL of the shards that make up the sphere.  Everything except the top name “SurfaceShatter…”  Once you have the shards highlighted press SHIFT and P.  You will see in the Ouliner that the shards are now Ungrouped.  This is good!

STEP 6

Image

Now with the sphere pieces still selected, we need to tell Maya that all of these pieces are going to break and collide and interact with other objects.  In order to do this we need to go to SOFT/RIGID BODIES>CREATE ACTIVE…  We need to make this sphere “active” because this is the object that is going to react and break once it hits another object.  Active meaning it’s going to do something.  You don’t have to be a genius to figure out that the ball is the one that’s going to be active, because is the one with the shatter effect applied to.

STEP 7

Image

Now select the ground plane and go to SOFT/RIGID BODIES>CREATE PASSIVE…  Making the ground “passive” will let the ball know that the ground is what’s going to cause the ball to break once it hits it.  The word passive means to not do anything.  Which is exactly what we want the ground to do, nothing.  But we still want it to interact with the ball.  You can see we have the ball and ground set to interact with each other.  Once is active the other is passive.  In other words, one will break and the other will stay put.

STEP 8

Image

The cool thing about dynamics is that we as animators don’t have to animate it to look realistic.  Maya takes care of everything for us and makes it look real (or tries to make it look real).  Right now, if we were to click on PLAY, nothing will happen.  WHY?  Well Maya doesn’t know what direction the ball will go.  In order for Maya to tell the ball to fall down we need to add GRAVITY.  Just like in real life.  Thing fall to the ground and break because we have gravity on earth.  Maya is no different.  So, let’s go ahead and add some gravity to the ball.  Make sure you still have all of the pieces selected on the sphere.  Now go to FIELDS>GRAVITY.  Now, because we added gravity to the sphere, Maya knows that the ball needs to fall, and because the ball is active and the ground is passive, it also knows that it needs to break once it hits a passive object (the ground).  Easy to understand, right!?

1. Active=Object interacting

2. Passive=Object it’s colliding with.

3. Gravity=Makes active objects fall.

STEP 9

Image

Now, before you start going crazy and click PLAY.  I need to explain how Maya calculated the shatter effect or any Dynamics effects you do.  Maya won’t allow you to see your dynamics if you have your preferences set to play “real-time.”  When you play your animation set to real-time, it actually skips some frames to keep up with the lag of your RAM and objects in your scene.  BUT, when you work with dynamics in Real-time, it won’t work well.  Dynamics calculates the shatter and gravity based on one frame at a time, so we need to change the play speed of Maya to play Every Frame.  Right-click on the timeline and go to PLAYBACK SPEED>PLAY EVERY FRAME, FREE.  Now, you can click PLAY and watch the cool shatter effects!  Also, make sure you extend your time range to something like 300 or 500 frames.

STEP 10

Image

The thing about dynamics is that you cannot scrub on your timeline back and forth to watch your animation.  But there is a way around this.  If you click on one piece of your shattered sphere and press CTRL+A, in the Attribute Editor you’ll find a tab that says RIGID SOLVER.  Here you can find an option that will allow Maya to remember the dynamic calculation it did so that when you press PLAY it doesn’t have recalculate everything again.  Now, find the menu that says RIGID SOLVER STATES.  Check on CACHE DATA.  This will allow your computer to save the calculations, so that next time you click play, it will play it through without recalculating.

Image

Just make sure when you want to see your dynamic animation, that you play it from the beginning of frame 1.  Remember, dynamics calculates frame by frame so it needs all of the frames from the beginning to recalculate it correctly.  If you want to make any changes to the dynamics you’ll need to press the DELETE button in the DELETE CACHE.  This will delete the saved information so that Maya can recalculate the dynamics.

Hope you learn something new and cool.

Post comments here if you have any questions.  Have fun and Cheers.  BOOOM!

by David Rodriguez
author of Animation Methods book.

Advertisements

How to Animate using Maya 2013 by Animation Methods

 

So you want to be a 3D Computer Animator and you just don’t have the techniques down yet.  Perhaps you tried it and didn’t have your own Animation Methods that could help you create that smooth flowing Pixar quality animation.  Most people think you have to be “gifted” or you’re “born with it!”  The reality is that this is a lie!

I was certainly not born with animation talent or did it any better when I started.  3D Character Animation is one of those arts where you need a tutor or a mentor to help guide you.  You need to learn simple principles and methods that can quickly help you get started.

Animation is basically about timing and poses.  You get a 3D character with controls (called a rig) and you use those controls to create a pose.  You move the character forward and you repose him.  You move him again and you do another pose.  You click play and you watch how the poses and the timing (speed) is working together.  This is what a 3D character animator does.

how to add keyframes

If you look at the timeline on this image you’ll see red lines (keyframes) all throughout the timeline.  All of these keyframes represent a pose on the screen.  We have 21 red lines (keyframes), which means, we have 21 different poses on the Pixar Lamp character.  If I were to click on play, we would see the motion of the lamp come to life.  So you might be asking yourself, “how can I keep track of all of the controls on a character when a rig has so many?”  That’s a good question.  How do you know which controls to record or keyframe to set a pose?

TIP 1 –  I like to set a keyframe on ALL of the character’s controls.  This makes it clean and organized when setting keyframes.  You don’t want to set keyframes on a couple of controls then later you set keyframes on other controls.  You’ll end up confused and next thing you’ll know you’ll have keyframes all over the timeline.  I’ll say it again, you want to set keyframes on ALL of the character’s controls.  How exactly can you keyframe all without having to click on all of the controls individually every time you want to set your poses?  Here’s my secret on setting keyframes when I animate.

1) Select ALL of the controls of your character (legs, knees, hips, chest, arms, neck, head).

2) Once you have everything selected go to CREATE>SETS>QUICK SELECTION SET

3) Give this selection a name like, allBody

4) Click on ADD TO SHELF

This will create a button for you and will add it to the top of your shelf.  Next time you want to select ALL of your character’s controls, you’ll just press this button and BOOM!  All of the controls will instantly get selected.  Then you can press the “s” on your keyboard to set a keyframe on all of the controls.

There you have it!  A tool that I use in a professional studio when working on games and film is now on your hands.  If you want to know more about my tips and secrets when I animate check out my Animation Methods book full of information about how to animate, how to get into games and movies, how to create your demo reel, how to use the software for animation, and much more.

I also teach other secrets on my YouTube Channel where you can see tutorials.

Message me of Facebook or Twitter.  I’ll be glad to help you.