import { flatGradeClose } from './cinematography.js'; export type ReferenceProfile = 'legacy' | 'cinematic-face-first'; export function faceCandidatePrompt(description: string, style?: string): string { return `${style?.trim() || 'Photorealistic'}. Face identity candidate: ${description.trim()}. Tight chest-up front portrait, head level, eyes to camera, relaxed closed lips, neutral expression, readable facial detail. ${flatGradeClose('mid-gray', 'standard')}. No text or watermark.`; } /** * Joey 3.0 3-panel identity-anchor character sheet. Three panels beat six: the * sheet is one image with a fixed pixel budget, and six cells starve the face * — the one thing the sheet exists to lock — of resolution. Three cells give * each panel roughly double the pixels, which is what makes the chest-up face * panel usable as a downstream identity anchor. Layout: headless full-body * front (isolates garment/silhouette with zero facial data competing for * attention), full-body rear with the head attached, and a tight chest-up face * lock. Closes with the LOCKED FLAT GRADE (a reference plate carries zero * lighting information) and the mandatory skin-tone-consistency clause (rear * panels drift darker/tanner without it). */ export function characterSheetThreePanelPrompt(description: string, style: string, aspectRatio: string): string { return [ `A three-panel character reference sheet composed as one ${aspectRatio} frame, divided into three equal vertical panels side by side, thin clean separation between panels, the same figure and the same outfit rendered identically across all three.`, `The character: ${description}. Style: ${style}.`, 'LEFT PANEL — full body front view, headless. The figure stands squared to camera from the shoulders down, arms relaxed at the sides, hands open and loose, weight even across both feet. There is no head, no neck, and no hair at all — nothing rises above the shoulder line, and no hair falls across the chest or shoulders. The garment holds its own three-dimensional shape as if worn by an invisible body — full volume, natural drape, real fabric tension — with nothing emerging from the neckline. No stump, no cut edge, no anatomy detail, no blur, no fade, no ghosting, no transparency in the body. The panel keeps full headroom — generous empty backdrop above the shoulders — so the figure sits at the same scale and position as a normal full-body portrait.', 'CENTER PANEL — full body rear view, head attached. The same figure photographed from directly behind, standing straight, hair fall and garment back construction readable, arms relaxed, weight even, framed from the top of the head down past the footwear.', 'RIGHT PANEL — tight chest-up portrait, the identity lock. The same figure framed from just above the top of the head down to the collarbones only, the face filling most of the panel, a true close-up. Body squared to camera, head level, eyes directly to camera, lips closed and relaxed, neutral controlled expression, brows, lashes, and skin detail clearly readable at close range.', `Backdrop and light, uniform across all three panels: ${flatGradeClose('mid-gray', 'standard')}.`, 'Skin renders at its true natural tone, identical in value and hue across the face, back, arms, and hands in every panel — never darkened, never tanned, never shifted between panels. Identical character identity locked across all three panels — same figure, same wardrobe, same proportions in every cell.', ].join(' '); } export function outfitCandidatePrompt(description: string, outfit?: string, style?: string): string { return `${style?.trim() || 'Photorealistic'}. Single full-body front view, head to toe, generous headroom. Character: ${description.trim()}. Reference image 1 controls the approved face identity; preserve it exactly. Outfit: ${outfit?.trim() || 'preserve the approved reference clothing'}. ${flatGradeClose('mid-gray', 'standard')}. No text or watermark.`; } export function characterSheetReferencePrompt(referenceSlots: string[], style: string, aspectRatio: string): string { return `Create a professional character reference sheet for the attached character using ${referenceSlots.join(', ')} as strong reference, 1:1 similarity, ${style}. Divide the sheet into four vertical columns for a total of eight shots. The top row shows full-body views from head to toe: front, side, three-quarter, and back. No cropping at ankles, knees, or head. The bottom row contains four matching face close-ups, including front and profile views. Use clean neutral studio lighting. Background: even neutral mid-gray seamless, no seam line, no gradient, subject rendered at true natural tone against the neutral gray. Aspect ratio = ${aspectRatio}.`; } export function characterSheetDescriptionPrompt(description: string, style: string, aspectRatio: string): string { return `Create a professional character reference sheet for ${description}. Divide the sheet into four vertical columns for a total of eight shots. The top row shows full-body views from head to toe: front, side, three-quarter, and back. No cropping at ankles, knees, or head. The bottom row contains four matching face close-ups, including front and profile views. Style: ${style}. Use clean neutral studio lighting, no scene-specific lighting. Background: even neutral mid-gray seamless, no seam line, no gradient, subject rendered at true natural tone against the neutral gray. Aspect ratio = ${aspectRatio}.`; } export function characterSheetSixPanelPrompt(description: string, style: string, aspectRatio: string): string { return [ `A 6-panel character reference sheet arranged as a 3-column by 2-row grid in a single ${aspectRatio} frame, thin clean white gutters between panels.`, `Each panel shows the same single character — ${description}.`, 'Panel 1 (top-left): full body front. Panel 2 (top-center): side profile close headshot, left side. Panel 3 (top-right): full body back.', 'Panel 4 (bottom-left): side profile close headshot, right side. Panel 5 (bottom-center): front face close headshot. Panel 6 (bottom-right): detail shot (hands / accessory / held prop).', 'Even neutral mid-gray seamless backdrop applied uniformly across all six panels, no seam line, no gradient.', `Style: ${style}. Identical character identity locked across all six panels — same face, skin, hair, wardrobe, accessories, proportions in every cell.`, ].join(' '); }