Visual Asset Cards from PDF
Purpose
Convert architectural project visualization references (PDF brochures, image folders, WeChat attachments) into a reusable visual standard for the rendering team. The output is three asset cards:
- Main Anchor Card — what the project looks like (visual DNA)
- Style Guard Card — must-haves and taboos so outputs do not drift
- Scenario Expansion Card — reusable scene-specific prompts for batch production
When to Use
Use this skill when the user:
- References a PDF or image set of project renderings/photos and asks to "extract style", "generate asset cards", "make rendering standards", or "help the team render consistently".
- Wants to turn a competitor or benchmark project into an internal visual prompt library.
Required Inputs
- Path to PDF(s) or image folder(s)
- Project name / location (extract from OCR if needed)
- Any known constraints (e.g., no red/gold, low-sat, hotel-like, etc.)
Workflow
Step 1: Ingest & Convert
- If input is PDF:
- Check page count, size, and whether it is a scanned/image-only PDF (no text layer).
- Convert all pages to PNG at a workable width (around 1600 px) usingpymupdf(fitz).
- Generate thumbnail JPEGs (around 400 px) for quick browsing.
- Run OCR (rapidocr_onnxruntime) to extract any text; save to_ocr.txt. - If input is an image folder:
- Create thumbnails if absent. - Create a browsable HTML index (
_index.html) pairing each page thumbnail with its OCR text.
Step 2: Visual Research
- Open the thumbnail index and browse every page. Do not skip pages because OCR is empty — these are often pure rendering pages.
- Categorize pages by scene type:
- Main entrance / gate / porte-cochère
- Clubhouse / lobby / canopy
- Covered walkway / colonnade
- Courtyard garden / water feature
- Landscape terrace / outdoor furniture
- Building facade detail
- Signage wall / branding moment
- Interior-to-exterior framed view
- Driveway / approach - Record repeating patterns:
- Time of day (e.g., blue hour dusk)
- Weather / lighting (soft overcast, warm interior glow)
- Material palette (stone, metal, glass, water, plants)
- Color palette (warm grey, champagne gold, dark granite, muted green)
- Camera angle (eye-level 1.2–1.6 m, 24–35 mm, verticals corrected)
- Composition rules (symmetry, framing, foreground occlusion, leading lines)
Step 3: Distill Visual DNA
Synthesize findings into a one-paragraph style definition plus a table of dimensions:
| Dimension | Standard |
|---|---|
| Architecture style | ... |
| Materials | ... |
| Color palette | ... |
| Lighting / time | ... |
| Plants | ... |
| Composition | ... |
| Mood | ... |
Step 4: Generate the Three Asset Cards
Write the output to a Markdown file named _asset_cards_<project_slug>.md and an HTML preview named _asset_cards_<project_slug>.html.
Card 1: Main Anchor
- One-sentence style definition.
- Feature table with the seven dimensions above.
- Bilingual prompt (English and Chinese) that can be dropped into Midjourney / Stable Diffusion / D5 / Enscape as a master prompt.
Card 2: Style Guard
- Must-haves (time, color, material combo, lighting, plants, camera, mood).
- Taboos (e.g., no plastic plants, no dead-black shadows, no oversaturated colors).
- Pre-delivery self-check list (6–8 questions).
Card 3: Scenario Expansion
- Provide 6–10 scene-specific prompts covering the categories observed.
- Each prompt includes: scene name, composition notes, English prompt, Chinese prompt.
Step 5: Deliver
- Present the Markdown and HTML files using
present_files. - Tell the user the files are ready and offer follow-up: scene-specific extraction, visual comparison with another project, or rendering-parameter cheat sheet.
Output Conventions
- Use project slug in filenames:
_asset_cards_<project_slug>.mdand.html. - Keep prompts concise but specific enough to reproduce the look without the reference image.
- Include both English and Chinese prompts because rendering tools often prefer English, while the team discussion is in Chinese.
- The HTML preview should use a clean, white/light theme with readable code blocks and tables.
Bundled Resources
- None required; all operations use standard Python libraries (
fitz,rapidocr_onnxruntime) and built-in tools.