<!--{"parent": "16_Dynamics.md", "order": 1}-->

## Introduction to Dynamics

**Note: scale is important**. Normally, the units in Cheetah 3D are dimensionless. Something 3 units long is 3 times as long as something 1 unit long, but there’s no concept of absolute scale. With Dynamics, however, all the default settings of the Dynamics system assume a scale of 1.0 unit = 1.0 meter. If you operate at some other scale, you’ll need to mess with lots and lots of settings, and there are probably assumptions “baked into” the implementation (e.g. soft body behavior).

**Note**: if you grew up with the Imperial system — which is still used in the United States and Myanmar — you may find it helpful to memorize the following ratios: 1m = 39.37 in and 1kg = 2.2lb.

Cheetah 3D’s Dynamics system is wonderfully simple to set up and use. The basic idea is very simple.

- By default — objects ignore and are ignored by the Dynamics system.

- If you want an object to exhibit dynamic behavior, you assign it one or more Dynamics tags.

- Assign a **Rigid Body** tag to objects that don’t deform and which other objects will bump into. Make its type **static** if you want it to remain fixed in place (think of objects that are solid and massive, such as the ground). Leave it **dynamic** (the default setting) if you want it to behave like a real object (i.e. fall under gravity, get knocked around by impacts, and so on). Make it **kinematic** if you want to move it manually (e.g. literally by moving it around in real time, or using the animation system), but affect other objects when it bumps into them.

- Assign a **Rope** tag to a spline that you want to behave like a rope.

- The **Anchor** tag lets you fix specified points of an object (which can be a rope, rigidbody, or soft body) in its local space. If you assign an object to the anchor tag, those specified points will instead be fixed to that object.

- Assign a **Soft Body** tag to objects that deform. Softbodies behave like cloth or fluid-filled sacks.

> **Note:** requires updating for Cheetah 3D 8.1.1: per Tags/AnchorTag, the Anchor tag pins rope or soft-body points in global space (not local space), or attaches them to a rigid body. <!-- TODO update -->

Once you’ve set up the objects you want to simulate using Dynamics Tags, simply hit “play” and their behavior will be simulated by the Dynamics system.

> **AI draft:** generated from the Cheetah 3D 8.1.1 manual; not yet reviewed by the author. <!-- TODO review AI draft -->

Every simulation starts at time 0. The first time you play it, Cheetah 3D saves the **initial state** (position, rotation, speed, etc.) of every simulated object, and restores it whenever you return to time 0. So once objects have Dynamics tags, only move them at time 0, or they’ll snap back.

The simulation settings live in the **Dynamics preferences** (the **Dynamics** toolbar icon or **Animation \> Dynamics**): Dynamics On/Off, **Accuracy** (simulation steps per frame), air and water density, **Gravitation**, and **Clear initial state**.

If a simulation is too complex to play in real time, turn on **Frame by Frame** playback (**Animation \> Frames per Second**) so no frames are skipped; it also improves accuracy. For really heavy simulations (big particle systems, soft bodies) click **Bake simulation** to precalculate the results into a cache, which is then used for playback (**Use cache** is turned on automatically; **Clear cache** discards it). Note that the cache is saved in your .jas file, which can make it much bigger.

> *End of AI draft.* <!-- /AI draft -->

### Setting Up a Simple Simulation

Setting up a simulation in Cheetah 3D is amazingly straightforward. (I say this having set up dynamic simulations in other programs.)

For a quick example:

1. Create a new scene.

2. Create a cube, move it up a few units, and rotate it randomly. Assign a rigidbody tag to it.

3. Now create a plane and make it big (10x10 say). Now assign a rigidbody to it and set its type to “static”.

4. Press play!
