Pages

Welcome to my blog

My name is Gilles Charbonneau

I am a long time 2d animator and I would like to share with you some of the tips and tricks I have learned over the years by posting tutorials and articles on this blog.

Gilles

Basics of physics in Anime Studio

Hello everyone.

Anime Studio Pro 7 introduced a brand new physics engine which allows the automation of certain type of animations.

In this article we will look at the basics of physics in Anime studio.

Here is an example of such animation!


Here is the file for the tutorial. Balls with physics ASP 7.zip

In this scene, we have 6 colored balls falling in a vase, then the vase gets knocked over by a rotating hammer, the balls rolls, then fall over the edge and then disappear after hitting 3 steps.
Let's have a look at how this scene is build inside Anime of Studio Pro 7.

On top of the Layers window we have a group layer containing all the vector layers that are part of our physics simulation.

IMPORTANT: Physics only works inside of a group layer.

The top vector layer contains our hammer, then we have 6 vector layers, each containing a colored ball.

IMPORTANT: Physics only interact with content on different layers.

Then we have a vector layer with our jar and at the bottom we have the vector layer containing the ground and steps.

Now let's see how we make physics work.

First thing we need to do is activate physics on the group layer, we do that by double clicking the group layer and going under the physics tab.

Check Enable physics and leave the other settings as is, then click OK to close the window.

Next, we open the hammer physics tab by double clicking the hammer layer and opening it's properties window then by going under it's physics tab.

First, we make sure that Enable physics is checked.

Then we check Pivot on origin, this tells the physics engine that the hammer will be rotating on it's origin.
We set the origin by selecting the hammer layer then the Origin tool in the tool box, then we drag the origin icon at the center of rotation, in this case, the hole in the handle.

Like this.
We then check Enable motor, this will tell the physics engine we want our hammer to rotate on it's own, as if propelled by a motor, at first,we set the motor speed at 0, we will change it later on.

Set Motor torque to 20, the torque is the force the motor will apply to our hammer, then click OK to close the window.

We then go to frame 48 on the timeline, we open the hammer layer physics tab again, and we set the Motor speed to 270, instead of 0 as we previously did.

By doing this, we delay the rotation of the hammer, giving time for the balls to fall in the jar.

Next, we open the ball 1 physics tab by double clicking the ball 1 layer and opening it's properties window then by going under it's physics tab.


First, we make sure that Enable physics is checked.

Then we enter a value of 0.50 (default is 1) in the density field.

Density tells how much the ball will be responsive to it's physics environment, the lower the number, the more it will be influenced by it's surroundings.

Then we set friction to 0.20 (default is 0.30).

Think of friction as a coat of glue on the ball, the more glue you put on, the quicker the ball's motion will come to a halt, the less glue is put on, the longer it will take for the ball to stop moving.
<


Springiness is set to 0.75 (default is 0.50).

Springiness tells the ball how much it should bounce from another physics object, the higher the value, the further away the object bounce from other physics objects, the lower, the less it bounces.

We leave the other settings unchecked, then we click on OK to close the window.

Repeat these steps, with the same settings for all the balls.

Next, we open the jar physics tab by double clicking the jar layer and opening it's properties window then by going under it's physics tab.



First, we make sure that Enable physics is checked.
Then, we check Start asleep.

This tells the physics engine to make sure that the jar layer stays still until the balls hit it, just to make sure it does not go down the slight slope of the floor.

Then we enter a value of 0.75 (default is 0.50) in the Springiness field, this will make the jar more bouncy and  it will react in a fun way when the balls tumbles in it.

We leave the other settings unchecked, then we click on OK to close the window.

Last, we open the ground physics tab by double clicking the ground layer and opening it's properties window then by going under it's physics tab.


First, we make sure that Enable physics is checked.

Then, we check Non-moving object.

This tells the physics engine to make sure that the ground layer is not affected by gravity and does not react to the other objects in the physics environment.

We leave the other settings as they are, then we click on OK to close the window.

Now press the play button and watch as the animation is automatically created, you have just created a physics simulation in Anime Studio Pro 7.

One last thing though.

In the case one, or several objects in your scene stops in the middle of the simulation, as is the case of the red ball in this animation, you can nudge them, so they resume moving.


To nudge, you select the object layer, in this case ball 1, then go to the frame where the ball has stopped rolling, in this case, around frame 48.

IMPORTANT:  You will get better results if you nudge the object before it has completely stop moving.

You then go under the Animation tab, in the menu bar, then select Nudge Physics Object, a window will appear.


In the settings you enter the direction of the nudge, in this case 0, and the amount of nudging you want to apply to the ball.

The amount of nudging depends on the size and density of the object, in this case, an amount of .05 should do the trick.

Gilles

No comments:

Post a Comment