Videos / Episode 1
Episode 1 · AI Game Development

Character Pipeline

On YouTube: AI Game Development - Character Pipeline Ep1

From one reference image to a rigged, textured head with swappable hair: the full /newhead and /newhair pipeline on Cynan.

12 minPublished Oct 5, 202617 chaptersBlender 5.2Trellis.2Claude + Blender MCP

Overview

One reference image goes in. A game-ready head comes out: fitted to the shared body, rebuilt with animation topology, textured at 4K, rigged with 52 facial shapes, and wearing a hairstyle that can be swapped onto any other head.

Episode 1 follows Cynan, captain of the garrison, through the two repeatable skills that build every KnightZ character head: /newhead (8 steps) and /newhair (6 steps). Claude runs the steps in Blender and in a cloud Python workspace. Each step saves a versioned file and a review render, and nothing moves forward until the owner approves it.

This page expands on the video with the numbers, settings, tools and fixes behind each step, so you can follow the same process on your own characters.

208,701vertices in the raw AI bust
13,014quads in the final head
52ARKit facial shape keys
10,991quads of swappable hair

Chapters

Click a chapter to jump the player to that point.

Software and tools used

ToolVersion / typeWhat it did in this episode
ClaudeClaude desktop app, Opus modelRan every pipeline step, wrote and ran the scripts, rendered review sheets, kept the build records
Blender5.2Master scene, QuadriFlow remesh, shape keys, rig, final asset files
Blender MCPLocal MCP serverLets Claude drive the open Blender session: run Python, read objects, save files
Cloud Python workspacePython 3 with numpy, scipy, trimesh, fast_simplification, PillowHeavy geometry work: solidify, ICP fit, seam band, masks, visual hull, hair growth
bpy (headless Blender)pip wheel 5.2.2Cycles and Workbench renders in the cloud for review sheets and the episode frames
Trellis.2Image-to-3D generatorTurned the portrait into a textured 3D bust. Pixal3d, stable-fast-3d and Hunyuan3D were also tested on earlier heads
AI image generatorText-to-imageThree-quarter portrait, bald four-view head sheet, four-view hair sheet
MakeHuman hm08 headCC0 template meshAnimation-ready edge loops wrapped over the AI shape
Apple ARKit naming52 blendshape standardShape key names, so phone face capture and Unreal Live Link can drive the face
FilmoraVideo editorEdited the episode from the 44 rendered frames and narration

Everything runs on one desktop: RTX 5090 (32 GB), Intel Core Ultra 9 285K, 64 GB DDR5. Episode 2 covers the full hardware and software list.

Two skills: /newhead and /newhair

A skill is a saved set of instructions Claude loads on demand. Instead of pasting a page of steps into every session, you type one line. Both skills follow the same pattern:

  1. Load context first. Read the playbook, the "Don't" list of rejected attempts, and the script docs from the project, then rebuild the scripts in the cloud workspace.
  2. Ask once, only for what is missing. Character name, which base body, special notes such as scars or baldness.
  3. Back up before writing. The master Blender file is copied to a MayNeedLater folder before anything changes.
  4. Version every output. Each step writes a new file name (_v1, _v2), so any step can be reverted.
  5. Gate on approval. Renders go to the owner at fixed points. A rejected attempt is reverted and added to the "Don't" list so it never repeats.
  6. Record. New methods, numbers and failed attempts go back into the project docs, so the next character starts with everything learned so far.
How a new head starts
/newhead Cynan
[attach: 3/4 portrait + bald four-view head sheet]
Notes: scar across the nose bridge, chipped front tooth, keep the AI face shape. No stubble.
Why it works: the skill already holds the 8 steps, the rules and the file paths. The prompt only needs what is unique to this character.
How the hair starts
/newhair Cynan
[attach: four-view hair reference]
Style: medium shag, dark brown with grey streaks. Hair only, no stubble.

/newhair: building the hairstyle, step by step

Hair is its own skill and its own object, so any style can be moved to any head. It is built as hair cards: thin strips with a strand texture and transparency.

01Hair reference

A four-view hair sheet from the image tool: a medium shag, dark brown with grey streaks. Same four views as the head sheet.

Cynan four-view hair reference
Four-view hair reference: front, left, back and right.

02Masks and camera fit

Each view is split into background, skin and hair using colour and local texture variance. Hair is fine and noisy; skin is smooth and more saturated. That difference finds the hairline. Only hair regions that reach the top 30 % of the panel are kept, which drops shoulders and stubble.

A camera fit then scales and shifts our clay render until its outline matches each reference silhouette. For Cynan all four views agreed on a shared scale of 0.83, with a silhouette error of 0.5 to 2 %. From that point every reference pixel maps to a point on our head.

03Visual hull

With four matched silhouettes, the volume all four views agree on is carved out. Subtract the head and what remains is where hair lives and how thick it is at each point on the scalp. A minimum thickness of 8 mm stops thin spots at the back from going bald.

04Strand atlas

Most of the look comes from one 2048 px texture: 8 columns of fine, clumped strands, 90 to 120 strands per column, painted procedurally with colours sampled from the reference hair, including the grey streaks. Roots are darkened over the first 45 % of each strand.

Procedural strand atlas detail
Detail of the strand atlas: clumped, wavy strands with alpha.

05Hair cards

Roots are scattered over the scalp with Poisson spacing (9.5 mm), in four layers at different heights. Each strand grows along a flow field: swept back, pulled down by gravity, a fringe across the forehead (45 % of the front roots) with a ragged stop line, and stop rules around the ears. Strands end at heights set per angle around the head. Cynan's hair is 10,991 quads (21,982 triangles), inside the budget for short hair at the time.

Ear rule from the reference: hair touches the ear over the top and back (2 to 3 mm), sits 4 mm behind the lobe, and never covers the ear below or in front of the lobe.

06Final check against the reference

The atlas goes on the cards and the hair is rendered through the same four cameras, side by side with the reference. That comparison is the approval gate.

Final hair compared with the reference in four views
Reference (top) and our hair (bottom), plus top and three-quarter views.
Fixes during the hair build: a bald stripe over the top (surface sampling returned only 33.5k of 60k points; switched sampler), a bald back crown (hull too thin; dilated hull for the exit test), a visible part gap (hard split replaced by a smooth outward term), and a fringe that looked like a bowl cut (only 45 % of front roots forward, ragged stop).

Approval gates and versioned files

GateWhat the owner seesPossible answers
After the seam fitFront, side and back renders on the bodyApprove, or list what is off (for Cynan: too far forward, scale down)
After emote topologyWireframe sheet: face, eye loops, mouth loops, cutawayApprove or edit
After skinCycles close-ups beside reference cropsApprove or list fixes
After hairFour views plus ear close-ups beside the referenceApprove, edit, or revert to the last version
After the face rigExpression contact sheetApprove

Every step writes a new file name (for example Cynan_fit_v1, then Cynan_fit_v2), and the master scene is backed up before each write. A rejected step is reverted from its file, and the attempt is written to the "Don't" list in the playbook.

Prompts and feedback used

The skills carry most of the instructions, so the prompts in this build were short. These are the inputs that moved Cynan forward, condensed from the session records.

Fit feedback that produced fit v2
The brow, nose, ears, chin and Adam's apple sit too far forward. Scale the head down. The neck angle looks wrong.
Result: head scaled to 94 % and aligned by the ear position. Approved as fit v2, and a new rule was saved about ear position.
Touch-up request
Smooth the neck seam.
Result: kink 18 to 2.4 degrees, seam normals matched, colour band blended. It also exposed the shape-key-at-1.0 bug.
Rig request
Rig head and hair.
Result: face rig checked, hair weighted to the head bone. A 20 degree head turn moves the hair with the scalp (69 mm at the top).
Body binding
Full body pass.
Result: head bound to the HM1 body rig with 4 influences, seam vertices copying body weights exactly. Pose test: seam gap 0 mm.

What we learned

  • AI gives the shape; you build the structure. Image-to-3D gives a likeness in a minute. Topology, UVs, rig and seams still have to be built.
  • One shared seam makes everything modular. The 64-vertex ring is why heads, hair, helmets and bodies can be mixed.
  • Measure against your own model. Place features relative to your head, never by projecting the reference image.
  • Procedural detail beats sampled detail. Take tone and colour from the reference; generate pores, lines and scars in 3D.
  • Every fix becomes a rule. The ear-position rule, the seam fade distances and the shape-key reset all came from Cynan and now apply to every head.

Try it yourself: checklist

  • Pick one shared base body and lock its neck ring vertex count before building heads.
  • Generate a portrait and a bald four-view sheet with consistent views and lighting.
  • Run two or more image-to-3D tools and rank them against the portrait.
  • Solidify the AI shell before remeshing; thin shells break remesh tools.
  • Fit with scale and position first; fix the pitch if free rotation tilts the head.
  • Wrap a template head (MakeHuman CC0) for animation loops.
  • Bake procedural detail into colour, roughness and normal maps at 4K.
  • Name shape keys to the ARKit standard if you want phone capture.
  • Version every file and keep a written list of attempts that failed.

Glossary

TermMeaning
Image-to-3DAn AI model that turns a picture into a textured 3D mesh
TopologyHow the polygons of a mesh are laid out; good topology follows muscles so faces deform cleanly
ICPIterative closest point: an algorithm that aligns one shape to another by repeated matching
QuadriFlowA remesher built into Blender that converts triangles into evenly sized quads
UV islandA flattened piece of the mesh that a texture is painted onto
ORM mapOne texture holding ambient occlusion, roughness and metalness in its three channels
Shape key / morphA stored version of the mesh, blended in to make an expression
ARKit 52Apple's standard set of 52 facial shapes used by phone face capture
Visual hullThe 3D volume consistent with several 2D silhouettes
Hair cardA flat strip with a strand texture and transparency, the standard way to draw game hair

Episode narration

Show the narration (condensed)

IntroWelcome to KSUIE_Gaming. We are building KnightZ, a 3D action adventure game, and this channel follows the AI pipeline we use to make it. In this first episode we take one character, Cynan, captain of the garrison, from a single reference image to a game-ready head with skin, hair and a face rig.

OverviewThe work is split into two repeatable skills. Newhead builds the head. The first four steps take us from a reference image to an AI mesh, fit it to our base body, and rebuild it with topology that can animate. The next four steps finish the head: a reference sheet to line up features, the skin textures, the neck seam blend, and the face rig. Newhair builds a swappable hairstyle on top: the hair sheet, masks and camera fit, the visual hull, the strand atlas, then the hair cards and a check against the reference. Every step ends with a saved, versioned file and a review render, and nothing moves forward until I approve it.

ReferenceEverything starts with a reference. For Cynan I generated a three-quarter portrait and a bald four-view sheet: front, both sides and back. The portrait carries the details we want to keep: the scar across the nose bridge, pale brown eyes and a chipped front tooth.

AI meshThe portrait goes through image-to-3D. I run several generators and rank them against the reference; for Cynan, Trellis.2 gave the best likeness. In under a minute we have a textured bust with 208,701 vertices. Up close it is a dense soup of triangles with no edge flow.

Seam fitOur characters share one base body, HM1. We solidify the AI shell, remesh it into clean quads, and fit it to the base head with a scale and position solve. The key is a ring of 64 vertices around the neck. Every head welds to exactly the same ring with a gap of zero.

Emote topologyWe wrap a MakeHuman head template over the shape. It brings proper edge loops, then the face area is subdivided for detail. This head lands at 13,014 quads. Inside, we build eyeballs with lids, teeth, gums, a tongue and a mouth bag. Cynan's chipped incisor is modeled into the upper teeth.

Reference sheet and skinWe render our own clay head in the same four views as the reference and place features relative to our own eyes, ears and mouth. The face island is scaled up 1.6 times and the base colour map is 4K. Tone, brow shape and eye colour come from the reference. Pores, wrinkles, crow's feet and the nose scar are generated procedurally in 3D and baked into colour, roughness and normal maps.

Neck seam and face rigWe smooth the shape across the seam, match the normals, and blend the head colour into the body tone so the join disappears. Then a jaw bone, two eye bones and the 52 ARKit facial shape keys, named to Apple's standard.

HairEach view is split into background, skin and hair. A camera fit matches our head outline to the reference silhouette. With four matched silhouettes we carve the visual hull. The strand atlas holds eight columns of clumped strands. Roots are scattered over the scalp and each strand follows a flow field. Cynan's hair is 10,991 quads.

OutroThis is Cynan: AI mesh, fitted to our body, animation topology, procedural skin, a 52-key face rig and swappable hair. Because every head shares the same neck seam, this body can wear any of them.