Physics
Physics makes hair, clothes and accessories swing on their own. A physics group reads some
parameters (its inputs, such as the head angle), simulates a chain of pendulum particles,
and writes the result to other parameters (its outputs, such as a hair sway parameter). The
groups are exported as physics3.json and run in every Cubism SDK app with the same results as
in the editor.
Running physics
Physics runs while you move parameters in the editor. Physics on / Physics off at the top of the Physics panel switches it, and Reset settles every pendulum at rest for the current pose. This browser remembers whether physics is on. The command palette has:
- Turn physics on / Turn physics off;
- Reset physics;
- Sweep a physics input (test motion), Quick turn of a physics input (test motion) and Step a physics input to its end and back (test motion), which move the parameter chosen in the list under Test motion (see Test motions). While one runs, Stop test motion takes their place.
While physics runs, the Parameters panel shows the parameters that physics drives with a physics tag, the value physics gives them and a ring on the slider. Physics overrides what you set there: setting such a parameter shows a notice with Turn physics off, and you have to turn physics off to pose or key it.
The Forces sliders set wind and gravity for the preview, and Default forces resets them. The Simulation summary shows the simulation rate, how many groups and outputs the physics has, the cost per frame, and any parameters the physics refers to but the model lacks. It also warns about X/Y outputs: Cubism SDK apps apply them with scale 0, so use Angle outputs instead.
Test motions
Test motion in the Physics panel moves one input parameter, so you can watch the chains
without touching the sliders. The list under Test motion holds the input parameters of the
physics and starts at ParamAngleX when that is one of them, else at the first. Then press one of
the motions:
- Sweep: a slow sine across the parameter’s range, 1.6 s per swing;
- Quick turn: a sine at the speed of a quick head turn, 0.3 s per side;
- Step: jumps to the end of the range farther from the current value, holds it for 1 s, returns, holds for 1 s, and repeats.
Press the running motion again to stop it. Stopping puts the parameter back where it was. Starting a motion resets every group’s Max %, and a note under the outputs, such as Max % from Sweep · Angle X, names the motion and the parameter that were measured.
Testing with the cursor
The Rig stage’s viewport has no cursor drag. To turn the model with the pointer, the way tracking turns it in an app, use the Preview of the Ship stage, which plays the runtime package, and open Panels › Physics there to edit next to it. Physics edits reach the playing Preview in about half a second without a rebuild: the pendulums restart at rest, and the Preview’s Events list says Physics updated from the project. Cursor tracking settings… in the Preview chooses which parameters follow the drag (see Cursor tracking). The Preview has physics only while the export setting physics3.json is ticked (see Settings).
Editing groups
The project’s physics groups are listed in the Physics panel. Every change is one undoable edit shared with collaborators, and the running simulation updates immediately.
To add a group, fill in the Add group form and press Add group. Its defaults make a single pendulum that matches a new Cubism physics group: No inputs under Input, and the Chain Cubism default, one link with radius 10, mobility 0.95, delay 1 and acceleration 1. Choose an input preset to add its inputs and normalization, or a chain preset instead of Cubism default. Output parameter starts at the first parameter whose ID contains “hair”, or choose No output; the group drives it with an Angle output on the chain’s last link, scale 1 and weight 100. Leave the Name empty to name the group Physics (then Physics 2, and so on) with Cubism default, or after the chain preset. The first group of a project also turns on a fixed simulation rate of 60 steps per second (see Simulation rate).
Groups you add, duplicate, paste or split open in the list; the others start closed. Each group stays open or closed as you leave it until you reload the page.
Each group has these sections:
- Inputs: the parameters that drive the group, each as an X, Y or Angle input with a weight and a Reflect switch.
- Outputs: the parameters the group writes, in the columns Parameter, Link (the particle it follows), Type, Scale, Weight, Reflect, Value (what physics gives the parameter now) and Max % (see Fitting the output range).
- Particles: the pendulum chain, with the columns Radius, Mobility, Delay and Accel. in the same order as Cubism’s; hovering a column header shows Cubism’s name for it. The first row, Root, is the fixed anchor of the chain, which Cubism does not show.
- Normalization: the minimum, default and maximum of position and angle that the inputs map to.
+ Input and + Output open a list of the project’s parameters: type to filter it, then pick one. Escape, a click outside the list or a second press adds nothing. A new input is an X input at 100 % with Reflect off; a new output is an Angle output on the last link, with scale 1 and weight 100. When the inputs of one type add up to more than 100 %, the group shows a warning such as “X inputs add up to 120 %: the Cubism Editor allows at most 100 % per type.” The panel does not stop you.
Apply a preset… replaces a group’s inputs and normalization, its chain, or its outputs with a preset.
In the group’s header you rename it, move it earlier or later in the evaluation order, and delete it. Below that, Simulate switches the group off for the preview only (the export still includes it), Duplicate copies it within the project, and Save as preset… adds it to your presets. Solo previews the group alone. Press it again to put the Simulate switches back as they were; switching a group by hand also ends Solo. Solo needs at least two groups. Copy puts the group on a clipboard that Paste group reads, in this project or another one. Under the outputs, Split into a group and Split into a group each move the selected outputs into one new group or one group per output.
The panel’s Preview section has Track output maximum (see Fitting the output range), Simulate all groups, which switches every group back on, and Show IDs, which shows parameters by ID instead of by name.
Fitting the output range
While physics runs, each output records the largest value it reached. Its Max % shows that value as a percentage of the parameter’s range (the larger of its minimum and maximum, ignoring the sign), red above 100 %. Recording is controlled by Track output maximum in the panel’s Preview section, on by default; this browser remembers it. Starting a test motion resets the maxima. Adjust the output scales from what was measured:
- Increase output scales up the outputs that stayed under 100 %.
- Decrease output scales down the outputs that went over 100 %.
- Fit to range scales every tracked output so it reaches exactly its parameter’s range.
- Reset scales sets every output scale of the group back to 1.
- Reset maximum sets the recorded maximum back to 0 %.
The maxima depend on the motion that was measured, so Fit to range and Increase output give other scales after a Sweep than after a Quick turn or a Step. Measure with the motion that is closest to how the model will move.
Simulation rate
The Rate section sets the project’s simulation rate. Turn on Fixed rate and type the
simulation steps per second; this is written as Fps in physics3.json. With it off, physics3.json
has no Fps and physics takes one step per frame of the app. The first group added to a project
turns Fixed rate on at 60.
Cubism terms
For users coming from the Cubism Editor, these Physics panel settings go by other names there:
| Cubism Editor | Ikimotion |
|---|---|
| Duration (pendulum length) | Radius |
| Ease of swinging (Shaking influence in 4.2) | Mobility |
| Reaction time (Reaction in 4.2) | Delay |
| Speed of convergence (Overall acceleration in 4.2) | Accel. |
| The hidden first point of the pendulum | The Root row |
| Input type Position X / Angle | Type X / Angle |
| Effectiveness (inputs and outputs) | Weight |
| Normalization Center | Normalization Default |
| Pendulum No. of an output | Link |
| Apply Physics | Physics on / Physics off |
| Valid | Simulate (preview only) |
| Physics FPS (export setting) | Rate › Fixed rate |
Reflect and Scale have the same names in both. The tooltip of an input’s Reflect, “Use the value as is instead of negated”, describes the sign the SDK uses internally: ticking it does the same as ticking Reflect in Cubism.
Presets
The Preset library holds input presets (Head (input), Body (input), Bust (input)) and chain presets (Hair: short, Hair: long, Hair: two links, Hair: three links, Clothes: light, Clothes: heavy, Bust: small, Bust: large, Chain: 10 links, Chain: 20 links), plus the presets you saved from groups. Your presets are stored in this browser.
Import presets… and Export presets… read and write Cubism’s preset files. Reset input presets and Reset chain presets restore the built-in set.
Importing and exporting
The Import physics3.json section of the Physics panel reads the groups of a runtime model’s
physics3.json. Replace existing groups is ticked at first, so the file’s groups replace the
project’s; untick it to add them to the project’s groups.
The runtime package contains physics3.json (see Exporting). To download it on
its own, run Export physics settings (physics3.json) from the command palette.
To keep physics motion in an animation, bake it into keys: see Bakes.


