BlueGit

golden-age paperdoll-renderer

design: semi-transparency setting per layer, default off (Tim t1031u)

timfa Grok Bot · pushed by timfa

Authored 2026-11-08 · 6 days ago

Hash
ff1cc5ca1f310efd0886277c0da9076e3656a816
Parent
f26d9fad
Pipeline
Passed
1 file changed +8 −0
design.md +8 −0
@@ -593,3 +593,11 @@ Packing is deterministic and keeps row streaming: each atlas row is one (clip, f
593 593 Two project settings in the `.ppd` `render` block, both on by default: `trim_body` (body sets) and `trim_equipment` (equipment sets). The `.ppd` goes from version 3 to 4; older files load with both settings on. Loose raw PNGs stay full size; trimming changes only the atlases. It is not part of the render contract (`render.json`), so resuming a run with a changed setting just builds the atlases with the current setting.
594 594
595 595 `.ppda` version 5 adds `trimmed` (bool) and, per view, `offset` `[x, y]` within the full frame, `frame` `[w, h]` (= the cell/target size) and `empty`. `x, y, w, h` are the rect in the atlas (`0, 0, 0, 0` for empty views). Untrimmed v5 files use the grid with offset `[0, 0]` and the full frame. The reader checks v5 rects by recomputing the packing from the stored sizes, so overlapping or out-of-bounds rects are refused. Versions 2–4 still load. The reader (`LoadedAtlas::cell`, used by the 2D preview, compositor and checks) always returns the full frame: the stored rect pasted at its offset into a zero frame. Composition at character position + offset is therefore pixel-identical to an untrimmed export.
596
597 ## Decision 2026-11-08 (Tim t1031u): "semi-transparantie toegestaan", default off
598
599 Each layer has a setting *semi-transparency allowed*: the body in the `.ppd` (`render.semi_transparency_body`), and each equipment preset in its `.ppe` (`semi_transparency`). Both default to **off**, also for older `.ppd`/`.ppe` files that do not have the field. When on, output is as before. When off, the target maps get binary alpha after the resolve, before the PNGs are written. The diffuse alpha is the coverage: a pixel with alpha ≥ 0.5 (≥ 128 of 255) becomes fully opaque in every map (diffuse, normal and specular alpha 255, depth alpha 1, colour/normal/specular/depth values kept). A pixel below 0.5 becomes all zeros in every map, so the four masks always match and the atlas trim sees it as empty. The bundled `female-hair` preset has the setting on (its strands rely on soft alpha).
600
601 The setting is part of the render contract: `render.json` has `semi_transparency`, so a run is only resumed with the same setting. The `.ppda` (format 5) records it per layer as `semi_transparency`. Older `.ppda` files without the field are treated as semi-transparent, which they were. The `.ppe` container goes to version 3 (versions 1–2 still load, with the setting off). The `.ppd` stays at version 4, which is not released yet and now carries the trim and semi-transparency settings.
602
603 The v0.1.4 tag (f26d9fa) was pushed before this addition. Its pipeline (#604) was stopped before the release and AUR jobs (the AppImage tool download failed with HTTP 504), so nothing was published for v0.1.4. Tags are never deleted or moved, so this feature ships in a later version.
@@ -593,3 +593,11 @@ Packing is deterministic and keeps row streaming: each atlas row is one (clip, f
593Two project settings in the `.ppd` `render` block, both on by default: `trim_body` (body sets) and `trim_equipment` (equipment sets). The `.ppd` goes from version 3 to 4; older files load with both settings on. Loose raw PNGs stay full size; trimming changes only the atlases. It is not part of the render contract (`render.json`), so resuming a run with a changed setting just builds the atlases with the current setting.
593Two project settings in the `.ppd` `render` block, both on by default: `trim_body` (body sets) and `trim_equipment` (equipment sets). The `.ppd` goes from version 3 to 4; older files load with both settings on. Loose raw PNGs stay full size; trimming changes only the atlases. It is not part of the render contract (`render.json`), so resuming a run with a changed setting just builds the atlases with the current setting.
594
594
595`.ppda` version 5 adds `trimmed` (bool) and, per view, `offset` `[x, y]` within the full frame, `frame` `[w, h]` (= the cell/target size) and `empty`. `x, y, w, h` are the rect in the atlas (`0, 0, 0, 0` for empty views). Untrimmed v5 files use the grid with offset `[0, 0]` and the full frame. The reader checks v5 rects by recomputing the packing from the stored sizes, so overlapping or out-of-bounds rects are refused. Versions 2–4 still load. The reader (`LoadedAtlas::cell`, used by the 2D preview, compositor and checks) always returns the full frame: the stored rect pasted at its offset into a zero frame. Composition at character position + offset is therefore pixel-identical to an untrimmed export.
595`.ppda` version 5 adds `trimmed` (bool) and, per view, `offset` `[x, y]` within the full frame, `frame` `[w, h]` (= the cell/target size) and `empty`. `x, y, w, h` are the rect in the atlas (`0, 0, 0, 0` for empty views). Untrimmed v5 files use the grid with offset `[0, 0]` and the full frame. The reader checks v5 rects by recomputing the packing from the stored sizes, so overlapping or out-of-bounds rects are refused. Versions 2–4 still load. The reader (`LoadedAtlas::cell`, used by the 2D preview, compositor and checks) always returns the full frame: the stored rect pasted at its offset into a zero frame. Composition at character position + offset is therefore pixel-identical to an untrimmed export.
596
597## Decision 2026-11-08 (Tim t1031u): "semi-transparantie toegestaan", default off
598
599Each layer has a setting *semi-transparency allowed*: the body in the `.ppd` (`render.semi_transparency_body`), and each equipment preset in its `.ppe` (`semi_transparency`). Both default to **off**, also for older `.ppd`/`.ppe` files that do not have the field. When on, output is as before. When off, the target maps get binary alpha after the resolve, before the PNGs are written. The diffuse alpha is the coverage: a pixel with alpha ≥ 0.5 (≥ 128 of 255) becomes fully opaque in every map (diffuse, normal and specular alpha 255, depth alpha 1, colour/normal/specular/depth values kept). A pixel below 0.5 becomes all zeros in every map, so the four masks always match and the atlas trim sees it as empty. The bundled `female-hair` preset has the setting on (its strands rely on soft alpha).
600
601The setting is part of the render contract: `render.json` has `semi_transparency`, so a run is only resumed with the same setting. The `.ppda` (format 5) records it per layer as `semi_transparency`. Older `.ppda` files without the field are treated as semi-transparent, which they were. The `.ppe` container goes to version 3 (versions 1–2 still load, with the setting off). The `.ppd` stays at version 4, which is not released yet and now carries the trim and semi-transparency settings.
602
603The v0.1.4 tag (f26d9fa) was pushed before this addition. Its pipeline (#604) was stopped before the release and AUR jobs (the AppImage tool download failed with HTTP 504), so nothing was published for v0.1.4. Tags are never deleted or moved, so this feature ships in a later version.