pixelkiln 0.124.0 → 0.125.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,8 @@ machine with a 12 GB RTX 3060.
30
30
  it requires, by name.
31
31
  - **Hands that close,** on the painted path. Where the mesh has a thumb apart
32
32
  from the fingers, each hand gets a thumb, one chain for the four fingers
33
- together, and a point that marks where a grip goes.
33
+ together, and a point that marks where a grip goes. A hand drawn as a
34
+ closed fist gets the grip point alone, which is enough to hold something.
34
35
  - **Stock animations.** Motions from a humanoid library made for another
35
36
  skeleton, carried over bone by bone.
36
37
 
@@ -182,7 +183,10 @@ gets seven more bones: `LeftThumbMetacarpal`, `LeftThumbProximal`,
182
183
  `LeftMiddleDistal` (the four fingers move as one, under the middle finger's
183
184
  names) and `LeftGrip`, which carries no skin and marks where a grip goes. A
184
185
  hand with no thumb to find, which is every 64 pixel hand and any hand drawn as
185
- a fist, gets none, and the script says so. `FINGERS=0` turns this off.
186
+ a fist, gets no finger bones. If it is a fist (a ball wider than the wrist
187
+ behind it), it gets its wrist moved to the narrowest place and `LeftGrip` or
188
+ `RightGrip` in the middle of the fist. The script says which it found for each
189
+ hand. `FINGERS=0` turns all of this off.
186
190
 
187
191
  ### 8. Animate
188
192
 
@@ -226,11 +230,13 @@ A held thing is made on its own: eight directions of the object upright
226
230
  sprites with `texture.py`, and thinned. `held` lays its longest line across
227
231
  the palm of the hand named, puts its grip at that hand's grip point, and makes
228
232
  it `HELD_LENGTH` of the body's height long (default 0.5). The file's own
229
- frame does not matter. It needs a hand with finger bones.
233
+ frame does not matter. It needs a hand with a grip point: one with finger
234
+ bones, or a closed fist. In a fist the grip runs through the fist from front
235
+ to back, blade to the front, and the guard is kept clear of the fist's side.
230
236
 
231
237
  Then animate as in step 8. `retarget.py` carries the library's thumb and
232
238
  middle finger over, so the hand is a fist in a walk and closed round the grip
233
- in a sword attack.
239
+ in a sword attack. A fist has no fingers to move and holds as drawn.
234
240
 
235
241
  ## In a game engine
236
242
 
@@ -266,9 +272,9 @@ swing. See step 31 of the research note.
266
272
  redraw's lighting is painted in.
267
273
  - **Separate fingers, eyes and a jaw** in the skeleton. The four fingers
268
274
  move as one, and only on the painted path.
269
- - **Held items beyond one sword in the right hand.** A hand drawn as a fist,
270
- a shield, and two hands on one grip are untried, and the grip is not sized
271
- to the hand.
275
+ - **Held items beyond one sword in the right hand.** The left hand, a shield,
276
+ and two hands on one grip are untried, and the grip is not sized to the
277
+ hand. A fist cannot open, so it cannot let go or change its hold.
272
278
  - **Many bodies.** The items have been worn by two: the one they were cut on
273
279
  and one much heavier man, after `refit.py` reshaped them for him. Other
274
280
  heights and builds are untried.
@@ -55,6 +55,7 @@ Last updated 17 November 2026.
55
55
  | 45 | Bones for the cape, and a simulation that swings them | Our scripts | Twelve cape bones in three chains; the cape streams in a sprint, hangs in an idle and falls in a roll, baked into every animation | Keep. It works in any engine with no physics set up. |
56
56
  | 46 | Put the first body's items on a second, heavier body | PixelLab, our scripts | The same four items fit a much broader man, after reshaping each to his bones and thickness | Keep. Scaling by ratio failed; adding the difference in thickness works. |
57
57
  | 47 | Finger bones, and a sword in the hand | PixelLab, Hunyuan3D-2mv, Quaternius's library, our scripts | A thumb and one finger chain a hand, found on the mesh; the library's fists and sword grip carry over; a generated sword sits in the closed right hand | Keep for 256 pixel sources. A 64 pixel hand and a hand drawn as a fist get no finger bones. |
58
+ | 48 | A grip for a hand drawn as a fist | Our scripts | The heavier second body holds the same sword: the fist and its wrist are found on the mesh, the grip runs through the fist. No new generations | Keep. A fist holds but cannot open, and which way it faces is assumed, not measured. |
58
59
 
59
60
  **How the percentages are measured.** The model is projected back to each of the eight camera positions and its outline is compared with the sprite's outline. The score is the area the two share divided by the area either covers, averaged over the views. 100% means the model casts exactly the sprite's shadow from every side. It measures shape only, not colour. It also favours carving, which is built from those same outlines.
60
61
 
@@ -1241,6 +1242,40 @@ Not checked: the left hand holding something, two-handed grips, a shield, the he
1241
1242
 
1242
1243
  **Verdict.** Keep, for the painted path. A thumb and one chain is what the mesh shows, and it is enough to hold a sword through a stock attack.
1243
1244
 
1245
+ ## 48. A sword in a hand drawn as a fist
1246
+
1247
+ **Question.** Step 47 left the second body without a sword: his hands are closed fists, with no thumb to find and so no finger bones. Does a fist need finger bones to hold something?
1248
+
1249
+ **Setup.**
1250
+
1251
+ - *What a fist is on the mesh.* Along the arm, the second body's cross-section shrinks towards the wrist, grows into a ball 13.8 sprite pixels across and 10 thick, and ends. The wrist joint estimated on the sprites sat in the middle of that ball.
1252
+ - *Finding it.* When `rig.py` finds no thumb, it now walks back from the end of the hand through slices one pixel thick: to the thickest slice, then on to the narrowest before the forearm widens again. That narrowest slice is the wrist. A ball at least 1.4 times the wrist's cross-section counts as a fist; anything less gets nothing, as before.
1253
+ - *The grip.* The middle of the fist, with the handle running through it from back to front and the blade leaving to the front. That is the thumb's side of a fist held out palm down, which is how the first body's open hands were drawn and what the animation library expects. The fist's wider side is used for the handle's line where it runs front to back (it does on this body, within 12 degrees); a fist too round to have one takes straight ahead.
1254
+ - *The guard.* A handle half way through a fist 13.8 pixels across would bury the guard, so a held item in a fist is slid along its handle until the guard clears the fist's side.
1255
+ - *Bones.* `LeftGrip` and `RightGrip` only. There are no finger bones, and the fist is skinned to the hand bone as drawn.
1256
+ - *Nothing new was generated.* The sword, the body and the refitted items are those of steps 46 and 47.
1257
+
1258
+ **Result.** The second body at rest, in the library's sword idle, and in its sword attack:
1259
+
1260
+ ![The heavy armoured man with a sword through his right fist, at rest, on guard and lunging](../website/public/research/3d/fist-sword.png)
1261
+
1262
+ - **Both fists were found:** 10.5 and 9.5 sprite pixels long and 13.8 and 13.7 across. The wrists moved 7.5 and 6.7 pixels back along the arm, out of the fist, so the hand now bends at the wrist and not through the knuckles.
1263
+ - **He holds the sword** through the same eleven library animations, pommel behind the fist and guard in front of it. The handle is inside the fist's mesh, so its thickness does not show.
1264
+ - **The first body is unchanged:** its hands measure 9.9 and 10.8 pixels as in step 47.
1265
+ - **One file of 2.6 MB,** 17,994 triangles, valid, 35 bones (21 for the body, 2 grips, 12 for the cape). Godot 4.7.2 imports it with no errors and finds every bone its humanoid profile requires.
1266
+ - **The 64 pixel body's hands count as fists too:** 7.5 pixels long and 6.8 across. Its bare body holds the sword through the sword idle, though the blade points lower than on the other two. The site's 64 pixel model was not rebuilt.
1267
+
1268
+ Flaws:
1269
+
1270
+ - **A fist cannot open.** He cannot let go, and with the sword taken off he keeps his fists, which is at least how he was drawn.
1271
+ - **Which way the fist faces is assumed.** Palm down, thumb to the front. A fist drawn thumb up would get the handle the wrong way through.
1272
+ - **The handle passes through solid mesh.** Nothing shows from outside, but a cut-away or a transparent body would show it.
1273
+ - **The sword is small on him.** It is half his height, like the first body's, and he is short and very broad.
1274
+
1275
+ Not checked: the left fist holding something, the item fit at the moved wrists beyond the views above, and the sword on the dressed 64 pixel model.
1276
+
1277
+ **Verdict.** Keep. A hand that is already closed needs a wrist and a grip point, not finger bones.
1278
+
1244
1279
  ## What has not worked, in one place
1245
1280
 
1246
1281
  So nobody repeats them:
@@ -1275,7 +1310,7 @@ Two bugs worth remembering, because both produced plausible wrong pictures: glTF
1275
1310
  - **Sixteen directions and lighting for the sprite cards** (step 31): the in-between views of step 13, and normals from the hidden mesh.
1276
1311
  - **More directions, and animation.** Step 13 gives sixteen directions. Thirty-two would spin smoothly, and the same trick on a walk cycle would give walks in the in-between directions, which the generator does not offer.
1277
1312
  - **Fix the squat proportions.** Carve at a finer grid, or let the redraw see a true neighbour at full height (the guide sheet does this and kept proportions better on the bare character).
1278
- - **Held items.** Step 47 puts a sword in the right hand. Still to do: a hand drawn as a fist, the left hand, a shield, two hands on one grip, and a handle sized to the hand.
1313
+ - **Held items.** Step 47 puts a sword in the right hand and step 48 in a hand drawn as a fist. Still to do: the left hand, a shield, two hands on one grip, and a handle sized to the hand.
1279
1314
  - **A score that sees cleanliness.** Colour error against one drawing cannot tell a clean redraw from a torn render.
1280
1315
  - **Fewer, larger pieces in the unwrap.** The chest unwraps into a few large pieces, but the character comes out in hundreds of small ones, which is fine for a program and poor for a person or an image model to paint on. One piece per view, like a folded paper model, would make the texture a sprite sheet.
1281
1316
  - **Carve at a finer grid** than one voxel per pixel, so thin objects survive.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelkiln",
3
- "version": "0.124.0",
3
+ "version": "0.125.0",
4
4
  "description": "Manifest-driven pixel-art generation, review, recovery, and packaging with deterministic provenance.",
5
5
  "type": "module",
6
6
  "sideEffects": false,