-
Notifications
You must be signed in to change notification settings - Fork 39
MOT (Animation) Modding
Animations contain location/rotation/scale keyframes for bones and the root object. They are stored in .mot files, which are inside .dat files.
- Sometimes they are directly in the .dat of the character you want to animate. For example ema000 (brown boar) has it's animations in ema000.dat.
- Some characters (like 2B/A2, all the stubbies, etc.) have the same or very similar armatures. They share the same .mot files. Shared animations are in dat files that have an "f" in the name. For examples for 2B/A2 (pl0000/pl0100) the common animations are in pl000f.dat, for stubbies (em0000) it's em000f.dat, and for the flight unit (pl0010) it's pl001f.dat. The .dat file might be in a different cpk file from the model you're trying to animate (pl000d - data100.cpk/pl --> pl000f - data006.cpk/pl).
- Combination of 1. & 2.
Currently .mot import/export is only available on the custom_bones branch. So make sure you're using it.
First you have to import the .dtt of the model you want to animate.
File > Import > Motion File ...
This will create a new action and add it to the armature. The import will also set the frame range from 0 - last frame and set the frame rate to 60 FPS.
After importing you might want to look into the console. If there are messages like WARNING: Bone XYZ not found in armature
, that means that not all animations were imported. This will be important for the export step.
If you check Bulk Import
all .mot files in the folder will be imported into separate actions. You can then switch between them in the Dope Sheet editor.
You can animate the bones and root armature object pretty much however you want. However there are some limitations to keep in mind:
- An animation curve (keyframes of one channel) can only have 1 of 4 types:
- No keyframes
- Constant: Single keyframe, interpolation mode is constant
- Bezier: All keyframes are Bezier interpolated
- Baked: All keyframes are 1 frame apart and linear interpolated
- For Bezier curves, the length of the tangent doesn't matter, since .mot files only store the slope. The correct length would be 1/3 of the distance to the next keyframe, but you don't have to worry about that. That will ignored when exporting anyways. If your animation really depends on the length of the tangents, try inserting some keyframes in between or baking the animation.
File > Export > Motion File ...
The .mot file name and action name should be the same. So if you want to export to a different .mot files make sure to change the action name.
If during import there were warnings about missing bones, you should enable the Patch Existing
option and save to an existing .mot file. This will merge the animations from your blender scene and any missing bones that are in the .mot file.
Unsupported interpolation type for curve ... ... : Make sure all curves are as described in the Editing Animations section. You can't mix different interpolation types.
Unknown property: ... : You have added a keyframe to a property that can't be animated. Only animations for location, rotation (XYZ Euler) and scale are possible.
2B and A2 have some common bones but also unique bones that might have the same ID (2Bs skirt bones vs A2s hair bones). If you add keyframes to those unique bones and the animation is played on the other character, weird things can happen. For that reason you should not animate those bones. To avoid and fix such problems there are special functions under Object > NieR Tools > ...
Hide pl000f Irrelevant Bones: This will hide unique bones and only show common bones. This will make animating easier.
Remove pl000f Irrelevant Animations: If you accidentally added animations to unique bones and want to remove them, use this button.