pixelkiln 0.141.0 → 0.142.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.
- package/dist/cli.js +143 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +36 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +248 -1
- package/dist/index.d.ts +248 -1
- package/dist/index.js +35 -1
- package/dist/index.js.map +1 -1
- package/docs/CHARACTERS_3D.md +10 -1
- package/docs/CLI.md +2 -1
- package/docs/COMFYUI.md +37 -0
- package/docs/MANIFEST.md +9 -3
- package/docs/PARALLAX.md +32 -19
- package/docs/RESEARCH_3D.md +44 -0
- package/docs/RESEARCH_PARALLAX.md +5 -3
- package/package.json +1 -1
- package/schema/manifest.schema.json +41 -0
- package/skills/pixelkiln/references/parallax.md +8 -4
package/docs/CHARACTERS_3D.md
CHANGED
|
@@ -24,7 +24,10 @@ machine with a 12 GB RTX 3060.
|
|
|
24
24
|
to the same bones, so a game can dress the same body differently.
|
|
25
25
|
- **Skin that hides.** The body is split by what covers it. Each piece lists
|
|
26
26
|
the items that hide it in its node's `extras`, as `"hiddenBy": ["Cuirass"]`.
|
|
27
|
-
Hide a piece while any item in its list is worn
|
|
27
|
+
Hide a piece while any item in its list is worn. A rim of skin stays under
|
|
28
|
+
each item's edge and can show when a joint bends.
|
|
29
|
+
- **Two-sided items.** What is worn is an open shell, so its material is marked
|
|
30
|
+
`doubleSided` and its inside is drawn. Godot reads that as culling off.
|
|
28
31
|
- **A standard skeleton.** Twenty-one bones under the names Unity's and Godot's
|
|
29
32
|
humanoid profiles use. Godot 4.7's `SkeletonProfileHumanoid` finds every bone
|
|
30
33
|
it requires, by name.
|
|
@@ -295,6 +298,12 @@ wrist bends, how far the blade is off its edge and whether a hand fell short.
|
|
|
295
298
|
To add a motion, add an entry to `MOTIONS` at the top of the script. An entry's
|
|
296
299
|
`feet` list moves and turns the hips and steps a foot, as the attack does.
|
|
297
300
|
|
|
301
|
+
The grips are written for a bare body, so `wield.py` measures the trunk from
|
|
302
|
+
the file itself, with whatever is worn, and moves the grip out until the
|
|
303
|
+
forearms and the item are clear of it by `CLEAR` metres (default 0.02). Its
|
|
304
|
+
report gives how far each motion's grip moved (`gripPushedOutMetres`) and what
|
|
305
|
+
is still inside (`leftInsideTrunkMetres`). A negative `CLEAR` turns this off.
|
|
306
|
+
|
|
298
307
|
A spear or staff has no guard and its hands go apart. Say where they go, give
|
|
299
308
|
it to the hand that is forward, and ask for the spear motions:
|
|
300
309
|
|
package/docs/CLI.md
CHANGED
|
@@ -1306,7 +1306,8 @@ See [derived artifacts](./ARTIFACTS.md) and [tiles](./TILES.md).
|
|
|
1306
1306
|
|
|
1307
1307
|
Preview or export a set from the manifest's `parallax` section: layers far to
|
|
1308
1308
|
near, each a generated asset, a finished file, sky bands, or a run of
|
|
1309
|
-
silhouettes laid by seed. Offline;
|
|
1309
|
+
silhouettes laid by seed, with an optional dithered foot and tint. Offline;
|
|
1310
|
+
spends nothing.
|
|
1310
1311
|
|
|
1311
1312
|
```bash
|
|
1312
1313
|
pixelkiln parallax preview dusk # dusk.preview.html + dusk.preview.png
|
package/docs/COMFYUI.md
CHANGED
|
@@ -239,6 +239,43 @@ compares it modulo the shared step. A passing grid check still cannot judge
|
|
|
239
239
|
character identity, motion arcs, foot sliding, or loop timing. Review the
|
|
240
240
|
animation at 1× before recording approval.
|
|
241
241
|
|
|
242
|
+
### Keep one character across frames
|
|
243
|
+
|
|
244
|
+
Each frame is a separate still render, so an SDXL graph with only a pose
|
|
245
|
+
ControlNet re-invents props, helmets and faces every frame. The
|
|
246
|
+
[pose benchmark](../benchmarks/provider-frame-sets/comfyui/README.md) tested
|
|
247
|
+
fixes on SDXL base with Pixel Art XL:
|
|
248
|
+
|
|
249
|
+
| Strategy | Within a loop | Across motions | Follows the pose |
|
|
250
|
+
|---|---|---|---|
|
|
251
|
+
| Pose ControlNet only | props and details drift | no | yes |
|
|
252
|
+
| Whole loop in one image (a sheet of pose cells) | holds | a new design per sheet | loosely |
|
|
253
|
+
| IP-Adapter Plus at 0.6, fed a keyframe | mostly holds | holds | yes, big arm moves shrink |
|
|
254
|
+
| Sheet plus IP-Adapter at 0.6 | holds | holds | loosely |
|
|
255
|
+
| Keyframe img2img (denoise 0.55–0.85) | holds | holds | no, stays near the keyframe pose |
|
|
256
|
+
| Keyframe in a fixed cell beside the frames | no effect without an inpainting model | no | yes |
|
|
257
|
+
| A LoRA per character at 0.8, trained on about 24 approved frames | holds, prop hand included | holds | barely, keeps the training stance |
|
|
258
|
+
| Sheet plus that LoRA and IP-Adapter at 0.6 | holds, props drift | holds | loosely |
|
|
259
|
+
|
|
260
|
+
A character LoRA is the only strategy that kept the prop in the same hand, but
|
|
261
|
+
at 0.8 it also overrides the pose. A lower strength (0.5 to 0.6) or an earlier
|
|
262
|
+
epoch checkpoint did not free the motion in the benchmark, so train it on
|
|
263
|
+
frames with varied poses.
|
|
264
|
+
|
|
265
|
+
The OpenPose ControlNet draws a smaller motion than its map shows. In the
|
|
266
|
+
benchmark a walk with a 190 px stride on a 1024 px canvas came out as a shuffle
|
|
267
|
+
with the legs together, at any ControlNet strength; a 330 px stride with a
|
|
268
|
+
higher knee and a hip bob came out as a real walk. Draw pose maps that
|
|
269
|
+
overshoot the motion you want. The benchmark's
|
|
270
|
+
`train-lora.py` trains one with kohya sd-scripts in about 25 minutes on a
|
|
271
|
+
12 GB card, waiting for a shared ComfyUI to be idle first.
|
|
272
|
+
|
|
273
|
+
Start from IP-Adapter at 0.6 with a keyframe the person has approved. Keep a
|
|
274
|
+
sheet under about 2.2 MP; past that SDXL stops drawing one character. A larger
|
|
275
|
+
canvas does not give finer pixels: the grid stays at 8px. Props still drift with
|
|
276
|
+
every strategy, because the pose map has no joint for them, so review the hand
|
|
277
|
+
that holds each prop in every frame.
|
|
278
|
+
|
|
242
279
|
## Controlled revisions
|
|
243
280
|
|
|
244
281
|
Install the first bundled image-to-image graph with:
|
package/docs/MANIFEST.md
CHANGED
|
@@ -755,6 +755,7 @@ letters, digits, `-` and `_`, since it names folders and a Godot node. The
|
|
|
755
755
|
| `view` | yes | The game's view in pixels, `[width, height]`. |
|
|
756
756
|
| `travel` | no | How far the camera moves sideways across the level. Defaults to twice the view's width. |
|
|
757
757
|
| `climb` | no | How far the camera climbs. Defaults to 0. |
|
|
758
|
+
| `palette` | no | What a layer's `tint` snaps to: a style id, for that style's `palette`, or a list of colours. Without it, a tint snaps to the colours already in the picture. |
|
|
758
759
|
| `layers` | yes | 1 to 32 layers, far first. |
|
|
759
760
|
|
|
760
761
|
| Layer field | Required | Meaning |
|
|
@@ -774,16 +775,20 @@ letters, digits, `-` and `_`, since it names folders and a Godot node. The
|
|
|
774
775
|
| `gap` | no | Up to this many more pixels between run sprites, at random. Defaults to 16. |
|
|
775
776
|
| `jitter` | no | Moves each run sprite's foot up or down by up to this many pixels. Defaults to 0. |
|
|
776
777
|
| `width` | no | A run's length. Defaults to everything the camera sees of the layer. A repeating run is laid as a loop of this width. |
|
|
778
|
+
| `foot` | no | Trim the picture to its opaque box, then thin out this fraction of it from the bottom with a 4×4 ordered dither, above 0 up to 1. A layer that repeats sideways keeps its width. In a run, each sprite is finished before it is laid. |
|
|
779
|
+
| `tint` | no | `{ "color": "#7f4776", "amount": 0.55 }`: mix the picture `amount` of the way to `color`, then snap it to the set's `palette`. Applied after `foot`, to each sprite of a run. |
|
|
777
780
|
|
|
778
781
|
```jsonc
|
|
779
782
|
"parallax": {
|
|
780
783
|
"dusk": {
|
|
781
784
|
"view": [384, 216],
|
|
782
785
|
"travel": 480,
|
|
786
|
+
"palette": "silhouette",
|
|
783
787
|
"layers": [
|
|
784
788
|
{ "sky": ["#405e9c", "#a596b9", "#f9b59c"], "speed": 0 },
|
|
785
789
|
{ "asset": "far-range", "bottom": 150, "speed": 0.125, "extend": true },
|
|
786
|
-
{ "run": [{ "asset": "cone" }, { "asset": "mesa" }], "bottom": 176, "speed": 0.5, "jitter": 4
|
|
790
|
+
{ "run": [{ "asset": "cone" }, { "asset": "mesa" }], "bottom": 176, "speed": 0.5, "jitter": 4,
|
|
791
|
+
"foot": 0.3, "tint": { "color": "#403a61", "amount": 0.4 } },
|
|
787
792
|
{ "file": "finished/near.png", "bottom": 256, "speed": 1 }
|
|
788
793
|
]
|
|
789
794
|
}
|
|
@@ -791,8 +796,9 @@ letters, digits, `-` and `_`, since it names folders and a Godot node. The
|
|
|
791
796
|
```
|
|
792
797
|
|
|
793
798
|
The manifest refuses an `asset` it does not declare, in a layer or a run, a
|
|
794
|
-
`style` the asset is not generated under, a layer name used twice,
|
|
795
|
-
fields on a layer that is not a run
|
|
799
|
+
`style` the asset is not generated under, a layer name used twice, the run
|
|
800
|
+
fields on a layer that is not a run, `foot` or `tint` on a `sky` layer, `foot`
|
|
801
|
+
with `extend`, and a `palette` style that does not exist or has no palette.
|
|
796
802
|
|
|
797
803
|
## Validation and editor setup
|
|
798
804
|
|
package/docs/PARALLAX.md
CHANGED
|
@@ -149,29 +149,36 @@ pillow and scipy.
|
|
|
149
149
|
|
|
150
150
|
## 5. Finish the pieces
|
|
151
151
|
|
|
152
|
-
All of these are free and keep every pixel on the palette.
|
|
152
|
+
All of these are free and keep every pixel on the palette. The dithered foot
|
|
153
|
+
and the tints are layer fields, `foot` and `tint`, which the command applies as
|
|
154
|
+
it reads each picture (step 6). Looping a whole layer is still a script step:
|
|
153
155
|
|
|
154
156
|
```bash
|
|
155
157
|
P="python3 research/scripts/parallax.py"
|
|
156
158
|
|
|
157
|
-
#
|
|
158
|
-
$P foot cone.png cone.foot.png 0.3
|
|
159
|
-
|
|
160
|
-
# One copy a tier, each pulled toward its own colour and snapped to the palette.
|
|
161
|
-
$P tint cone.foot.png cone.far.png "#7f4776" 0.55 pixelkiln.manifest.json
|
|
162
|
-
$P tint cone.foot.png cone.near.png "#403a61" 0.4 pixelkiln.manifest.json
|
|
163
|
-
|
|
164
|
-
# Whole layers: loop at the best matching columns. Recolour the flat far range.
|
|
159
|
+
# Whole layers: loop at the best matching columns.
|
|
165
160
|
$P loop layer-far.png far.png cut
|
|
166
|
-
$P tint far.png far.png "#936090" 1 pixelkiln.manifest.json
|
|
167
161
|
$P loop layer-near.png near.png cut
|
|
168
162
|
```
|
|
169
163
|
|
|
164
|
+
The script's `foot` and `tint` give the same pixels as the fields, for a
|
|
165
|
+
picture you want finished on disk:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
$P foot cone.png cone.foot.png 0.3
|
|
169
|
+
$P tint cone.foot.png cone.far.png "#7f4776" 0.55 pixelkiln.manifest.json
|
|
170
|
+
```
|
|
171
|
+
|
|
170
172
|

|
|
171
173
|
|
|
172
174
|
**The dithered foot.** Background removal leaves every pixel fully on or off,
|
|
173
175
|
so a silhouette cannot fade by alpha. Thinning its bottom rows with a 4×4
|
|
174
176
|
pattern makes it dissolve into whatever is behind it and keeps it pixel art.
|
|
177
|
+
`"foot": 0.3` trims the picture to its opaque box and thins the bottom 30%.
|
|
178
|
+
|
|
179
|
+
**One tint a tier.** `"tint": { "color": "#7f4776", "amount": 0.55 }` mixes
|
|
180
|
+
each pixel 55% of the way to the colour and snaps it to the set's `palette`.
|
|
181
|
+
Two `run` layers of the same sprites with different tints make the two tiers.
|
|
175
182
|
|
|
176
183
|
**Depth order.** The farther a layer, the closer to the sky's colour and the
|
|
177
184
|
lower its contrast. Check the order from back to front: the far range lightest,
|
|
@@ -181,7 +188,8 @@ it. Tinting every tier toward one light haze colour gets the order backwards:
|
|
|
181
188
|
the near tier ends up lighter than the range behind it.
|
|
182
189
|
|
|
183
190
|
**The far range.** Pick a palette colour that sits between the sky bands behind
|
|
184
|
-
it, darker than the horizon and lighter than the tiers.
|
|
191
|
+
it, darker than the horizon and lighter than the tiers. A `tint` with
|
|
192
|
+
`"amount": 1` recolours the whole range to it.
|
|
185
193
|
|
|
186
194
|
## 6. Preview the stack
|
|
187
195
|
|
|
@@ -227,17 +235,21 @@ nothing.
|
|
|
227
235
|
under the treeline.
|
|
228
236
|
|
|
229
237
|
A `run` layer lays isolated silhouettes in an overlapping row. This is the
|
|
230
|
-
volcanic set from the pictures above, two tiers of the same landforms
|
|
238
|
+
volcanic set from the pictures above, two tiers of the same landforms as
|
|
239
|
+
generated, each finished by the command:
|
|
231
240
|
|
|
232
241
|
```jsonc
|
|
233
242
|
"volcanic-dusk": {
|
|
234
243
|
"view": [384, 216],
|
|
235
244
|
"travel": 480,
|
|
245
|
+
"palette": "silhouette", // tints snap to this style's palette
|
|
236
246
|
"layers": [
|
|
237
247
|
{ "name": "sky", "sky": ["#2e3253", "#503e68", "#7b5f94", "#ad628e", "#d66283", "#f96076"], "speed": 0 },
|
|
238
248
|
{ "name": "far", "file": "picked/far.png", "bottom": 150, "speed": 0.125, "extend": true },
|
|
239
|
-
{ "name": "cones_far", "run": [{ "
|
|
240
|
-
|
|
249
|
+
{ "name": "cones_far", "run": [{ "asset": "cone" }, { "asset": "rim" }, { "asset": "mesa" }], "bottom": 158, "speed": 0.25, "jitter": 4, "seed": 7,
|
|
250
|
+
"foot": 0.3, "tint": { "color": "#7f4776", "amount": 0.55 } },
|
|
251
|
+
{ "name": "cones_near", "run": [{ "asset": "cone" }, { "asset": "rim" }, { "asset": "mesa" }], "bottom": 176, "speed": 0.5, "jitter": 4, "seed": 8,
|
|
252
|
+
"foot": 0.3, "tint": { "color": "#403a61", "amount": 0.4 } },
|
|
241
253
|
{ "name": "ground", "sky": ["#0e0c20"], "bottom": 422, "speed": 1 },
|
|
242
254
|
{ "name": "near", "file": "picked/near.png", "bottom": 246, "speed": 1 }
|
|
243
255
|
]
|
|
@@ -256,9 +268,11 @@ volcanic set from the pictures above, two tiers of the same landforms:
|
|
|
256
268
|
sees. `width` sets the run's length either way.
|
|
257
269
|
- The command bakes each run into one picture, so every engine export takes it
|
|
258
270
|
like any other layer.
|
|
271
|
+
- `foot` and `tint` apply to each sprite before it is laid, so every sprite
|
|
272
|
+
stands on its trimmed foot. `palette` is a style id or a list of colours;
|
|
273
|
+
without one, a tint snaps to the colours already in each picture and adds
|
|
274
|
+
none, which is the script's `haze`.
|
|
259
275
|
|
|
260
|
-
Haze, tier tints and dithered feet are still script steps. Finish those
|
|
261
|
-
sprites with `research/scripts/parallax.py` and name the results in the run.
|
|
262
276
|
The script's own preview (`parallax.py skyline`) and the build script for both
|
|
263
277
|
biomes are in [`benchmarks/parallax-refined`](../benchmarks/parallax-refined).
|
|
264
278
|
|
|
@@ -476,6 +490,5 @@ another side needs new pictures. The manifests and build script are in
|
|
|
476
490
|
background removal breaks the seam. The default style drew a flat background
|
|
477
491
|
on 2 of 3 tries, and its colours are its own, so the rest of the set has to
|
|
478
492
|
follow them (step 21).
|
|
479
|
-
-
|
|
480
|
-
|
|
481
|
-
`file` layers or run sprites.
|
|
493
|
+
- Looping a whole picture inside `pixelkiln parallax`. Loop it with
|
|
494
|
+
`parallax.py loop` and name the result as a `file` layer.
|
package/docs/RESEARCH_3D.md
CHANGED
|
@@ -67,6 +67,7 @@ Last updated 17 November 2026.
|
|
|
67
67
|
| 57 | Root motion | Our scripts | A `Root` bone under the hips, keyed forward at the pace the planted foot goes back, for every walk, run and the advance | Keep for walks and the advance: Godot moves the character by the measured distance to the millimetre. The jog's and sprint's speeds are rough. |
|
|
68
68
|
| 58 | An attack and a thrust that carry forward | Our scripts | `Great_Attack_Fwd` and `Spear_Thrust_Fwd`: the stepping foot stays where it lands and the other follows, with the travel written as root motion | Keep. The measured travel is within 5 mm of what was written and a planted foot moves 8 mm at most. |
|
|
69
69
|
| 59 | Shield motions | Our scripts | `shield.py`: the shield arm written as three directions (elbow, face, top), for a guard, a walk, a jog, the sword attack, a block, a held block and a bash | Keep. Seven motions on both bodies; nothing gets more than 1.7 cm inside the shield. Not seen in a game. |
|
|
70
|
+
| 60 | Held things clear of the trunk | Our scripts | `wield.py` measures the trunk from the file's own meshes, armour included, and moves the grip and swings the elbows until the forearms and the item are out of it; worn items are written two-sided | Keep. The greatsword's second forearm lay through the armoured belly for 84 to 89% of its length and now does for 1 to 8%; the spear no longer runs through the hip. Skin still shows at the edges of the armour |
|
|
70
71
|
|
|
71
72
|
**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.
|
|
72
73
|
|
|
@@ -1684,6 +1685,49 @@ On guard, walking, jogging, the sword attack, the block held, and the bash, on t
|
|
|
1684
1685
|
|
|
1685
1686
|
**Verdict.** Keep. A character with a sword and shield has motions of its own.
|
|
1686
1687
|
|
|
1688
|
+
## 60. Held things clear of the trunk
|
|
1689
|
+
|
|
1690
|
+
**Question.** Seen in the site's viewer on a phone, the two-handed models clipped badly: the greatsword's guard sat in the cuirass, the second forearm disappeared into the belly, the spear ran through the hip, and the armour had holes in it. Which of these come from the motions, which from the meshes, and which from how they are drawn?
|
|
1691
|
+
|
|
1692
|
+
**What was found.**
|
|
1693
|
+
|
|
1694
|
+
- *The grips were written for a bare body.* `wield.py` places the grip in arm lengths from the shoulders and knew nothing of the trunk. The cuirass sits 3.6 cm above the skin (median) and the trunk with it on is 37 cm wide and 31 cm deep, on arms 48 cm long. In `Great_Idle`, `Great_Walk` and `Great_Jog` 84 to 89% of the second forearm was inside the body or within 3 cm of it, 8 to 9 cm deep at worst. In the spear motions the rear forearm was 3 to 5 cm inside, and the shaft passed through the side of the trunk.
|
|
1695
|
+
- *What is worn is an open shell.* The cuirass has 539 open edges, the leg armour 346, the helm 186, the cape 166. Their materials were one-sided, so wherever the inside of a shell faced the camera nothing was drawn, and it read as black holes in the armour.
|
|
1696
|
+
- *Skin at the edges.* `rig.py` keeps a rim of skin under each item's edge so no gap shows there. When a joint bends, that rim and the item over it move a little differently and skin shows through. This is not fixed here.
|
|
1697
|
+
|
|
1698
|
+
**Setup.**
|
|
1699
|
+
|
|
1700
|
+
- *The trunk, measured.* `wield.py` now reads every mesh in the file. The vertices that mostly follow the hips, spine or chest, of the body and of whatever is worn, are cut into twelve slices up the spine; each slice has a half width, a depth to the front and a depth to the back. Hanging items (a cape on chain bones) are left out. A point is inside when it is within its slice's ellipse.
|
|
1701
|
+
- *The grip moves.* On a first pass, at each moment, the grip is moved a few centimetres at a time, forward or to either side, whichever clears most, until the forearms (from half way down to the wrist) and the item are out by `CLEAR` (2 cm), or it has moved half an arm length. The elbow may also swing round the line from shoulder to wrist, up to 80 degrees.
|
|
1702
|
+
- *Evened out.* The moves and swings are then averaged over a third of a second each way. A motion that holds one pose throughout (an idle, a walk, a jog) takes one move for all of it: that of the moment that needed most. A last pass solves the arms with the moves fixed, so nothing jumps and a loop still meets itself.
|
|
1703
|
+
- *Two-sided.* `rig.py` marks every worn item's material `doubleSided`. The site's viewer now passes that on to the material it draws with. The five models on the site were marked in place.
|
|
1704
|
+
- *The site's models.* The inputs for rigging them again were gone, so the greatsword and spear files were given their motions again by `wield.py` and their cape by `sway.py`, from the files already on the site. Meshes, textures and the stock motions are as they were.
|
|
1705
|
+
|
|
1706
|
+
**Result.**
|
|
1707
|
+
|
|
1708
|
+

|
|
1709
|
+
|
|
1710
|
+
| Motion | Grip moved | Left inside the measured trunk | Second forearm inside or within 3 cm of the body, before | After |
|
|
1711
|
+
|---|---|---|---|---|
|
|
1712
|
+
| `Great_Idle` | 23.7 cm | 1.2 cm | 84% | 8% |
|
|
1713
|
+
| `Great_Walk` | 23.4 cm | 1.1 cm | 87% | 1% |
|
|
1714
|
+
| `Great_Jog` | 23.2 cm | 1.0 cm | 89% | 1% |
|
|
1715
|
+
| `Great_Attack` | 17.8 cm | 4.8 cm | 35% | 3% |
|
|
1716
|
+
| `Spear_Walk` | 9.3 cm | 0.0 cm | 7% | 0% |
|
|
1717
|
+
| `Spear_Jog` | 4.0 cm | 2.2 cm | 7% | 1% |
|
|
1718
|
+
| `Spear_Thrust` | 22.5 cm | 4.7 cm | 35% | 2% |
|
|
1719
|
+
|
|
1720
|
+
"Left inside" is against the measured trunk with its 2 cm margin, and a further 4.5 cm for a forearm's thickness, so 1 cm there is a forearm that brushes the armour. `Spear_Idle` moved 22.4 cm and `Spear_Advance` 18.2 cm, and both came out clear. The last two columns count the hands meeting on the grip as well, so they do not reach zero.
|
|
1721
|
+
|
|
1722
|
+
Loops still meet: the first and last poses differ by 0 to 3 degrees, 9 in `Spear_Thrust`. The spear's leading wrist had bent 89 to 100 degrees in every motion. It now bends 4 to 18 in the advance, walk and jog and 78 in the thrust; in `Spear_Idle` it still bends 97. All five files validate with no errors or warnings, and Godot 4.7.2 imports the three checked (greatsword, spear, sword and shield) with no errors and reads the worn items as two-sided.
|
|
1723
|
+
|
|
1724
|
+
**Not done.**
|
|
1725
|
+
|
|
1726
|
+
- Skin still shows at the edges of the armour when joints bend, and at the visor. That needs the bodies rigged again with more skin hidden, or the rim drawn in under the item.
|
|
1727
|
+
- The spear's butt and the greatsword on the back swing pass through the cape. `sway.py` keeps the cape out of the legs and trunk, not out of what is held.
|
|
1728
|
+
- The stock one-handed motions on the two-handed models (`Idle`, `Walk`, `Sword_Attack`) are untouched and still clip; they were never written for these items.
|
|
1729
|
+
- The sword and shield models were only marked two-sided. Their ragged arm armour is the item's own mesh.
|
|
1730
|
+
|
|
1687
1731
|
## What has not worked, in one place
|
|
1688
1732
|
|
|
1689
1733
|
So nobody repeats them:
|
|
@@ -500,9 +500,9 @@ The silhouette route behaves the same way. Step 18's runs recoloured keep their
|
|
|
500
500
|
|
|
501
501
|
## The `pixelkiln parallax` command
|
|
502
502
|
|
|
503
|
-
Steps 1 to 22 led to a command. It is narrower than the proposal this note used to carry. It has no `
|
|
503
|
+
Steps 1 to 22 led to a command. It is narrower than the proposal this note used to carry. It has no `loop` field: choosing where a whole layer joins still needs judgment (steps 1 and 2), and the script does it. Step 18's finishing is in the command as `foot` and `tint`, snapped to a set's `palette`.
|
|
504
504
|
|
|
505
|
-
A manifest's `parallax` section names sets. A set has the `view`, how far the camera moves (`travel`, `climb`) and its layers, far to near. A layer is a generated `asset`, read from the lockfile, a finished `file`, `sky` bands drawn by PixelKiln, or a `run` of silhouettes laid by seed as step 12 lays them, with `speed` and optional `speedY`, `x`, `bottom`, `extend`, `repeat` and `
|
|
505
|
+
A manifest's `parallax` section names sets. A set has the `view`, how far the camera moves (`travel`, `climb`) and its layers, far to near. A layer is a generated `asset`, read from the lockfile, a finished `file`, `sky` bands drawn by PixelKiln, or a `run` of silhouettes laid by seed as step 12 lays them, with `speed` and optional `speedY`, `x`, `bottom`, `extend`, `repeat`, `repeatY`, `foot` and `tint`. The [manifest reference](./MANIFEST.md#parallax-sets) lists them.
|
|
506
506
|
|
|
507
507
|
- `pixelkiln parallax preview <set>` writes a page that scrolls the set and a strip of frames. It measures each looping layer's join as step 1 does and warns above 2.
|
|
508
508
|
- `pixelkiln parallax export <set>` writes all three formats, or one with `--format`. Tiled gets image layers with `parallaxx`, `parallaxy`, `repeatx` and `repeaty`, and the start folded into each offset. Godot gets a `Parallax2D` per layer. LDtk gets a Tiles layer per layer, factor 1 − speed, scaling off, as step 11 found it must.
|
|
@@ -511,6 +511,8 @@ The sets checked in step 22 are in the manifests of [`benchmarks/parallax-refine
|
|
|
511
511
|
|
|
512
512
|
A run is baked into one picture before export, so the engines take it like any other layer. The volcanic set in [`benchmarks/parallax-refined/volcanic`](../benchmarks/parallax-refined/volcanic) has two looping runs of the same four landforms. Godot 4.7 with snapping, Tiled's renderer and the LDtk drawing code each matched its preview at camera 0, 137, 240, 333 and 480, with no pixel different.
|
|
513
513
|
|
|
514
|
+
The runs now name the landforms as generated, with `"foot": 0.3` and each tier's tint. The command's foot and tint follow the script's rounding and its choice between equally near palette colours. All 12 finished sprites, four landforms with a foot alone and with each tier's tint, matched the script's files pixel for pixel, the set's frames were unchanged, and the three engines again matched with no pixel different.
|
|
515
|
+
|
|
514
516
|
## What other people are doing
|
|
515
517
|
|
|
516
518
|
- **Layered generation models.** [LayerDiffuse](https://arxiv.org/abs/2402.17113) (Apache-2.0) adds transparency to latent diffusion models and can generate several layers of one scene together. [Qwen-Image-Layered](https://github.com/QwenLM/Qwen-Image-Layered) (Apache-2.0, December 2025) breaks a picture into a chosen number of RGBA layers, at 640 or 1024 px buckets. ComfyUI ships it with an fp8 variant because the default needs a lot of VRAM ([ComfyUI docs](https://docs.comfy.org/tutorials/image/qwen/qwen-image-layered)). Neither was trained on pixel art. Step 17 ran Qwen-Image-Layered on a 12 GB card. It works, slowly, and splits sky from scene rather than by distance. LayerDiffuse is untried.
|
|
@@ -541,7 +543,7 @@ A run is baked into one picture before export, so the engines take it like any o
|
|
|
541
543
|
## What is next
|
|
542
544
|
|
|
543
545
|
- **Open the LDtk export in the LDtk editor.** Step 22 checked LDtk by its source, not by running it.
|
|
544
|
-
- **
|
|
546
|
+
- **Looping a whole picture in the command.** Runs loop on their own, and step 18's foot and tints are layer fields. A whole layer is still looped by `parallax.py loop`.
|
|
545
547
|
- **A palette swap in the engine.** Step 20's table could run as a lookup in a shader, so one set covers a day cycle with no extra pictures.
|
|
546
548
|
- **A time of day lit from another side**, such as midday. A palette swap cannot move the light, so this is where generating again might earn its cost.
|
|
547
549
|
- **A full sideways Retro Diffusion set** from `rd_plus__default`, keyed by script and scrolled, with retries for candidates that come on a gradient.
|
package/package.json
CHANGED
|
@@ -2523,6 +2523,23 @@
|
|
|
2523
2523
|
"minimum": 0,
|
|
2524
2524
|
"maximum": 100000
|
|
2525
2525
|
},
|
|
2526
|
+
"palette": {
|
|
2527
|
+
"anyOf": [
|
|
2528
|
+
{
|
|
2529
|
+
"type": "string",
|
|
2530
|
+
"minLength": 1
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
"type": "array",
|
|
2534
|
+
"items": {
|
|
2535
|
+
"type": "string",
|
|
2536
|
+
"pattern": "^#?[0-9a-f]{6}$"
|
|
2537
|
+
},
|
|
2538
|
+
"minItems": 2,
|
|
2539
|
+
"maxItems": 256
|
|
2540
|
+
}
|
|
2541
|
+
]
|
|
2542
|
+
},
|
|
2526
2543
|
"layers": {
|
|
2527
2544
|
"type": "array",
|
|
2528
2545
|
"items": {
|
|
@@ -2638,6 +2655,30 @@
|
|
|
2638
2655
|
},
|
|
2639
2656
|
"repeatY": {
|
|
2640
2657
|
"type": "boolean"
|
|
2658
|
+
},
|
|
2659
|
+
"foot": {
|
|
2660
|
+
"type": "number",
|
|
2661
|
+
"exclusiveMinimum": 0,
|
|
2662
|
+
"maximum": 1
|
|
2663
|
+
},
|
|
2664
|
+
"tint": {
|
|
2665
|
+
"type": "object",
|
|
2666
|
+
"properties": {
|
|
2667
|
+
"color": {
|
|
2668
|
+
"type": "string",
|
|
2669
|
+
"pattern": "^#?[0-9a-f]{6}$"
|
|
2670
|
+
},
|
|
2671
|
+
"amount": {
|
|
2672
|
+
"type": "number",
|
|
2673
|
+
"minimum": 0,
|
|
2674
|
+
"maximum": 1
|
|
2675
|
+
}
|
|
2676
|
+
},
|
|
2677
|
+
"required": [
|
|
2678
|
+
"color",
|
|
2679
|
+
"amount"
|
|
2680
|
+
],
|
|
2681
|
+
"additionalProperties": false
|
|
2641
2682
|
}
|
|
2642
2683
|
},
|
|
2643
2684
|
"required": [
|
|
@@ -28,9 +28,13 @@ and numbers, at https://pixelkiln.griffen.codes/docs/research-parallax.
|
|
|
28
28
|
- A `run` layer lays silhouettes (`{ "asset" }` or `{ "file" }` each) in an
|
|
29
29
|
overlapping row by `seed`, with `step`, `gap` and `jitter`. It loops by
|
|
30
30
|
default; `"repeat": false` lays it once across what the camera sees.
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
- `"foot": 0.3` trims a picture (each sprite of a run) and dithers its bottom
|
|
32
|
+
30% out. `"tint": { "color", "amount" }` mixes it toward a colour and snaps
|
|
33
|
+
it to the set's `palette` (a style id or colours; without one, to the
|
|
34
|
+
picture's own colours). Two runs of the same sprites with different tints
|
|
35
|
+
make two tiers.
|
|
36
|
+
- Not in the command: looping a whole picture. Loop it with
|
|
37
|
+
`research/scripts/parallax.py loop` and name the result as a `file` layer.
|
|
34
38
|
|
|
35
39
|
## The route to try first
|
|
36
40
|
|
|
@@ -63,7 +67,7 @@ this; its numbers are in step 12 of the research note.
|
|
|
63
67
|
- Leave out a glow at a summit; pixflux draws it as a setting sun.
|
|
64
68
|
- Pixflux at 256×128 with background removal, one forced palette, two or three
|
|
65
69
|
seeds an asset. Reject any candidate that touches a side of the canvas.
|
|
66
|
-
- Add the distance afterwards
|
|
70
|
+
- Add the distance afterwards with `foot: 0.3`, then a `tint` per tier
|
|
67
71
|
toward its own palette colour, the far tier lighter, the near tier darker.
|
|
68
72
|
One light haze colour for every tier makes depth read backwards.
|
|
69
73
|
|