Skip to content
NP Editor Docs

Editing animations

New in 0.10.3: the Asset Editor has an Animation tab, and you can split a prefab into parts and animate it.

Move the bones (groups) of an imported model to create and edit animations. Set keys, control the speed between keys as in After Effects, and fire particles and sounds (VFX) at a given time. Edited animations are saved to an engine file (.nprig) in the project, and the source model file is not touched. To only view the animations already in a model file, see “Importing and viewing an animated model” in Importing custom models. To export to other programs or the game, see Exporting animations and viewing in game.

The example model is robot, a small Blockbench model with head, body, arm and leg bones (animations walk and wave). You create a new animation nod that makes the head nod.

  1. Right-click the model in the Content Browser and click Edit animation.

    Edit animation in the content entry right-click menu

  2. The Asset Editor window opens with the Animation tab selected. The top row has the animation list, Length and the end behavior. Below it are the handle and playback buttons, the preview is in the middle, the Bones list and value fields are on the right, and the timeline is at the bottom. You get the same result if you double-click the model in the Content Browser and click the Animation tab in the Asset Editor.

    The Animation tab of the Asset Editor

  1. Click New animation (+), type nod in the name field next to it, and press Enter to rename it. A new animation is 2 seconds long and set to Loop.

    The New animation button and the name field

  2. Click Head in the Bones list on the right. You can also click a bone in the preview. The selected bone’s name, time and values appear under Current pose (selected bone).

    Head selected in the Bones list

  3. With the time at 0 seconds, click Key (K). The selected bone’s current pose (position, rotation, scale) becomes the key at 0 seconds.

    The Key button — a rest pose key at 0 seconds

  4. Click the 0.5-second mark on the ruler at the top of the timeline to move the time, then click Rotate (E) (E). Drag the X ring of the rotation handle in the preview to tilt the head, then release the mouse. If auto key (●) in the handle row is on, a rotation key is created at 0.5 seconds when you release.

    The head tilted with the rotation handle and the key at 0.5 seconds

  5. Click the 1-second mark on the ruler and type 0 in the first (X) field of Rotate under Current pose (selected bone). Changing a number adds a key at the current time on that channel — at 1 second the head is upright again.

    The Rotate X field under Current pose

  1. Click the rotation key at 0.5 seconds on the timeline to select it, then click Smooth under Speed control (After Effects keyframe velocity) on the right (F9). The motion slows down going into and out of the key and becomes smoother, and Interpolate under Selected keys changes to “Speed control (bezier)”.

    The Smooth button

  2. Select Value graph in the view field at the top left of the timeline. The values of the selected row (head rotation) appear as a curve, so you can check that it eases before and after 0.5 seconds. Speed graph shows the speed between keys.

    Head rotation in the Value graph

  3. Set the view field back to Key, and at 0.5 seconds click Particle above the timeline. A key appears in the VFX (particles · sounds) row at the top. Under VFX (selected) on the right, set the particle id, Shape, Count, Spread, Speed, Color, Size, Duration and the bone to follow in Bones (example: minecraft:flame, 30 particles). For a Sound, set the sound event, Volumes and Pitch.

    The Particle button and the VFX fields

  4. Click Play / Pause (Space) (Space). The head nods in the preview, and particles appear as it passes 0.5 seconds. Click again to stop.

    The play button

  5. Click Save (Ctrl+S). “Saved — engine file (.nprig), source model unchanged” appears at the bottom, and the animation is saved to assets\anim\robot.nprig in the project. The source robot.bbmodel does not change. While there are unsaved changes, the button reads “Save *”.

    The Save button

A prefab is a group of blocks, so it has no bones. Split it into parts (bones), then animate it with the same editor. The example is the prefab lid_box, a wooden lid on a stone base.

  1. Right-click the prefab in the Content Browser and click Edit animation. The Prefab animation window opens (at first there is one part, All). Click Pick cells on the left to turn it on, then click a lid block in the preview. The connected blocks (the 3 lid blocks) are selected together.

    The lid selected with Pick cells on

  2. Click New part. The selected cells become a new part, and its pivot is the bottom center of the selected cells. Type lid in the Name field and press Enter to rename the part.

    The New part button and the Name field

  3. As in steps 3–7, create a new animation open, add a key at 0.5 seconds that turns the part lid −90° around the X axis, and click Save. The parts and the animation are saved together to assets\anim\prefab_<prefab id>.nprig.

    The prefab animation with the lid open

  • Snap the handles: Ctrl+drag a handle to snap rotation to 15°, movement to 1 px and scale to 0.1. Bone local axes / world axes switches the handle axes between the bone’s own axes and the world axes.
  • Pose with auto key off: turn off auto key (●) in the handle row and releasing a handle no longer creates a key. Refine the pose, then record it with Key (K). Key records only the selected bone, so if you moved several bones, select each one and click Key. If you move the time before recording the key, the pose you set is lost.
  • Several keys at once: drag an empty spot on the timeline to box-select, or add keys with Ctrl+click or Shift+click. Dragging selected keys snaps them to 0.05-second steps; Alt+drag moves them without snapping. With several keys selected, clicking Smooth, Ease in or Ease out applies the same speed to all of them.
  • Right-click the timeline: right-click a key to open a menu with speed control, interpolation, copy, paste and delete; right-click the VFX row at the top to open a menu that adds a particle or a sound. Double-click an empty spot on a row to create a key on that row at that time.
  • Influence: Influence under Speed control (default 33.33%) is the share of the time to the neighboring key over which the motion slows down. A larger value slows it down over a longer stretch. Speed control is saved as Bézier handles, so the game server’s animation module moves along the same curve.
  • Models without animations: even a model with no animations or bones, such as an OBJ, can be animated as a single bone (the whole model) when you open the Animation tab. bbmodel groups and glTF nodes become bones as they are.
  • Fold a bone row: click the ▾/▸ at the left of a timeline bone row to fold or unfold that row (position, rotation, size) without selecting the bone. A fold or unfold you made yourself always wins, and only bones you have never set are unfolded automatically when you select them. Setting keys or undoing leaves the folds as they are, and reopening the model returns them to the starting state.
  • Close an open list: the open lists of the Asset Editor (the animation list of the Animation tab, the animation, speed, and morph lists of the animation bar in the Preview tab, and so on) close when you click outside the list or press Esc. Right-clicking or middle-clicking the 3D preview also closes them.
  • Survives reimport: edited animations live in the engine file under assets\anim\, so they stay attached when you reopen the model or Reimport it.
AreaContents
Top rowAnimation list · New animation · Duplicate animation · name field · Delete this animation · Length (seconds) · end behavior (Loop · Once · Hold last pose) · View in game · Export… · Undo (Ctrl+Z) · Redo (Ctrl+Y) · Save
Handle and playback rowMove (W) · Rotate (E) · Scale (R) · Bone local axes / world axes · Show skeleton · To start (Home) · Play / Pause (Space) · Stop — back to start · To end (End) · Loop preview playback · playback speed (0.1×–2×) · auto key · Key · current time
RightBones list · Current pose (selected bone) (Position · Rotate · Size) · Selected keys (Time · Values · Interpolate) · Speed control (After Effects keyframe velocity) · VFX (selected)
TimelineView (Key · Value graph · Speed graph) · Fit to clip length (F) · Particle · Sound. VFX row at the top, one row per bone (expand for position · rotation · scale), morph rows

The units in Current pose (selected bone) are position in px, rotation in degrees and scale as a factor (relative to the rest pose) for bbmodel models, and position in blocks, rotation in degrees and scale as a factor for other models.

NameActionShortcut
SmoothSlow both going into and coming out of the key (Easy Ease)F9
Ease inSlow down gradually going into this keyShift+F9
Ease outStart slowly from this key and speed up graduallyCtrl+Shift+F9
ConstantSame speed (linear)—
StopHold until the next key (stepped)—

You can also pick “Constant (linear)”, “Smooth curve (catmullrom)”, “Hold (step)” or “Speed control (bezier)” directly in Interpolate under Selected keys. The F9 keys work after you click the timeline.

ShortcutAction
W · E · RMove · rotate · scale handle
K · InsertKey the selected bone’s current pose
SpacePlay / pause
Home · EndGo to start · end (timeline)
FFit to clip length (timeline)
Ctrl+C · Ctrl+VCopy selected keys · paste at the current time (timeline)
Ctrl+A · DeleteSelect all keys · delete selected keys (timeline)
Ctrl+Z · Ctrl+YUndo · redo
Ctrl+SSave
EscCancel a handle drag
Ctrl+wheel · Shift+wheelZoom the timeline · scroll it sideways

If you close the Asset Editor or the Prefab animation window, or open another asset, with unsaved animation changes, the editor asks: “There are unsaved animation changes. Save them?” (in the Prefab animation window: “There are unsaved changes. Save them?”). Save saves and closes, and Don’t Save discards the changes and closes. Keep editing, the window’s X and Esc keep the window open so you can go on editing. This dialog always appears above floating windows.

Field · buttonAction
Parts (bones) listThe parts and the cell count of each. At first there is one part, All
Name · PivotName and pivot (in blocks) of the selected part. Pivot = bottom center of the selected cells sets the pivot to that point
Pick cellsWhen on, clicking a block in the preview selects the connected blocks, Ctrl+click selects one cell, and Shift+click adds to the selection
New part · Add to this part · Delete part · DeselectMake a part from the selected cells · add the selected cells to the selected part · delete the part (its cells go to the parent part) · clear the selected cells

In the game, each part moves as a block display. View in map at the bottom left of the window plays the animation you are editing temporarily in the main viewport map. The Animation button in the Edit prefab window also opens this window (Prefabs).