Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:869413421 Ai moive studio CharacterThreeViewPromptBuilder

From Leeroopedia
Knowledge Sources
Domains Prompt_Engineering, Generative_AI
Last Updated 2026-10-23 12:00 GMT

Overview

Pattern that constructs three-view character reference sheet prompts from extracted character traits using a fixed template with era, occupation, and key visual traits.

Description

CharacterThreeViewPromptBuilder is a pattern doc that defines the interface for building three-view (front, side, back) character reference prompts. It uses a class-level TEMPLATE constant with placeholders for name, era_background, occupation, and key_visual_traits. The build_prompt classmethod fills the template with values extracted from the character profile.

The template enforces a live-action aesthetic (no 3D, CGI, or game-style) and includes the character name in the top-left corner of the generated image.

Usage

Used by MovieCharacterService.extract_characters_from_chapter to generate generated_prompt for each character. Also used by generate_character_avatar as the base prompt for avatar generation.

Code Reference

Source Location

  • Repository: ai-moive-studio
  • File: backend/src/services/movie_character_service.py:L74-118

Signature

class CharacterThreeViewPromptBuilder:
    TEMPLATE = """..."""  # Fixed template with {name}, {era_background}, etc.

    @classmethod
    def build_prompt(
        cls,
        name: str,
        era_background: Optional[str] = None,
        occupation: Optional[str] = None,
        key_visual_traits: Optional[List[str]] = None,
        visual_traits: Optional[str] = None,
        role_description: Optional[str] = None
    ) -> str:
        """Build a three-view character reference prompt."""

Import

from src.services.movie_character_service import CharacterThreeViewPromptBuilder

I/O Contract

Inputs

Name Type Required Description
name str Yes Character name
era_background str No Era (e.g., "1940s WWII")
occupation str No Occupation/social status
key_visual_traits List[str] No 3-4 core visual traits
visual_traits str No Detailed visual description (fallback)

Outputs

Name Type Description
return value str Full English three-view prompt string

Usage Examples

Building a Three-View Prompt

from src.services.movie_character_service import CharacterThreeViewPromptBuilder

prompt = CharacterThreeViewPromptBuilder.build_prompt(
    name="Aldric",
    era_background="1940s WWII",
    occupation="Army officer",
    key_visual_traits=["tall", "sharp jawline", "military uniform", "silver hair"],
)
print(prompt)  # Full English three-view prompt

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment