Art Direction
The consistency and quality of the AI-generated assets are governed by a robust Art Direction system. This system is defined in two key places: the high-level vision in art.txt
and its programmatic implementation in gen_assets/art_direction.py
.
The Vision: art.txt
This document serves as the master guide for the game's aesthetic. It establishes the core visual identity:
- Theme: Medieval Gothic, balancing the somber and the magical.
- Inspiration: Darkest Dungeon, Slay the Spire, medieval manuscripts, and gothic architecture.
- Color Palette: Primarily cool tones (deep blue, gray, violet) accented with gold, red, or green.
- Style: 2D art with realistic shading and a modern, stylized touch.
The Implementation: ArtDirection
Class
The gen_assets/art_direction.py
file translates the vision from art.txt
into code. The ArtDirection
class contains methods that construct detailed, high-quality prompts for the SDXL model.
Base Style
The class defines a set of base prompts that are reused across all generations to ensure consistency.
class ArtDirection:
BASE_STYLE = "Medieval gothic art, realistic digital painting, dramatic lighting, cinematic composition"
NEGATIVE_PROMPT = "cartoon, anime, low quality, blurry, modern, contemporary, plastic, toy-like"
QUALITY_TAGS = "highly detailed, masterpiece, best quality, sharp focus, professional artwork"
Hero Background Prompts
The get_hero_background_prompt(hero_type)
method generates specific prompts for each hero's environment, combining the base style with unique elements.
For example, the prompt for the Knight is:
# Positive prompt for the Knight's background
"""
Medieval knight throne room, gothic stone architecture, ornate religious carvings,
epic torchlight casting dramatic shadows, heavy wooden doors with iron bindings,
stained glass windows, ceremonial banners, noble atmosphere,
Medieval gothic art, realistic digital painting, dramatic lighting, cinematic composition,
deep blue, grey, violet tones, golden highlights,
highly detailed, masterpiece, best quality, sharp focus, professional artwork
"""
Hero Sprite Prompts
Similarly, get_hero_sprite_prompt(hero_type)
creates prompts for character sprites. It focuses on details like armor, clothing, and posture.
Prompt for the Assassin sprite:
# Positive prompt for the Assassin's sprite
"""
Medieval rogue in dark leather armor, hooded cloak with hood up,
twin curved daggers, agile athletic build, mysterious face in shadows,
stealthy posture, dark colors with subtle metallic accents,
nimble and dangerous appearance, ready for action,
Medieval gothic art, realistic digital painting, dramatic lighting, cinematic composition,
highly detailed, masterpiece, best quality, sharp focus, professional artwork
"""
By centralizing prompt generation in this class, the entire game's visual style can be tweaked or overhauled by modifying a single file, ensuring that all subsequent asset generations will follow the new direction.