I am a developer, not a 3D artist. I have never sculpted a character with a mouse. Still, the companions in the walking game I am preparing are small clay-toy creatures rendered in 3D. They are built entirely by Python scripts that Blender runs from the command line, and I say it plainly: I wrote those scripts with the help of an AI assistant. This is how the pipeline works and what I learned from it.
The idea: describe the character in code
Blender can run a Python file without opening its window. Inside that file the bpy module can do what I would otherwise do by hand: create shapes, give them materials, place lights and a camera, and render an image.
So a character becomes a function. One call makes the body, the next the belly, then the eyes, ears and feet, each with a position, a size and a colour. Nothing is stored in a project file that only I could open and understand. If a creature needs bigger eyes, one number changes and the script produces every frame again.
For someone who cannot model, this matters. I can look at a picture, say what is wrong in words and see the change as a few edited lines that I am able to review.
A few simple shapes go a long way
The five companions in my script use a very small set of building blocks. A sphere that can be stretched. A cone with softened edges for ears and beaks. A ring for a scarf or a pair of glasses. A curve with thickness for a mouth, a closed eye or a stem.
Complicated forms are avoided on purpose. A fluffy creature is a ball surrounded by twenty-six smaller balls, spread with the golden angle so they do not line up, and skipping the side where the face goes. A stone creature is a sphere with a cloud noise texture pushing its surface slightly in and out.
The face is one shared function. Two dark eyes, each with two small white highlights, and soft cheeks. Those highlights do more for the character than any amount of extra geometry.
Materials, lights and the colour trap
All materials start from the standard physically based shader with a few values changed: roughness, a thin clear coat and a little light scattering under the surface, which gives the soft toy look. Colours are written as the usual six digit codes and converted to linear values in code, because Blender expects linear numbers.
The lighting is the same for every creature: a warm key light, a cooler fill, a warm light from behind and a pale blue sky. The camera is orthographic, so a character does not change shape when it moves.
One setting is easy to miss. Recent Blender versions apply a film-like colour transform by default, and my bright toy colours came out washed. Switching the view transform to Standard gave the colours I had typed.
Animation is arithmetic
There are no bones and no keyframes. Each animation is a function that receives the frame number and returns a few values: how much the body bobs, how far it sways, whether the eyes are closed and how high it jumps. Sine waves do almost all of the work.
There are four animations, twenty-four frames each. Walking moves the feet in opposite phase and bobs the body twice per cycle. Idle is slow breathing with a short blink near the end. Joy is two little jumps with a squash before each one and happy curved eyes. Sleep keeps the eyes closed and breathes slowly.
For every frame the script resets Blender to an empty scene and builds the character again. That is wasteful, but it removes a whole class of bugs where something left over from the previous frame changes the next one.
From frames to something the app can use
The render has a transparent background. A second, ordinary Python script takes the frames and adds the ground shadow: a blurred ellipse drawn with an image library, a little smaller when the character is up. Drawing the shadow afterwards is simpler than asking the renderer to catch it, and it is easy to tune.
The same step can write an animated preview file, which is what I look at while adjusting. For the app, another script packs the frames into a sheet, six frames wide, so the game loads one image per animation and draws the part it needs.
A switch on the command line turns the character around to render it from behind, with no extra code for a second view.
Working with an AI on shapes
The loop is short: I describe what I want, the assistant edits the script, Blender renders and I look. My judgement is only in the last step, and it is a real one. A technically correct creature can still look sad, heavy or odd.
Descriptions work better when they are about the picture and not about the code. Rounder, ears closer together or the eyes look surprised led to useful changes. I also learned to render a single still image first and only produce all frames once the shape was accepted.
The same approach gave my slingshot puzzle game its eleven courier portraits, with a separate script and the same idea.
Limits
This method suits soft, rounded characters made of simple parts. It would be a poor choice for realistic people, cloth or anything that needs a skeleton. The look is recognisably built from primitives, and I chose a style where that is a virtue.
Rendering takes time, and the script that builds all the game's artwork runs long enough that I learned not to interrupt it, because it clears its output folder before it starts.
Why five characters look like one family
Consistency comes almost free when everything is code. All creatures use the same material function, which creates a material once and reuses it by name. They share the face function and the feet function, stand in front of the same camera and are lit by the same three lamps. A new companion inherits all of that and only has to be different where I want it to be.
The differences are then easy to read in the file: a fox gets cones for ears, a tail made from a thick curve and a darker nose; an owl gets rings that look like glasses. When I compare two characters I compare two short functions.
Options I reach for while adjusting
The script takes a few options after the usual Blender arguments: which characters to render, how many frames, the image size, which animation, the viewing angle and a switch for a single still image. A still at a small size is the fast way to judge a shape. Full animations at the final size are the slow way to produce what ships.
The renderer is the path-tracing one with a modest number of samples and noise removal. The script tries to use the graphics card and falls back to the processor if it cannot, so the same command works on a machine without a suitable card, only more slowly.
If you want to try
- Start with one creature and one still image.
- Put every size and colour in the code where you can see it.
- Share one face function between characters.
- Set the view transform to Standard if colours look pale.
- Use an orthographic camera and a transparent background for game sprites.
- Add the shadow afterwards in a separate step.
FAQ
Do I need to know 3D modelling to make this kind of character?
Not for simple rounded shapes. You need to judge pictures and describe what to change.
Who wrote the scripts?
I wrote them with an AI assistant, and I review the results by looking at the renders.
How is the character animated without bones?
Each frame is built from a few numbers, mostly sine waves, that move and squash the parts.
Why do my Blender colours look washed out?
The default colour transform changes them. Setting the view transform to Standard keeps the colours you typed.