| name | xianwen-asset-pipeline |
| description | Art asset management for Xianwen Online: sprite processing, background removal, image splitting, AI prompt generation for monsters/NPCs/backgrounds, and asset registration. Use when user needs image processing, art prompts, '去背', '提示詞', or asset management. |
Xianwen Asset Pipeline
Art asset processing workflow, extracted from 20+ asset management sessions.
Asset Directories
| Type | Location | Format |
|---|
| Cat breed sprites | web-client/src/assets/sprites/ | PNG (6-expression sheets) |
| Split expressions | web-client/src/assets/sprites/split/<breed>/ | PNG (individual) |
| Monster sprites | web-client/src/assets/monsters/ | PNG (transparent) |
| NPC portraits | web-client/src/assets/npcs/ | PNG (transparent) |
| Backgrounds | web-client/src/assets/backgrounds/ | PNG/WebP |
| UI elements | web-client/src/assets/ui/ | SVG/PNG |
Sprite Processing
6-Expression Sheet Splitting
Each breed has a composite image with 6 expressions:
happy, sad, angry, serious, surprised, default
Split using Python PIL/Pillow:
from PIL import Image
img = Image.open("breed.png")
w, h = img.size
cell_w, cell_h = w // 3, h // 2
Background Removal
- Use
rembg or manual PIL processing
- CRITICAL: If watermark overlaps with subject, use neighbor-color fill, NOT cut-out
- Persian cat sprites have black background (others have white)
- Verify transparency after processing
Quality Checklist
AI Art Prompt Writing
Prompt Document Location
Art prompts are saved to docs/ files:
docs/monster-sprite-prompts.md
docs/npc-art-prompts.md
docs/background-prompts.md
docs/world-boss-art-prompts.md
docs/equipment-item-art-prompts.md
Xianwen Art Style Guidelines
All prompts should include these style anchors:
- Medium: Chinese ink-wash painting (水墨畫) meets digital fantasy art
- Color palette: Dark ink (#0F1629), gold (#C9A84C), jade (#4ECDC4)
- Tone: Epic, grand, profound (史詩/壯闊/深邃)
- Subject: Cat cultivators in Xianxia setting
- Avoid: Cute/chibi, Western fantasy, generic mobile game style
Monster Prompt Template
A [monster_name] in Chinese Xianxia ink-wash style.
[Physical description]. [Spiritual/cultivation attributes].
Dark atmospheric background with subtle qi/spiritual energy particles.
Transparent PNG, centered composition, game sprite format.
Style: Traditional Chinese fantasy illustration, detailed linework,
muted colors with jade/gold accents.
NPC Portrait Template
Portrait of [npc_name], a [role] cat cultivator in [sect_name].
[Physical features, breed]. [Clothing and accessories].
Expression: [emotion]. Cultivation level: [realm].
Chinese ink-wash painting style, dark cinematic background,
golden light accents. Upper body portrait, slight 3/4 angle.
Asset Registration
After adding new images:
- Import in the relevant component or utility file
- Add mapping entry (e.g., monster name → image path)
- Verify mapping works with various screen sizes
- Check that missing images show a fallback, not a broken icon