Good base to start generation

This commit is contained in:
2026-09-11 18:38:01 -07:00
parent 8355743ada
commit 8fcda5f2b7
50 changed files with 616 additions and 114 deletions

View File

@@ -25,7 +25,7 @@ Across the whole product, the artwork should generally follow these ideas:
- Sacred and reverent tone.
- Stained-glass-inspired composition.
- Jewel-tone palette where appropriate.
- Gold can be used as an accent, but should become more prominent as rarity increases.
- Gold begins at Uncommon and may become more prominent as rarity increases; Common uses no gold.
- Tapestry, linen, parchment, and illuminated-manuscript textures can support the overall look.
- Clear subject silhouettes.
- Cards should remain readable at thumbnail size.
@@ -91,9 +91,10 @@ For character cards, prefer:
- One clear subject.
- Strong silhouette.
- Limited background complexity.
- Background complexity appropriate to rarity.
- Symbolic items associated with the subject.
- Calm, iconic poses over excessive action scenes unless the card itself represents an event.
- For Common, wider and calmer compositions with the subject in the middle distance doing one modest action.
- Reserve tighter, iconic presentation for higher rarities where appropriate. Legendary may also achieve grandeur through a large scene or a spacious, contemplative composition.
For event cards, larger compositions and multiple figures can be used when necessary.
@@ -111,6 +112,7 @@ A normal card can contain:
- Name.
- Short subtitle or descriptor.
- One quiet subject-type label, such as Person, Event, Place, Object, or Doctrine.
- Short verse, quote, or historical line.
- Reference.
@@ -134,6 +136,18 @@ A short excerpt with an ellipsis is fine when it is clearly intentional.
The full content can appear in the inspection panel.
### Text Budget and Placement
- Name: one line where practical, with an approved two-line layout for long names.
- Subtitle: optional; include it only when it adds useful information.
- Main excerpt or fact: initially target about 15-25 words, then validate actual typeset fit.
- Reference: a short, readable attribution. Full citations and supporting sources belong in the inspection panel.
- Use fixed text boxes, approved fonts, line spacing, alignment, and a minimum readable size for each template.
- Measure actual rendered text. If it overflows, edit the wording, select a shorter faithful excerpt, or use an approved alternate layout. Do not silently shrink or clip it.
- Typeset all lettering separately from generated imagery. Textless and Boundless contain no lettering, including the name and category.
The subject-type label should come from the Master Card Catalog taxonomy. History, period, tradition, and collection grouping belong in the inspection UI; they are different dimensions from Person or Event. Category should not introduce its own border colors or decorative badges.
---
## Card Back
@@ -167,7 +181,6 @@ When inspecting a card, the user should be able to:
- Flip between front and back.
- Zoom in to inspect artwork and physical characteristics.
- Observe material properties responding dynamically to lighting.
- Observe wear and imperfections where applicable.
- Return quickly to the originating collection / binder context.
The inspection UI should also expose the educational and collectible information that does not need to live directly on the physical card.
@@ -191,8 +204,6 @@ Possible sections:
- Printing.
- Finish.
- Material.
- Wear classification.
- Exact wear percentage.
## Provenance
@@ -222,7 +233,7 @@ requires otherwise.
The standard master artwork resolution should be:
**3000 × 4200 px**
**2000 × 2800 px**
This is the source-quality asset and should be retained even if smaller
versions are generated for the application.
@@ -234,7 +245,6 @@ practical, including:
- Holographic masks
- Metallic masks
- Roughness maps
- Wear masks
- Normal/bump maps
- Printing masks
@@ -254,6 +264,33 @@ runtime export.
---
# Layered Card Production
Every card starts with full-card illustration, composed to work with the Normal printing's overlays. Essential subjects and storytelling remain within its visible art area. The regions revealed by other printings must also feel intentionally illustrated.
Author these components independently:
1. **Base art:** full-card illustration without lettering, a card frame, or a text panel baked into it.
2. **Outer frame:** reusable tier ornament with a transparent interior.
3. **Text backing:** the title and supporting-text panel shapes, without lettering.
4. **Text:** deterministic typography from the card's content data.
Outer frame and text backing are editable parts of the same border system. Export three border overlays from them: combined frame/backing, frame only, and backing only. Each printing uses at most one of these overlays.
Common through Extraordinary each use one approved frame system per rarity initially. Reuse its geometry, colors, ornament, and text regions across cards in that tier. Subject-specific symbols belong in the illustration. Legendary artwork variants may use bespoke artwork, frames, and layouts while retaining the shared printing definitions and text-readability requirements.
Generation supplies imagery and decoration; a versioned template supplies exact geometry. All production layers use the full 2000 × 2800 canvas, the same origin, and recorded transforms. Do not trim transparent margins and then attempt to realign layers by eye.
Create frame and backing masks from shared vector paths. Extend their joining regions underneath one another so separately antialiased edges cannot expose a seam. For Normal, export the assembled overlay as one image. Derive the other overlays from the same geometry.
Transparency masks and finish masks serve different purposes. Transparency determines visible composition; finish masks determine where surface treatment responds to light. Assemble finish coverage for each printing from its active components, with text protection derived from that printing's actual text regions. Removing a text backing also removes its associated protection.
Keep an editable layered master and export the composed card face plus aligned finish maps. Three.js continues to supply materials, finish response, and interaction. Changing finish or substrate should not require regenerating the illustration.
The proposed template coordinates, validation checks, and GIMP/SVG tooling workflow are recorded in [Card Layer Pipeline](./card-layer-pipeline.md). The first template remains a proof to review, not a final approved layout.
---
# Rarity Art Direction
Rarity should have a major impact on the visual grammar of the card.
@@ -275,7 +312,9 @@ Rarity should **not** simply mean adding more glow or visual effects.
A useful principle:
> **Higher rarity should add storytelling and ornamentation, not merely more effects.**
> **Higher rarity should have greater narrative and visual presence. Ornament is one way to achieve that; scale, light, beauty, and restraint are others.**
Rarity describes collectible presentation, never the spiritual worth of a person or subject.
Another way to think about it:
@@ -301,11 +340,12 @@ Common cards should be intentionally restrained.
- Limited palette.
- Roughly 2-3 dominant colors plus cream / parchment.
- More muted or restrained jewel tones.
- Gold used mostly for separation or small accents.
- No gold accents or gold dividers.
### Artwork
- It doesn't need to be just the subject but rather them in the background doing something
- Show the subject in the middle distance doing one modest action, rather than presenting a headshot or dominant frontal portrait.
- Preserve a clear focal subject through placement and contrast; do not make the person an unreadable background speck.
- Simple background.
- Larger stained-glass panes.
- Fewer small glass segments.
@@ -326,16 +366,15 @@ Example:
**Timothy**
- Timothy holding a scroll.
- Simple ancient street or landscape.
- Simple arch.
- Blue / green / cream palette.
- Thin brass or gold divider.
- Timothy seated beside a modest doorway, reading a scroll with another person.
- A simple wall, street, and sky described with large glass panes.
- Blue / muted green / cream palette.
- Thin geometric frame and plain divider.
- No ornate botanical frame.
- No special corner symbols.
- No heavily gilded title plaque.
![alt text](image-2.png)
The earlier Timothy reference is too elaborate for the revised Common target and should not define its visual ceiling. Retain the existing harness fixture for material comparison while creating the new proof.
---
@@ -379,8 +418,8 @@ Rare cards should feel distinctive.
### Border
- Decorative frame.
- More custom ornament.
- Symbolic motifs related to the subject.
- More ornament within the shared Rare frame design.
- Subject-specific symbolic motifs remain in the illustration.
### Color
@@ -411,7 +450,7 @@ Extraordinary cards should feel prestigious.
- Elaborate framing.
- Strong illuminated-manuscript influence.
- More bespoke ornamentation.
- Richer ornamentation within the shared Extraordinary frame design.
- Larger use of gold.
### Color
@@ -446,22 +485,22 @@ They can break some of the normal card-layout rules while still clearly belongin
- Highly bespoke.
- Custom symbolic elements related specifically to the card.
- Extensive but tasteful ornamentation.
- Rich gilding.
- Ornamentation chosen to serve the artwork; density is not a requirement.
- Tasteful gilding where appropriate, without requiring a maximum amount of gold.
### Color
- Full jewel-tone palette where appropriate.
- Strong gold accents.
- Gold accents where they support the composition.
- Deep color contrast.
### Artwork
- Strong visual storytelling.
- Multiple symbols connected directly to the subject.
- Complex stained-glass composition.
- More dramatic light.
- More detailed environments.
- One governing narrative or visual idea, with supporting symbols chosen deliberately.
- Exceptional composition through scale, light, beauty, or restraint.
- Epic scenes may use immense environments and consequential moments.
- Contemplative scenes may use spacious composition, restrained symbolism, and remarkable light.
- Unique framing or iconography.
### Overall Feel
@@ -489,6 +528,8 @@ Possible visual elements:
These elements help tell David's story rather than simply adding decoration for decoration's sake.
They are possibilities, not a checklist for one image. A Legendary may contain fewer elements than an Extraordinary while having greater presence. Different artwork variants can explore different governing ideas.
![alt text](image-3.png)
@@ -523,7 +564,7 @@ A Legendary plain-paper card should still visually read as Legendary.
- Surface microtexture and roughness.
- Edge and core appearance.
- Base reflectivity and perceived weight.
- Paper, linen, plastic, metal, or wood response.
- Paper, linen, metal, or wood response.
## Finish controls
@@ -553,8 +594,6 @@ Examples:
- Finish -> visible.
- Material -> visible.
- Wear -> visible.
- Imperfections -> visible.
- Printing -> visible.
- Weight -> indirectly observable.
- Provenance -> inspectable metadata.
@@ -570,13 +609,6 @@ The material is the card's substrate. The finish is a treatment applied over tha
- Broad, weak reflection rather than a sharp sheen.
- Grain should become visible during close inspection without making the artwork noisy.
## Plastic
- Smoother surface.
- Clear-coated dielectric reflection.
- A bounded moving highlight should remain visible even with Printed Ink.
- Cleaner edges.
## Linen
- Raised interlaced warp and weft rather than generic noise.
@@ -598,7 +630,7 @@ The material is the card's substrate. The finish is a treatment applied over tha
- Warm substrate tint with a darker brown core.
- Longitudinal, slightly warped grain with shallow physical relief.
- Grain should support the card artwork rather than overpowering it.
- Reflection should remain restrained and less polished than plastic or metal.
- Reflection should remain restrained and less polished than metal.
## Foil
@@ -618,76 +650,28 @@ The material is the card's substrate. The finish is a treatment applied over tha
- Finish masks should be authored and reviewed as part of the card art rather than treated as arbitrary technical output.
- Preserve titles, verses, and other critical text unless a specific treatment is intentionally designed for them.
- Do not create obvious circular or elliptical exclusions around faces, hands, animals, or other subjects. Those shapes read as artificial holes when the card moves.
- Avoid isolated mask islands that produce unrelated holographic spots across skin or focal features.
- Prefer coverage that follows stained-glass panes, ornament, borders, garments, environmental color, and other compositional regions.
- Evaluate every mask while rotating the card under multiple lighting angles. A mask that looks acceptable in a still image may look distracting in motion.
---
# Wear
Wear should not make cards ugly to the point that the artwork becomes undesirable.
Even the lowest wear levels should remain visually readable and collectible.
A 0.00 wear card can be noticeably scratched, worn, or damaged while still looking like a cared-for physical collectible rather than a destroyed object.
Possible classifications are still subject to change, but could look something like:
- Mint.
- Near Mint.
- Minimal Wear.
- Moderately Played.
- Worn.
Wear can affect:
- Edge whitening.
- Surface scratches.
- Small scuffs.
- Minor print abrasion.
- Subtle corner wear.
It should not normally obscure:
- Subject identity.
- Important text.
- Major portions of the artwork.
Wear patterns should ideally be seeded per card instance so two cards with the same wear value do not necessarily have identical damage.
Use the approved [Card Harness Current Defaults](../spikes/card-harness/CURRENT-DEFAULTS.md#finish-masks) as the material and finish reference. Its David and Timothy thresholds are fixture-specific starting points for evaluation, not one universal mask formula. Keep exact runtime parameters there. Preserve the approved holographic response when iterating on coverage.
---
# Printing Variants
Printing should affect the graphic presentation of the same card identity.
## Normal
| Printing | Full-card art | Outer frame | Text backing | Text |
|---|---|---|---|---|
| Normal | Yes | Yes | Yes | Yes |
| Borderless | Yes | No | Yes | Yes |
| Textless | Yes | Yes | No | No |
| Boundless | Yes | No | No | No |
- Standard frame.
- Name.
- Subtitle.
- Short verse / quote / fact.
- Normal artwork area.
Textless retains only the outer frame over the illustration. Borderless retains only the backing needed for legible text. Boundless presents the illustration alone. Educational information remains available in the inspection panel for every printing.
## Borderless
- Artwork extends farther toward the card edges.
- Reduced frame.
- Minimal text treatment.
## Textless
- Artwork-focused.
- Little or no text.
- Educational information remains available in the inspection panel.
## Boundless
- Full-bleed or near-full-bleed artwork.
- Minimal or absent conventional frame.
- Intended to feel like a special printing rather than a higher rarity.
Artwork variant remains distinct from printing. A bespoke Legendary artwork variant may supply its own approved template, but its Normal, Borderless, Textless, and Boundless versions still follow these definitions.
Printing type should not change the underlying rarity of the card.
@@ -775,7 +759,7 @@ Across all rarities:
The distinction should be:
> **Common is simple. Legendary is elaborate.**
> **Common is simple. Legendary has exceptional presence.**
Not:
@@ -798,7 +782,6 @@ The MVP should establish:
- Multiple materials.
- Multiple finishes.
- Multiple printing types.
- Wear.
- 3D card inspection.
- Light-reactive materials.
- Pack-opening presentation.
@@ -808,22 +791,28 @@ I think it makes more sense to create a smaller number of highly intentional art
---
# First Proof and Deferred Work
Create a newly restrained Timothy illustration and one Common frame system, then assemble all four printings. Establish and validate the template geometry before generating final decoration. Review seams, text fit, focal placement, and exposed artwork at master size and application sizes, then evaluate the printings with the approved harness foil/holographic response. A small typography stress set should include a long name, a two-line title, and an excerpt near the budget limit.
The Trinity/Foundation art pass, wear/condition, and imperfections are deferred. They are outside this proof and M1 art requirements. Existing harness wear controls remain experimental tooling, not approval to add those properties to the product.
---
# Open Art Questions
Things that still need to be explored:
- Exact card dimensions / aspect ratio.
- Final typography.
- Exact template coordinates, optical text adjustments, minimum font sizes, and seam overlap after reviewing the first proof.
- Exact color palette.
- Whether each rarity has a fixed base frame or a family of frames.
- Whether card categories have their own secondary visual motifs.
- Whether tradition-specific cards alter UI or border accents.
- Final subject-type vocabulary and quiet label placement, using the Master Card Catalog.
- Tradition-specific illustration and UI motifs within the shared rarity frame system.
- Exact visual treatment for controversies.
- Whether halos should be used based on historical iconography, card category, tradition, or purely artistic composition.
- How much motion should exist inside holographic cards.
- Exact distinction between Extraordinary and Legendary.
- Whether higher-rarity cards are always visually more complex or occasionally gain prestige through extreme simplicity.
- How much the card artwork itself changes across printing variants.
- Which Legendary artwork variants need bespoke templates or alternate compositions.
- Final card back design.
---

55
docs/card-art-handoff.md Normal file
View File

@@ -0,0 +1,55 @@
# Card Art Handoff — 2026-09-11
## Agreed Direction
- Stained glass is primary; tapestry/linen and illuminated-manuscript influences support it. Sacred, stylized, restrained, and readable.
- Full-card illustration, outer frame, text backing, and typeset text are separate authoring components. Common through Extraordinary share one frame system per tier; Legendary artwork variants may have bespoke art/layouts. Rarity, printing, artwork variant, substrate, and finish remain distinct.
- Common people appear in the middle distance doing an ordinary action. Use broad panes, restrained colors, simple geometry, and no gold. The original Timothy was too premium; the new proof is the preferred direction.
- Legendary should have exceptional presence: epic scale or contemplative beauty. More ornament or symbols are not mandatory. Rarity never implies spiritual worth.
- One quiet subject-type label belongs on text-bearing printings. Period, tradition, and History grouping belong in app metadata. Text must fit and remain readable; deeper content/sources belong in inspection.
- Trinity/Foundation artwork, wear/condition, and imperfections are deferred. Obsolete face/hand/lamb cutout guidance was removed; do not reintroduce it.
| Printing | Components |
|---|---|
| Normal | Art + frame + backing + text |
| Textless | Art + frame; no lettering |
| Borderless | Art + backing + text |
| Boundless | Art only |
## Implemented Timothy Proof
Folder: [spikes/timothy-layer-proof](../spikes/timothy-layer-proof/). The user said the result “looks amazing and proves the concept really well.” Small tweaks remain welcome.
- [Source illustration](../spikes/timothy-layer-proof/source/timothy-art.png): generated through the built-in image tool. Timothy reads a scroll beside a modest doorway with another person; blue/green/cream, broad stained-glass treatment. Native 1060 × 1484, uniformly enlarged to 2000 × 2800 without cropping.
- [card.json](../spikes/timothy-layer-proof/card.json): Timothy / Common / Person / “Faithful disciple”; full KJV 2 Timothy 4:7, including terminal colon. These are Paul's words to Timothy, not a quote spoken by Timothy. Source link and context are included.
- [layout.json](../spikes/timothy-layer-proof/layout.json): 5:7 canvas, 60 px frame, 12 px frame/backing overlap, fixed text/focal boxes. Noto Serif and Noto Sans typography.
- [build.mjs](../spikes/timothy-layer-proof/build.mjs): Inkscape exports vector/text layers; ImageMagick assembles cards and sizes; Node creates masks and checks. Both applications are installed. No GIMP/MCP was needed.
- [Review sheet](../spikes/timothy-layer-proof/output/review/printings.png), [editable SVG](../spikes/timothy-layer-proof/output/timothy-editable.svg), and [validation report](../spikes/timothy-layer-proof/output/validation.json). Runtime cards live in `output/cards/`; matching masks in `output/masks/`.
Rebuild from `/home/dkzver/docker`:
```sh
node sanctification/spikes/timothy-layer-proof/build.mjs
```
The script overwrites its generated outputs. Edit source inputs/build logic for reproducible tweaks; save manual SVG edits separately. It still hardcodes Timothy filenames, panel divider coordinates, and a one-line title. It is a proof, not a general card generator or two-line text layout engine.
## Corner Fix — Preserve This
The user saw pale corner specks in the harness. The original export had antialiased circular PNG corners, while the harness uses quadratic rounded geometry and an opaque front material. Lighter artwork mixed into the frame boundary could show through sampling.
Runtime exports now use fully opaque rectangles. `frame-runtime` and `normal-runtime-overlay` extend solid frame color into all outer corners; the 3D geometry determines the silhouette. Simply disabling alpha on the old rounded export was insufficient because pale RGB remained at its curved edge. Borderless/Boundless extend the illustration instead. Finish masks are rectangular data maps, with zero coverage beneath active frame/backing.
The rebuilt Normal/Textless corner samples are solid `#304747` with mask value zero. All four runtime masters passed opacity checks; text bounds, 99,200 overlay-join pixels, and repeated Normal composition passed. The user offered to perform visual validation; **post-fix harness confirmation has not yet been received**. The current review sheet uses rectangular runtime images; rounded authoring layers still exist, but separate rounded preview-card exports were not implemented.
## Masks, Docs, and Remaining Work
Timothy coverage starts with saturation `smoothstep(0.08,0.58)` × value `smoothstep(0.015,0.16)`, suppressed under active frame/backing. Frame and text panels are printed ink in this proof. Removed text panels must not leave obsolete protected regions in Textless/Boundless. Exact approved shader/material behavior remains in [CURRENT-DEFAULTS.md](../spikes/card-harness/CURRENT-DEFAULTS.md).
[Art Direction](./art-direction.md) was updated for the layered system, printing definitions, Common restraint, Legendary presence, concise typography/category, and deferrals. [Functional Spec](./functional-spec-v2.md) received matching deferred wording; its heading says v4. Harness README/defaults had obsolete cutout wording removed and experimental wear labeled deferred.
[Card Layer Pipeline](./card-layer-pipeline.md) is still a broader proposal: its opening and GIMP-first tooling text are stale, and not all proposed checks are implemented. Use this handoff and the actual build for current behavior. Font hashes are recorded, not enforced against a lockfile. The simple seam fixture does not constitute a comprehensive defect suite. Earlier interrupted attempts to add a proof README/prompt file did not land; the new [session prompt](./card-generation-session-prompt.md) captures the workflow for future generations.
Preserve the existing dirty worktree, including pre-existing deleted root `card-back.png`, `common.png`, and `legendary.png`. The proof has not replaced harness reference fixtures. For review, load a rebuilt card and its matching mask through Lab's local image inputs. Avoid changing shader defaults to compensate for an asset defect.
Environment note: tools repeatedly failed with `bwrap: loopback: Failed RTM_NEWADDR`. Approved shell escalation worked; the patch helper sometimes still failed when updating existing files. This is an environment issue, not a project dependency problem.

View File

@@ -0,0 +1,54 @@
# Prompt for a New Card-Generation Session
Copy the block below into a session with access to this repository. Replace the bracketed brief; add one row per card. Start with another Common to exercise the existing reusable frame. Higher tiers still need their first approved templates.
```text
Create finished card assets for Sanctification using the layered process proven by Timothy.
Card brief:
- Subject/name: [name]
- Canonical rarity: [Common / Uncommon / Rare / Extraordinary / Legendary]
- Subject type: [Person / Event / Place / Object / Doctrine / other catalog type]
- Scene or governing idea: [one concrete sentence]
- Scripture/quote: [reference and translation; or ask you to propose suitable content]
- Optional subtitle: [short descriptor, or omit]
- Output folder: [new folder under sanctification/spikes/]
Read these before starting:
1. sanctification/docs/card-art-handoff.md
2. sanctification/docs/art-direction.md
3. Relevant sections of sanctification/docs/functional-spec-v2.md (its heading says v4)
4. sanctification/docs/card-layer-pipeline.md (a broader proposal; see handoff for implemented scope)
5. sanctification/spikes/timothy-layer-proof/{build.mjs,layout.json,card.json}
6. sanctification/spikes/card-harness/CURRENT-DEFAULTS.md
Inspect the existing Timothy source illustration and review sheet visually. Use them as references for Common restraint and composition, without copying Timothy's identity or scene. Follow applicable repository instructions and the available image-generation skill.
Use image generation for the base illustration and the installed Inkscape/ImageMagick tools for exact geometry, typography, composition, and export. Save the original generated source and exact generation prompt in the new card's folder. Do not install or switch to GIMP/MCP unless a concrete limitation requires discussion.
Art direction:
- Stained-glass-inspired, sacred, beautiful, and stylized; supporting manuscript/tapestry influence stays restrained.
- A Common uses broad panes, limited muted blue/green/cream colors, a simple shared geometric frame, and no gold. For people, show an ordinary action in the middle distance, with a clear focal subject and enough setting. Avoid headshots and heroic frontal posing.
- Higher rarity gains narrative presence, scale, beauty, light, and selective symbolism. Legendary may be epic or contemplative; avoid treating ornament density as a requirement.
- Common through Extraordinary share one frame system per tier. Reuse the existing Common geometry for Commons. Place subject-specific symbolism in the illustration. Legendary artwork variants may have bespoke templates.
Generate a full-bleed 5:7 illustration ONLY: no title, letters, border, backing panels, corner ornaments, or watermark. Compose against the template's art-safe region, keeping the focal subject clear of the Normal printing's overlays. The entire illustration must work when revealed by Textless or Boundless. Request generous real illustrated background behind overlay areas, not blank panel-shaped holes. Visually inspect the result before assembly.
Use a 2000 × 2800 working canvas. Retain the native source, record its dimensions and any uniform scale/crop, and do not call an upscale native high-resolution art. Keep every exported layer on the same canvas and origin.
Assemble all four printings from the same components:
- Normal: art + outer frame + text backing + text.
- Textless: art + outer frame; zero lettering or text backing.
- Borderless: art + text backing + text; no outer frame.
- Boundless: art alone.
Verify quoted wording and attribution, including who is speaking. Prefer a concise meaningful excerpt over crowded text. Typeset real editable text using explicit boxes, fonts, sizes, line spacing, and alignment. Measure unclipped glyph bounds; never silently shrink or clip overflowing text. Revise content or create an explicitly reviewed alternate layout. The existing script is Timothy-specific: adapt filenames and content assumptions deliberately instead of assuming it is a general batch engine.
Preserve the corner fix: runtime card faces are fully opaque rectangular textures. Framed printings extend solid frame color through the entire outer corners. Three.js geometry supplies the rounded silhouette. Do not apply the rounded silhouette alpha mask to runtime exports or merely disable alpha on an already clipped PNG. Borderless/Boundless carry full artwork into the corners.
Export a matching finish mask per printing. The Timothy proof uses saturation smoothstep(0.08,0.58) times value smoothstep(0.015,0.16), then suppresses coverage beneath active frame/backing layers. Treat that as a starting recipe to review for new art. Textless/Boundless must recover coverage in former text areas. Preserve existing harness shader settings.
Deliver the original artwork and prompt, content/source metadata, layout, reproducible build script, editable SVG, separate layer exports, four 2000 × 2800 runtime cards, 1000- and 500-pixel versions, matching finish masks, a labeled review sheet, and an honest validation report. Check text fit, frame/backing seams, opaque runtime pixels, solid frame corner colors, and zero finish coverage under framed corners. Inspect the review sheet yourself. I can do the final moving-light validation in the harness.
Keep new work in the requested output folder. Preserve existing proof/reference assets and unrelated working-tree changes. Summarize the outputs and any remaining visual decisions; do not claim human approval or runtime review that has not happened.
```

121
docs/card-layer-pipeline.md Normal file
View File

@@ -0,0 +1,121 @@
# Card Layer Pipeline — First Proof Proposal
This is the proposed production and validation workflow for the layered card system in [Art Direction](./art-direction.md#layered-card-production). It is a design document, not an installed toolchain or a completed visual proof.
The first proof is a restrained Common Timothy illustration, one Common frame system, and four printings. Trinity/Foundation artwork, wear/condition, and imperfections are deferred.
## Geometry Owns Alignment
Use one versioned layout definition to produce the composition guides, frame/backing paths, transparency masks, text regions, and validation regions. Do not maintain separate hand-entered coordinates for each tool.
Generation supplies artwork and decorative surfaces. It does not decide final transparent boundaries, panel placement, lettering, or alignment. A guide image in a generation prompt helps composition but does not guarantee coordinate compliance. Fit and review the generated source once, then clip it to the template's exact masks.
For a simple Common frame, vector shapes and a restrained fill may be sufficient without generating any frame imagery. For more ornate tiers, generate decoration with extra coverage beyond the target paths, fit or retouch it once, and preserve the approved result. Clipping alone cannot repair an ornament whose structure is in the wrong place.
## Shared Canvas and Draft Coordinates
All production layers and masks use 2000 × 2800 pixels, origin at the top left, x increasing rightward and y downward. Preserve full-canvas transparent margins and place every exported layer at (0, 0). Use the renderer's established UV convention at the runtime boundary; do not independently mirror maps.
Generated source images may have other dimensions. Retain the original, record an explicit crop/scale transform into the production canvas, and visually review focal placement. Apply the same transform to any associated masks. Never stretch an illustration silently to fit.
The following coordinates are a **draft Common layout for the first proof**, not approved final proportions. Rectangles are x, y, width, height in master pixels. Outer rounded geometry should follow the harness's physical corner radius.
| Region | Draft geometry | Purpose |
|---|---|---|
| Canvas | 0, 0, 2000, 2800 | Full-card illustration and common origin |
| Outer frame | 60 px inset band | Simple continuous frame; transparent interior |
| Title backing | 48, 48, 1904, 312 | Extends 12 px underneath the frame at the top and sides |
| Lower backing | 48, 2180, 1904, 572 | Extends 12 px underneath the frame at the sides and bottom |
| Title text | 160, 105, 1680, 105 | One-line title box; horizontal center at x = 1000 |
| Subtitle | 160, 240, 1100, 64 | Optional short descriptor |
| Category | 1400, 240, 440, 64 | Quiet, right-aligned subject type |
| Focal safe region | 160, 430, 1680, 1680 | Essential subjects remain clear of Normal overlays |
| Excerpt / fact | 160, 2250, 1680, 280 | Short typeset supporting content |
| Reference | 160, 2580, 1680, 80 | Short attribution |
The backing's frame overlap is internal compositing allowance, not physical print bleed. For this draft, 12 master pixels becomes 3 pixels at 500 × 700. Review actual filter behavior before choosing a final overlap.
A two-line title needs a separately defined and reviewed layout with room for its subtitle/category; it is not permission to spill into the illustration. Each Legendary template needs the same explicit regions and checks even if its shapes differ.
## Seam-Free Border Assembly
1. Derive the outer frame and backing masks from shared vector paths.
2. Put a continuous, opaque base fill beneath decoration wherever the template requires solid coverage. Texture alpha must not accidentally punch through these regions.
3. Extend backing joins underneath the frame. Do not rely on two separately antialiased edges meeting at exactly one pixel boundary.
4. Place the frame over the backing, with one defined compositing order and color profile.
5. Export Normal's combined overlay, Textless's frame-only overlay, and Borderless's backing-only overlay. Boundless needs none.
6. Compose the final face at master resolution, then derive runtime sizes from that composition. Retain separate editable source layers.
Borderless backing must have clean standalone edges; it cannot depend on the absent outer frame to hide unfinished decoration. A joining surface also needs visual continuity in color and texture: an alpha check catches a gap, but cannot approve its appearance.
Keep a consistent alpha convention throughout export and resizing. Inspect light and dark backgrounds to catch edge fringes. A single composed front texture is sufficient for the standard runtime card; separate almost-coplanar 3D meshes are unnecessary for these authoring layers.
## Deterministic Text
Supply name, optional subtitle, subject type, excerpt, and attribution as structured content. Use real text objects with pinned font files, size, weight, line spacing, alignment, and language settings. Fix the rendering tool/version for reproducible exports.
For a centered title, the template supplies the center anchor x = 1000. The text engine measures and places the text around that anchor. Baselines and line spacing govern vertical placement. Record any approved optical adjustment rather than asking generation to center text.
Every template needs approved minimum font sizes and maximum line counts, established at actual application display sizes. Word count is an editorial guide, not a fit check. Long names and wide glyphs can overflow even with few words.
Validate the **unclipped rendered glyph bounds** against each text region and its padding. Checking only the text object's box can miss clipping. Reject missing fonts, missing glyphs, overflow, or insufficient line capacity; do not silently substitute fonts, crop the text, or shrink it below the minimum. Use a reviewed alternate layout or revise the content.
Text is rendered anew when card content changes, but its coordinates do not change randomly. Once approved, the frame/backing decoration is reused.
## Finish Coverage
Use the [approved harness defaults](../spikes/card-harness/CURRENT-DEFAULTS.md#finish-masks) as reference recipes. David and Timothy have distinct saturation thresholds; preserve the approved fixture behavior for comparisons.
Keep finish masks separate from transparency masks. For each printing:
- Use the active illustration, frame, and backing components' intended coverage.
- Resolve coverage using the same transforms, occlusion, and layer order as the visible face. Hidden illustration coverage must not leak onto a visible backing.
- Derive text protection from the actual layout.
- Remove protection associated with absent text/backing in Textless and Boundless.
- Export aligned scalar coverage maps; treat them as data at runtime rather than artwork color.
Review finish response in motion with the existing harness. A structurally valid mask still needs visual approval under several lighting angles. Keep exact shader coefficients in CURRENT-DEFAULTS.md.
## Proposed Automated Validation
Validation should run after fitting a generated source and after every final card assembly. A future build command should fail with a readable report and produce a diagnostic image showing the failed regions.
| Check | Evidence |
|---|---|
| Canvas and registration | All production layers/maps have the expected dimensions, origin, template revision, and recorded transforms |
| Required coverage | Combined overlay alpha has no gaps within the template's required opaque regions, including joins |
| Transparent windows | Pixels in required clear regions are transparent; intentional antialiased edge bands are checked separately |
| Typography | Required content exists, font/glyphs resolve, unclipped glyph bounds fit, line limits and minimum sizes pass |
| Printing composition | Normal, Textless, Borderless, and Boundless include exactly the prescribed components |
| Finish alignment | Coverage uses the same geometry/transforms and the correct printing's text protection |
| Downsampled edges | Approved runtime sizes have no exposed join pixels or unintended alpha fringes |
| Repeatability | Same content, assets, template, fonts, and pinned renderer reproduce the same decoded pixels |
Check overlay alpha independently of the final opaque illustration: a gap can reveal artwork while the finished card's alpha still looks completely opaque.
Use adversarial fixtures when implementing the validator: a displaced backing, a one-pixel seam, a missing font, an overlong title, and an obsolete text-protection region should fail. This verifies that the checks detect defects rather than merely accepting the sample card.
Automated checks cannot guarantee narrative focus, artistic quality, optical balance, or perceived text readability under moving light. Produce review sheets at master, standard, and thumbnail sizes, plus harness views. A diagnostic outline of text and focal regions is useful for review but is never exported on the finished card.
## Tooling Proposal
A practical starting stack is GIMP for editable assembly and review, an SVG template for geometry and typography, and a small command-line validation/export script. Do not require all tools if one renderer can meet the contract.
- **GIMP:** editable layers/masks and optional scripted assembly. Its API supports creating text layers and controlling their fonts, sizing, justification, and spacing. See the official [TextLayer API](https://developer.gimp.org/api/3.0/libgimp/class.TextLayer.html).
- **Inkscape/SVG:** author exact paths, render a fixed page, and query object bounds for layout checks. See the official [command-line guide](https://wiki.inkscape.org/wiki/Using_the_Command_Line). Validate unclipped glyph bounds as well as object boxes.
- **ImageMagick:** optional alpha compositing and pixel inspection for exported images. See its [alpha-compositing documentation](https://imagemagick.org/compose/). It provides primitives, not a ready-made card validator.
- **MCP:** an optional interface to invoke the same deterministic assembly and validation operations. A connector alone does not guarantee alignment, and freeform visual placement by an agent should not replace the shared layout definition.
No GIMP MCP is connected in this session. Select and verify a specific adapter's compatibility with the installed GIMP version before depending on it. A CLI pipeline can implement the same workflow without that adapter.
## Proof Sequence
1. Render the template with plain fills and a typography stress set. Establish acceptable proportions, font sizes, and overlap.
2. Generate the restrained Timothy illustration using the approved guide, then fit and review it once.
3. Add restrained Common frame decoration only if plain vector treatment is insufficient.
4. Assemble all four printings and their aligned finish masks.
5. Run structural checks and review seams and text at target sizes.
6. Review with the approved harness finish response and compare against the existing reference fixture.
7. Freeze the approved template/assets and reuse them for subsequent Commons.
Keep the current harness reference fixtures available for comparison. This proof should establish new production assets without silently replacing the approved material baseline.

View File

@@ -573,7 +573,7 @@ Card Instance
Opened on <date>
```
Randomized wear/condition and random imperfections are **not** part of the card-instance model.
Randomized wear/condition and random imperfections are **deferred** and are not part of the M1 card-instance model.
That general contract should stay renderer-independent. The database should not care whether Three.js or some future engine is displaying the card.
@@ -614,7 +614,7 @@ The exact visual treatment, physical appearance, compatibility constraints, thic
### Wear / Condition
I am cutting randomized wear / condition from the card-instance model entirely.
Randomized wear / condition is deferred and excluded from the M1 card-instance model.
The more I thought about it, the more it felt like negative variance rather than a fun collector property. Getting the Legendary you wanted in the finish, material, and printing you wanted only for it to be a "bad" damaged copy would feel like being punished for no reason - especially when packs are earned through habits rather than something you can endlessly buy or grind that same day.
@@ -634,7 +634,7 @@ Eventually there could still be some fun digital-scale idea for unopened packs,
### Imperfections
Cut.
Deferred; excluded from the M1 card-instance model.
I do not want randomized fingerprints, hairs, print defects, or other accidental-looking imperfections as an instance-level collectible system.
@@ -814,7 +814,7 @@ At the functional level I only want a few religious-art guardrails:
* Historical/traditional iconography can inform the artwork where appropriate.
* Rarity should never imply greater spiritual worth.
The Trinity/Foundation card remains a special art case that needs its own pass.
The Trinity/Foundation art pass remains deferred.
I still expect to lean heavily on LLM/image-generation tooling and MCP servers for creating and iterating on the artwork since I am a software engineer, not an artist.
@@ -1007,7 +1007,7 @@ I would rather have **50 cards where all of the difficult rendering/material/var
The full catalog can still contain 500 identities. M1 only needs a representative subset actually implemented.
Randomized wear/condition and randomized imperfections are cut from the design. Filler-card economics, multiplayer trading, and advanced social behavior are not required for M1.
Randomized wear/condition and randomized imperfections are deferred. Filler-card economics, multiplayer trading, and advanced social behavior are not required for M1.
### Not Required for M1