Load and animate the Blender-authored NPC base mesh
Wire the skinned model from ADR-0013 into NpcAvatar: - _build_skinned_body() instantiates the imported npc_base.glb, binds the 14 armature bones, and keeps the procedural _build_body() as the offline fallback (use_skinned_model can force it in tests) - outfit_for()/layer_for() tint the five material slots through the new SurfaceMaterials.npc_slot(); accessories and hand items attach under Rig/Head - the existing limb pivots (Hip/Knee/Shoulder/Elbow/Hand + Head marker) keep the old animation math; _sync_skeleton() copies their rotations to bones. Bone pose rotation is absolute local orientation, so it is composed with the rest basis (otherwise the whole body snaps into a broken pose) - skinned rigs scale uniformly (non-uniform parent scale shears the skin) and keep Rig/Head for the focus cone, nametag, and reaction tag - commit the editable npc_base.blend plus a .gdignore: Godot's editor otherwise tries to import the blend and hangs during --import - npc_pipeline audit tests (contract, textures, clean GLB, committed source) Verification: headless 212/212, Python tooling 60/60, NPC budget 16 avatars = 144 meshes at ~6.9 ms, movement/focus/props smokes pass, compare 11 good / 0 bad. TODO Phases 0-3 checked; environment lift and release remain.
No files matched your search
@@ -69,7 +69,10 @@ From `src/game/npc_avatar.gd` and `src/game/guard_controller.gd`:
|
||||
|
||||
Record the working invocation in `MEMORY.md` (the Im-Dornäcker notes already
|
||||
warn about the cwd gotcha).
|
||||
2. Freeze the asset contract in writing (this document + ADR-0013):
|
||||
2. Freeze the asset contract in writing (this document + ADR-0013). No
|
||||
animation clips are exported: `_animate()` and `_idle_layer()` drive the
|
||||
armature bones directly at runtime, so the GLB only needs the skinned rest
|
||||
mesh, the armature, and the material maps.
|
||||
- `assets/models/generated/npc_base.glb` — one skinned mesh (or a small fixed
|
||||
set of sub-meshes: body / head / hands) with a **named armature** and UVs.
|
||||
- Material slots rather than one atlas-per-prop: `skin`, `cloth`,
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 835 KiB After Width: | Height: | Size: 845 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 527 KiB After Width: | Height: | Size: 534 KiB |