Rebuilding Procedural Playground by hand
Stage 2 of 11: all the posts
  1. Before you start
  2. 1A new project
  3. 2Leela's model and texture
  4. 3The ground, the sun and the dusk
  5. 4Second-order dynamics
  6. 5The camera
  7. 6The picture
  8. 7Leela's scene
  9. 8Standing and walking on physics
  10. 9Her bones
  11. 10The player's keys
  12. 11Going further
  13. Last: full screen
  14. How this was checked

Stage 2 of 11

Leela's model and texture

By the end

  • Leela's model and texture in your project, imported.
  • A look at what's inside the model: her skeleton, her seventeen bones and her eighteen clips.
  • leela.tres, a material carrying her texture, ready for stage 8.

Leela is one of the owner's models. Her file holds a mesh, a skeleton and eighteen animation clips.

Bring the files in

  1. In the FileSystem dock, right-click res:// → Create New → Folder... and make misc, then Blends inside it, then textures inside that.
  2. Right-click Blends → Open in File Manager, and copy two files in from the repo:
    • misc/Blends/Leela.blend into misc/Blends/
    • misc/Blends/textures/Leela_Texture.png into misc/Blends/textures/
  3. Go back to the editor. It imports both; the model takes a few seconds, because Blender is run to turn it into something Godot reads.

Leave the import settings alone. The repo's model is imported with every option at its default. The texture needs nothing either: once it's used in 3D, Godot re-imports it by itself, compressed for the graphics card and with mipmaps.

Look inside the model

Double-click Leela.blend in the FileSystem dock. The window that opens (Advanced Import Settings for Scene 'Leela.blend') shows what Godot got out of the file. Change nothing; look:

  • RobotArmature → Skeleton3D → Leela. The mesh hangs under the skeleton that bends it.
  • AnimationPlayer with eighteen clips. Click Walk and press the play button under her picture. The skull at the other end of that row draws her skeleton over her. You'll use three clips: Idle, Walk and Jump.

She has no arms and a big head. She faces +Z, the opposite of Godot's forwards, and she's 5.3 units tall. Stage 7 turns her round and scales her to 1.05 m.

Press Close.

Her bones. That window doesn't name them. To see them, open the model as a scene of its own for a moment:

  1. Scene → New Inherited Scene..., and in Open Base Scene choose misc/Blends/Leela.blend.
  2. Click Skeleton3D in the Scene dock. The Inspector begins with Bones, a tree of all seventeen.
  3. When you've looked, close the scene's tab and answer Don't Save.

What the tree shows:

  • Up the middle: Body → Torso → Chest → Neck → Head.
  • Each leg is UpperLeg, MidLeg, LowerLeg, FootBack (with .L or .R): a zig-zag with the knee forward, the hock back and the ankle forward.
  • Foot.L and Foot.R hang from nothing. In Blender they were handles for an animator to drag, and they also carry the sole and toes of the mesh.
  • PoleTarget.L and .R are Blender helpers that move nothing here.
Clip · 1:12 · no sound The import window with her nodes and clips, Walk played, and then her bones in an inherited scene that's shut again unsaved.

Her material

In the import window she was plain white. The texture didn't come through with the model (the material the import makes is empty), so she gets a material of her own.

  1. Make a folder robots. Right-click it → Create New → Resource..., pick StandardMaterial3D, and save it as leela.tres.
  2. With leela.tres showing in the Inspector, set:
SectionPropertyValueWhy
AlbedoTextureLeela_Texture.png (drag it in from the FileSystem dock)Her colours.
SamplingFilterNearestHard-edged texels, which suit the pixel look.
  1. Save (Ctrl+S).

Nothing uses this material yet. In stage 8 you hand it to Leela's body, and in stage 9 the script that moves her bones puts it on her mesh.

Checkpoint

Leela.blend has a scene's icon in the FileSystem dock and opens the import window when double-clicked, and the Inspector's preview of leela.tres is a ball wrapped in her texture.

  • A red cross on Leela.blend, or it won't open: the Blender path is missing or wrong, or that Blender is older than 3.0.