Model, Motion, Stage

Your 3-D models and motions into the scene

You can put any 3-D model degined in .pmd format, and manipulate it by Model messages and Motion messages. You can also use MMD’s Camera motion to make camera action.

3-D model

3-D model file should be given in .pmd format. MMDAgent-EX also has beta supports for PMX format, so you can use PMX model by simply convert it to PMD and CSV format. Read the PMX format page carefully to use it.

MODEL_ADD newly adds a model into the scene, and MODEL_CHANGE replaces an existing model with another .pmd, keeping its status. You can specify base coordinates or rotation, usage of cartoon rendering in MODEL_ADD. You can also place a model onto another model by specifying parent model and bone name of the parent model where the model should be mounted. The loaded model can be deleted by MODEL_DELETE.

Motion

A motion .vmd file can be applied to a model by MOTION_ADD message. When multiple motions are added, they will be played together. Press b key or select menu to show bone debug information to check how manu motions are running on a model.

When several motions are added to a bone, a latter one will override others while playing. The motion priority can be changed at MOTION_ADD. The default priority is 0, and motions with higher priority will override lower ones. If the priority is the same, the lately added one will win. You can modify whether a motion should override a bone’s motions given by lower priority motions by MOTION_CONFIGURE message.

MOTION_CHANGE will swap the running motion with other .vmd, keeping its status. The motion timer will be reset to 0.

FULL or PART in MOTION_ADD sets whether the motion should be treated as full-body motion or part-of-body motion. When FULL is specified, all the motion including the first frame will be applied. When PART is specified, the motion will be modified before applied so that bones or faces that has only the first frame will be ignored. Ones with only initial position / rate are ignored and only moves are applied. The PART is useful when you are overlaying a part-of-body motion in addition to the base model.

ONCE or LOOP sets whether the motion should play once or keep playing by looping from the start. When ONCE is specified, the motion will be deleted automatically. The looping motion will run forever, until deleted by MOTION_DELETE.

MOTION_RESET rewinds the running motion to the first frame.

Binding bone to a KeyValue

You can force a specific bone of a model to ignore motion and be dynamically contolled by a value of KeyValue. The controll will be enabled when MODEL_BINDBONE and MODEL_BINDFACE messages are issued.

MODEL_BINDBONE|(key name)|(min)|(max)|(model alias)|(bone name)|x1,y1,z1|rx1,ry1,rz1|x2,y2,z2|rx2,ry2,rz2
MODEL_BINDFACE|(key name)|(min)|(max)|(model alias)|(face name)|rate1|rate2

After the above command was issued, the bone specified by model alias and bone name (or face name in MODEL_BINDFACE) will be binded to the KeyValue key name. After that, changing the KeyValue will directly moves the bone and face. Even if a motion is being applied to the specified bone by a motion file, it will be ignored. This binding will continue until the model is deleted.

At MODEL_BINDBONE, coordinate and rotation of the bone will be controlled by linearly interpolate the value of key name as follows.

r = ($(key name) - min) / (max - min)
(x,y,z) = (x1,y1,z1) * (1 - r)  + (x2,y2,z2) * r
(rx,ry,rz) = (rx1,ry1,rz1) * (1 - r)  + (rx2,ry2,rz2) * r

MODEL_BINDFACE will control the face rate by the value of key name.

r = ($(key name) - min) / (max - min)
rate = rate1 * (1 - r) + rate2 * r

Stage

You can either give images as background or floor image, or give a PMD stage model.

STAGE|(stage file name,.pmd)
STAGE|(bitmap file name for floor),(bitmap file name for back)