Basic · From file to character
32 minYou are building: one character resource that points at a real 3D model, with its animation clip names written down correctly. Nothing renders it yet — the player scene arrives in lesson 8.
1 · Find a model you are allowed to use
You need a rigged, animated humanoid. Free and clearly licensed sources include Kenney, Quaternius and Mixamo. Look for idle, walk and run animations in the download.
Write down where each model came from and what its licence allows. You will need that list when you show the game.
2 · Get the file into the project
- Copy your
.glbor.gltfintores://models/. Drag it into the FileSystem dock, or copy it in the file manager and click back into Godot. - Godot imports it automatically. Watch the progress bar.
Prefer glTF to FBX
.glb and .gltf import natively and predictably. FBX needs an external converter and behaves differently between versions. If you only have FBX, convert it to glTF in Blender first.
3 · Read the import settings
Double-click the imported file to open Advanced Import Settings. Two things matter here.
- Your animations appear in the list on the left, each with a name. Write those names down exactly — capital letters included. You need them in step 5.
- If the model arrived as one long take, this dialog is where you slice it into clips.
Close the dialog with Reimport if you changed anything, or Cancel if you only looked.
4 · Point a character at it
- Click
res://resources/characters/01_knight.tres. - In the Inspector, open the Model group.
- Drag your imported scene from the FileSystem dock into Model Scene.
- Press Ctrl+S.
5 · Fill in the animation names
Open the Animation Names group and type the clip names exactly as the import dialog showed them. Common real-world names look like this:
A blank field means “skip that state”. In lesson 12 the lookup is deliberately defensive: a wrong or missing name is ignored rather than crashing the game. That is kind to you now and kinder to whoever adds the next character.
6 · Look at it
You cannot see it in the game yet, so check it on its own: double-click the model in the FileSystem dock and choose Open Scene. Find the AnimationPlayer node inside it and play a clip.
Note whether the model stands with its feet at zero, and roughly how tall it is. Lesson 7 fixes both.
Done when: one character resource has a model_scene, the animation names match the clips exactly, and you have written down the model's source and licence.
Challenge 1 · Two more characters 🟢 Easy
10 minRepeat the whole process for two more models.
- Each has its own
model_scene. - Each has its own animation names — they are usually different between packs, even for the same pose.
- Your source-and-licence list has three entries.
If a pack only gives you one model, use it three times with different stats and accent colours. Say so in your notes.
Done when: three characters point at a model and none of them share an id.
Challenge 2 · Find the names from code 🟡 Medium
12 minTyping clip names by hand invites typos. Print the real list instead.
extends Node
func _ready() -> void:
var data: CharacterData = load(
"res://resources/characters/01_knight.tres")
var model := data.model_scene.instantiate()
add_child(model)
var anim := _find_animation_player(model)
if anim == null:
print("no AnimationPlayer in this model")
return
print("clips: ", anim.get_animation_list())
func _find_animation_player(node: Node) -> AnimationPlayer:
if node is AnimationPlayer:
return node
for child in node.get_children():
var found := _find_animation_player(child)
if found != null:
return found
return null- Run it and copy the printed list into your notes.
- Compare it with what you typed into the resource.
- Fix any name that does not match, character by character.
Then answer: why does the function search recursively instead of looking at one fixed path?
Done when: the printed clip list and your resource agree exactly, for every character.
Challenge 3 · An import report 🟠 Harder
15 minExtend the checker you wrote in lesson 4 so it reports on models too. For every character resource it should say:
- whether
model_sceneis set at all; - whether the model contains an
AnimationPlayer; - which of the five animation names are missing from that model's clip list;
- the model's rough height, from its bounding box.
For the height, use the first MeshInstance3D you find and read get_aabb().size.y.
Free what you instance
A tool script that instantiates models must call queue_free() on each one. Otherwise every run leaks a character into memory.
Done when: the report prints one block per character, and correctly names a clip you have deliberately mistyped.
Extra · Make the cast yours 🔴 Open-ended
no limit- Model a simple character yourself in Blender and export it as glTF. Even a blocky one teaches you more than any download.
- In Blender, rename the animation actions to
idle,walk,runbefore exporting. Then the defaults inCharacterDataalready fit. - Build a credits page for your design document: every model, its author, its licence and a link.
- Try a stylised look — one flat colour per character, no textures. Does the cast read more clearly at a distance?