Give a 3D character a walk, run or idle animation
Have an Agent give a 3D character a skeleton for its kind of body and moves such as walk and run, then see them in your game.
To walk or run in a game, a 3D character needs a skeleton inside it and moves made for that skeleton. An Agent can add both: it checks that the character can take a skeleton, fits one made for its kind of body, and adds the moves you name, such as walk and run. You ask in the project’s chat, then see the moves in your game.
To get the character in the first place, from a description, a drawing or a photo, see Add 3D models to your app or game.
Ask for the moves
- Open the project’s chat.
- Say which character: one an Agent sent earlier in the chat, one already in the project, or a model file you attach with + (GLB, FBX, OBJ or STL). See Send photos, files and sketches to an Agent.
- Say what kind of body it has. See Say what kind of body it has.
- Name the moves, up to five at a time.
- If your game moves the character around by itself, ask for the moves in place. See In place or moving.
- Optionally, say which file your game needs: GLB or FBX. If you don’t know, leave it to the Agent.
For example:
Animate the fox from this morning. It walks on four legs. Add idle, walk and run, in place, because the game moves it. Send it as GLB.Say what kind of body it has
The Agent fits a skeleton made for one kind of body. Saying which kind your character has helps it pick the right one.
| Body | For example | The Agent’s --rig-type |
|---|---|---|
| Two legs | A person, a robot, an animal standing upright | biped |
| Four legs | A dog, a horse, a fox | quadruped |
| Six legs | An insect | hexapod |
| Eight legs | A spider | octopod |
| A bird | A parrot, a chicken | avian |
| A long body without legs | A snake | serpentine |
| A body made for water | A fish | aquatic |
Name the moves
The help for modelgen anim retarget gives walk and run as its examples, and takes up to five moves in one go. Ask for the moves your game uses, such as idle (standing still), walk and run. To know which other moves it can add, ask the Agent.
Each move counts toward your plan’s AI usage, so ask for the ones the game plays. See Understand your usage.
In place or moving
| Ask for | What you get |
|---|---|
| In place | The character moves its legs but stays on the spot, and your game moves it around. The help calls this “no root motion”. |
| Nothing said | The move itself can carry the character forward. |
Not sure? Say how the game moves the character, for example “the player steers it with a joystick”, and let the Agent choose.
What the Agent does
- It checks whether the character can take a skeleton. If it can’t, it tells you. See Questions.
- It fits the skeleton for the body you named.
- It adds the moves you asked for, in place if you said so.
- It sends the animated character in the chat as a GLB or FBX file.
Look at the moves
The animated character arrives in the chat as a file. AirBuild has no 3D viewer of its own: tapping the file hands it to your device, as described in Add 3D models to your app or game. Whether you see the moves there depends on the app that opens the file.
To watch the moves, put the character in your game and play it in Preview.
Put it in your game
Tell the Agent when each move plays:
Use the animated fox as the player. Play idle when it stands still, walk when it moves, and run when it goes fast.The Agent adds the character to the project and the game. Once the game is built again, open Preview and play it. See Make a game.
If a move looks wrong, say which move and what you saw. The earlier files stay in the chat.
To have parts of a model move on their own, such as a car’s wheels, see Split a 3D model into parts.
Questions
The Agent says the character can't be animated.
modelgen make has a preset for it (--for anim). Attach a picture of your character as the starting point.