A character that faces every way
Top-down and isometric games need a character that turns: south, south-east, east and so on round to south-west. Polymation builds one file with every facing and a state machine your game drives with a single number. It works from drawn frames, from a rigged character per facing, or straight from a 3D model.
- You bring
- Drawn facings (a flipbook each), a rigged file per facing, or a glTF/GLB model (Blender, Maya, Mixamo, an asset store).
- You get
- One
.rivwith an animation per facing (per animation) and aDirectionsstate machine. From a 3D model, also every frame and a sprite sheet per animation. - Needs
- Chrome or Edge for 3D models. Drawn facings need the npm install.
Ask your assistant
- I want my character to face eight directions in my top-down game.
- Put my front, side and back rigs together so the character turns.
- My idle and walk are rigged facing S, SE, E, NE and N: make one file with a direction input.
- Render my Mixamo character's run and idle from 8 directions at an isometric angle, as 64-pixel pixel art with an outline.
- Make sprite sheets of this
.glbfrom 4 sides for my top-down game.
How your game drives it
The state machine Directions has a number input direction: 0 faces south (toward the viewer), and each step turns right. With eight facings, set direction = round(angle / 45) mod 8. With several animations, a second input animation picks the move. Sixteen facings work the same way, in steps of 22.5°. Turning keeps the step: every facing of a walk plays on one clock, so a character that turns mid-stride carries on from that stride instead of starting the walk again.
From drawn facings
sprite_art_brief in directions mode asks your image model for each facing in its own request: S, SE, E, NE and N. The other three are mirrored, unless the character's sides differ. assemble_sprite_animation builds an animation per facing. With several moves, name each animation by move and facing (walk_s, walk_e, idle_s…) and every one of them becomes a facing of its move.
From a rig per facing
Rig each drawn facing (from a picture: Rig a character from a picture), animate each under the same animation names, then assemble_facings puts them in one file. Each facing is copied whole, with its bones, skins, constraints and images. The missing sides are their mirror turned over around the figure's axis. A facing's own walk_e counts as its walk. It works on any artboard, not just rigs, so facings made as flipbooks or as plain vector art combine the same way.
From a 3D model
render_model_facingsloads the model and turns it to every facing under fixed lights, so nothing is mirrored and every side is really drawn.- The camera: 30° above is the usual game view, 35.264° true isometric and 0° a side view. It is orthographic by default, or perspective.
- One size and one foot point across every frame of every facing, measured over all the animations, so the character never jumps between facings. Walks and runs play on the spot.
- Pixel art: set a pixel size to render small and crisp, with an outline if you want one.
- Out come the frames, a sprite sheet per animation (a row per facing) and the
.riv, plus a picture of every facing to check.
Good to know
- Mirrored facings assume the character's left and right match. A sword in one hand or a side bag needs all eight drawn (or rigged).
- From a 3D model the lights stay put while the model turns, so opposite facings are lit differently. That's correct for a scene lit from one side. For exact mirror pairs, light from straight above and in front.
- Compressed glTF (Draco, meshopt, KTX2 textures) isn't read: export uncompressed. A Spline scene needs exporting as glTF from Spline first.
assemble_facingsreplaces the facings' own state machines withDirections. The notes say what it set aside.
Related
- Video clip to sprite animation: animate each facing from a clip.
- Rig a character from a picture
- Animate a pixel character