تشريح مطالبة إنشاء الصور
العنصر، والأسلوب، والوسيط، والإضاءة، ولوحة الألوان، وعناصر التكوين
تشريح مطالبة إنشاء الصور درس مجاني في AI Prompt Engineering على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في AI Prompt Engineering، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة AI Prompt Engineering 4 دروس في المجموع.
موجّه الصور بوصفه وصفة
موجّه إنشاء الصور هو وصفة لمشهد بصري. وكما في الطهي، تهمّ طريقة ترتيب المكونات وتوازنها. فالعناصر الناقصة تنتج نتائج عامة، والعناصر الخاطئة تؤدي إلى إخفاقات مفاجئة. ويمنحك إتقان بنية الموجّه تحكمًا إبداعيًا يمكن التنبؤ به.
المكونات الأساسية الستة
يحتوي كل موجّه صور قوي على ستة مكونات: الموضوع (ما الذي يظهر)، والأسلوب (كيف يبدو)، والوسيط (الشكل الفني)، والإضاءة (الإنارة)، ولوحة الألوان (النبرة)، والتكوين (التأطير). ويترك حذف أي مكوّن النموذج للتخمين، وغالبًا ما يلجأ إلى إعدادات افتراضية عامة.
# Anatomy of an image prompt
prompt_components = {
'subject': 'A lone lighthouse on a rocky coastline',
'style': 'dramatic, moody, cinematic',
'medium': 'oil painting',
'lighting': 'stormy overcast sky, waves crashing, dramatic side-lighting',
'color_palette': 'desaturated blues and grays with warm amber light from the lighthouse',
'composition': 'wide establishing shot, rule of thirds, lighthouse at left third'
}
# Assemble into a prompt string
full_prompt = (
'{subject}, {style}, {medium}, {lighting}, '
'{color_palette}, {composition}'
).format(**prompt_components)
print(full_prompt)
# A lone lighthouse on a rocky coastline, dramatic, moody, cinematic,
# oil painting, stormy overcast sky, waves crashing, dramatic side-lighting,
# desaturated blues and grays with warm amber light from the lighthouse,
# wide establishing shot, rule of thirds, lighthouse at left thirdالموضوع: ما الذي يظهر
الموضوع هو المكوّن الأهم، إذ يخبر النموذج ما الذي ينبغي تصويره. كن محددًا قدر الإمكان، وأدرج النوع والعمر والمشاعر والفعل والبيئة والعلاقات المكانية.
# Subject specificity comparison
# Weak subject:
weak = 'a person in a city'
# Strong subject (same concept, much more specific):
strong = (
'a young woman in her 30s, wearing a vintage 1960s trench coat, '
'standing at a rain-soaked street corner in Tokyo at night, '
'looking up at neon signs reflected in the puddles, '
'holding a dripping umbrella, expression of quiet wonder'
)
# The strong subject answers:
# WHO: young woman, 30s
# WHAT WEARING: 1960s trench coat
# WHERE: Tokyo street corner
# WHEN: night, raining
# WHAT DOING: standing, looking up
# EXPRESSION: quiet wonder
# KEY DETAIL: neon reflections in puddles, dripping umbrella
print('Weak:', weak)
print('Strong:', strong[:100], '...')الأسلوب: الكيفية
تخبر أوصاف الأسلوب النموذج باللغة البصرية والسجل الجمالي للصورة. ويمكن أن تشير إلى حركات فنية أو فنانين محددين أو وسائط بصرية أو خصائص جمالية مجردة.
style_examples = [
# Art movements
'impressionist', 'art nouveau', 'bauhaus', 'minimalist', 'surrealist',
# Artist references
'in the style of Monet', 'reminiscent of Hopper', 'inspired by Klimt',
# Visual media
'film noir', 'vaporwave aesthetic', 'cottagecore', 'brutalist',
# Quality descriptors
'highly detailed', 'cinematic', 'editorial photography style',
'concept art', 'matte painting', 'character design sheet',
# Mood
'ethereal', 'gritty', 'whimsical', 'melancholic', 'vibrant', 'serene'
]
# Combining styles creates unique aesthetics
combined_style = 'cyberpunk aesthetic meets art nouveau, highly detailed, dark ethereal'
print('Combined style:', combined_style)
# Warning: too many style directives create incoherence
too_many = 'impressionist, minimalist, surrealist, photorealistic, anime, baroque'
print('Too many (incoherent):', too_many)الوسيط: الشكل الفني
يحدّد الوسيط الشكل الفني المادي أو الرقمي. وهو يغيّر بصورة جوهرية نسيج الصورة وجودة الخط ودرجاتها اللونية. ومن الوسائط الشائعة وما تنتجه:
medium_guide = {
# Traditional media
'oil painting': 'Rich, textured, classic look with visible brushwork',
'watercolor': 'Soft edges, translucent washes, paper texture visible',
'pencil sketch': 'Line art, cross-hatching, grayscale, raw feel',
'charcoal drawing': 'Soft, smudgy, high contrast, dramatic shadows',
'ink illustration': 'Bold lines, flat colors or crosshatching',
# Photography
'photorealistic': 'Looks like a real photograph',
'film photography': 'Grain, color shift, analog feel',
'macro photography': 'Extreme close-up, shallow depth of field',
'long exposure photography': 'Motion blur, light trails',
# Digital / 3D
'3D render': 'CGI quality, precise geometry',
'octane render': 'Photorealistic 3D with ray-tracing quality',
'Blender 3D': 'CGI aesthetic, often used with subdivision modeling',
'pixel art': 'Retro 8-bit or 16-bit style, visible pixels',
'vector illustration': 'Clean, flat, scalable design style'
}
for medium, description in list(medium_guide.items())[:5]:
print(f'{medium}: {description}')الإضاءة: تشكيل الحالة المزاجية
الإضاءة هي العامل الأقوى منفردًا في تشكيل الحالة المزاجية في الفن البصري. فالموضوع نفسه يبدو مختلفًا تمامًا تحت ضوء الساعة الذهبية مقارنةً بإضاءة غرفة استجواب قاسية. أتقن مفردات الإضاءة.
lighting_vocabulary = {
# Time of day
'golden hour': 'Warm orange-yellow, long shadows, magic hour feel',
'blue hour': 'Cool blue twilight, soft diffused light',
'harsh midday': 'Hard shadows, washed-out, unflattering (usually avoided)',
'overcast': 'Soft even light, no shadows, good for portraits',
# Studio / artificial
'studio lighting': 'Controlled, professional, even illumination',
'Rembrandt lighting': 'Triangle of light on cheek, dramatic portrait technique',
'neon lighting': 'Colorful, urban, cyberpunk feel',
'candlelight': 'Warm, flickering, intimate',
# Dramatic
'chiaroscuro': 'Extreme light/dark contrast, Baroque dramatic style',
'volumetric lighting': 'God rays, light shafts through fog or dust',
'backlit / rim light': 'Subject outlined by light from behind, halo effect',
'bioluminescent': 'Glowing from within, alien or underwater feel'
}
example = 'volumetric lighting, golden hour, warm glow filtering through forest canopy'
print('Lighting example:', example)لوحة الألوان: السجل العاطفي
تتحكم لوحة الألوان في السجل العاطفي والانسجام البصري للصورة. حدّد لوحات الألوان وصفيًا أو بالإشارة إلى حركات فنية أو أفلام أو مظاهر من الطبيعة.
color_palette_examples = [
# Temperature-based
'warm earth tones: rust, ochre, sienna, cream',
'cool blues and silvers, icy palette',
'neutral gray monochrome with single red accent',
# Mood-based
'muted, desaturated, melancholic color grading',
'vibrant saturated colors, tropical energy',
'pastel soft colors, dreamlike softness',
# Reference-based
'Wes Anderson color palette: pastel pinks and greens',
'film noir: high contrast black and white with amber shadows',
'synthwave neon: pink, purple, cyan on dark backgrounds',
# Nature-based
'autumn forest: burnt orange, golden yellow, deep brown',
'arctic palette: white, pale blue, grey with deep navy accents',
]
# Color palettes can clash with lighting — ensure they work together
clash = 'vibrant tropical colors + film noir lighting' # incoherent
harmony = 'warm amber and ochre tones + golden hour lighting' # coherent
print('Harmonious combo:', harmony)التكوين: التأطير والتركيز
تخبر توجيهات التكوين النموذج بكيفية تأطير اللقطة، وما ينبغي تضمينه أو التركيز عليه، ومكان وضع العناصر. ويُعدّ الاستعانة بمفردات التصوير الفوتوغرافي والسينمائي فعّالًا.
composition_vocabulary = {
# Camera distance
'extreme close-up': 'fills frame with a single detail (eye, hand, texture)',
'close-up': 'face or object fills most of frame',
'medium shot': 'waist to head, character-focused',
'wide shot': 'full body in environment context',
'establishing shot': 'landscape/environment, tiny or no character',
'aerial / bird\'s eye view': 'looking straight down',
'worm\'s eye view': 'looking straight up from below',
# Composition rules
'rule of thirds': 'subject at intersection of 1/3 lines',
'centered composition': 'symmetrical, formal, powerful',
'leading lines': 'lines guide eye toward subject',
'negative space': 'large empty area emphasizes subject',
'frame within frame': 'archway, window, or shape frames subject',
# Depth
'shallow depth of field': 'sharp subject, blurred background (bokeh)',
'deep focus': 'everything in sharp focus front to back'
}
print('Composition example: close-up portrait, rule of thirds, shallow depth of field, bokeh background')تجميع الموجّه الكامل
يؤدي تجميع المكونات الستة بترتيب منطقي إلى إنتاج موجّهات صور عالية الجودة باستمرار. ومن الترتيبات الجيدة: الموضوع → الوسيط → الأسلوب → الإضاءة → لوحة الألوان → التكوين.
def build_image_prompt(
subject, medium, style, lighting, color_palette, composition,
quality_boost='highly detailed, 8K resolution'
):
parts = [
subject,
medium,
style,
lighting,
color_palette,
composition,
quality_boost
]
# Filter out None values and join
return ', '.join(p for p in parts if p)
# Example: Portrait
portrait = build_image_prompt(
subject='elderly Japanese fisherman mending nets at sunrise, weathered hands, peaceful expression',
medium='oil painting',
style='impressionist, highly detailed, classical technique',
lighting='golden hour sunrise, warm light from the left, soft shadows',
color_palette='warm ochres, golds, deep navy sea in background',
composition='medium shot, rule of thirds, subject right third, ocean left'
)
print(portrait)التوجيه لتحقيق الاتساق بين الصور
عند إنشاء سلسلة من الصور، مثل أوراق الشخصيات أو لوحات القصة، حافظ على الاتساق باستخدام قالب موجّه أساسي مع استبدال المتغيرات للعناصر التي تتغير بين الصور.
BASE_CHARACTER_TEMPLATE = (
'{character_description}, '
'{action_description}, '
'oil painting, concept art style, '
'dramatic studio lighting, '
'muted jewel tones with gold accents, '
'close-up portrait, centered composition, '
'highly detailed, cinematic'
)
character = (
'a tall warrior woman with dark braided hair, emerald eyes, '
'wearing ornate silver plate armor with dragon motifs'
)
action_variants = [
'standing at attention, stoic expression, arms crossed',
'battle-ready, sword raised, fierce expression, mid-action',
'resting against a stone wall, exhausted but resolute, soft smile',
'close-up portrait, neutral expression, slight three-quarter view'
]
for action in action_variants:
prompt = BASE_CHARACTER_TEMPLATE.format(
character_description=character,
action_description=action
)
print(f'Generating: {action[:40]}...')
# call image API with promptرموز الجودة
تستجيب معظم نماذج الصور إلى رموز الجودة، وهي مصطلحات تشير إلى مستوى الدقة المطلوب في المخرجات. استخدمها بذكاء لرفع مستوى التفاصيل من دون تغيير الموضوع أو الأسلوب.
quality_tokens = {
'high_detail': [
'highly detailed', 'intricate detail', 'ultra-detailed',
'8K resolution', '4K wallpaper quality'
],
'photorealism': [
'photorealistic', 'hyperrealistic', 'photographed by',
'DSLR photo', 'shot on 35mm film'
],
'professional_quality': [
'award-winning', 'professional photography', 'editorial quality',
'museum quality', 'masterpiece'
],
'rendering_quality': [
'octane render', 'unreal engine 5', 'ray tracing',
'subsurface scattering', 'global illumination'
]
}
# Best practice: add 2-3 quality tokens at the end of the prompt
quality_suffix = 'highly detailed, cinematic, 8K resolution'
print('Add to end of any prompt:', quality_suffix)
# Warning: do not overload with quality tokens — they dilute each other
too_many_quality = 'masterpiece, best quality, ultra-detailed, perfect, amazing, award-winning'
print('Over-specified (less effective):', too_many_quality[:60])تحقق سريع
أي مكوّن في موجّه إنشاء الصور يتحكم بصورة مباشرة أكبر في الحالة المزاجية العاطفية للصورة؟
ملخص بنية موجّه الصور
يتألف موجّه الصور المُحكم من ستة مكونات تعمل بانسجام:
- الموضوع: مَن وماذا — المكوّن الأهم؛ كن محددًا للغاية
- الأسلوب: السجل الجمالي أو الحركة الفنية أو الإشارة إلى فنان
- الوسيط: الشكل الفني، مثل الرسم الزيتي أو الواقعية الفوتوغرافية أو التصيير ثلاثي الأبعاد أو فن البكسل
- الإضاءة: إنارة تشكّل الأجواء، مثل الساعة الذهبية أو كياروسكورو أو النيون
- لوحة الألوان: الحرارة العاطفية، مثل الألوان الترابية الدافئة أو الألوان الباردة منخفضة التشبع أو النيون
- التكوين: التأطير، مثل اللقطة القريبة أو قاعدة الأثلاث أو اللقطة التأسيسية
أضف رمزي جودة أو ثلاثة في النهاية. استخدم القوالب للحفاظ على الاتساق في سلاسل الصور المتعددة.
الأسئلة الشائعة
هل درس «تشريح مطالبة إنشاء الصور» مجاني؟
نعم — نص درس «تشريح مطالبة إنشاء الصور» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة AI Prompt Engineering، انتقل إلى CoddyKit PRO. تتضمن دورة AI Prompt Engineering 4 دروس في المجموع.
ماذا ستتعلم في «تشريح مطالبة إنشاء الصور»؟
العنصر، والأسلوب، والوسيط، والإضاءة، ولوحة الألوان، وعناصر التكوين تتمرن على AI Prompt Engineering مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ AI Prompt Engineering؟
لا تُشترط خبرة سابقة. AI Prompt Engineering على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.
كم من الوقت يستغرق درس «تشريح مطالبة إنشاء الصور»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس AI Prompt Engineering هذا؟
نعم. كل درس في AI Prompt Engineering يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- تشريح مطالبة إنشاء الصور
- تحديد الأسلوب والوسيط الفني
- المطالبات السلبية والاستبعادات
- تحسين مطالبات الصور تكراريًا