วิธีเขียน Prompt สร้างภาพให้สวย
สวัสดีค่ะที่รัก! หลายคนบอกว่าเขียน Prompt ยังไงก็ไม่ได้ภาพที่ต้องการ วันนี้จะมาสอนหลักการเขียน Prompt สร้างภาพที่ได้ผลจริงๆ กันค่ะ
ทำไม Prompt ถึงสำคัญ?
Prompt คือ "คำสั่ง" ที่บอก AI ว่าเราต้องการภาพแบบไหน ยิ่งเขียน Prompt ดี AI ก็ยิ่งเข้าใจและสร้างภาพได้ตรงใจค่ะ
ความแตกต่างระหว่าง Prompt ดี vs ไม่ดี
Prompt ไม่ดี:
"แมวน่ารัก"
Prompt ดี:
"A cute orange tabby cat sitting on a windowsill, soft afternoon sunlight, cozy atmosphere, photorealistic style, warm colors, shallow depth of field"
เห็นความต่างไหมคะ? Prompt ที่ดีบอกรายละเอียดชัดเจนกว่ามาก!
โครงสร้างพื้นฐานของ Prompt
Formula ที่แนะนำ
[Subject] + [Action/Pose] + [Setting/Background] + [Style] + [Lighting] + [Camera/Composition] + [Quality Keywords]
อธิบายแต่ละส่วน
1. Subject (ตัวแบบ)
บอกว่าอะไรเป็น main subject ของภาพ
ตัวอย่าง:
- "A young woman with long black hair"
- "An ancient oak tree"
- "A steaming cup of coffee"
- "A golden retriever puppy"
เคล็ดลับ: ยิ่งบรรยายละเอียด ยิ่งได้ผลลัพธ์ตรงใจ
2. Action/Pose (ท่าทาง/การกระทำ)
บอกว่า subject กำลังทำอะไร
ตัวอย่าง:
- "sitting on a park bench"
- "running through a field"
- "looking at the camera with a smile"
- "holding an umbrella"
3. Setting/Background (ฉากหลัง)
บอกว่า subject อยู่ที่ไหน
ตัวอย่าง:
- "in a cozy coffee shop"
- "on a mountain top at sunrise"
- "in a futuristic city"
- "in a flower garden"
4. Style (สไตล์ภาพ)
บอกว่าต้องการภาพแบบไหน
ตัวอย่าง:
- "photorealistic"
- "oil painting style"
- "anime style"
- "watercolor illustration"
- "3D render"
- "vintage photograph"
5. Lighting (แสง)
แสงมีผลมากต่ออารมณ์ของภาพ
ตัวอย่าง:
- "golden hour lighting"
- "dramatic studio lighting"
- "soft diffused light"
- "neon lights"
- "candlelight"
- "backlit silhouette"
6. Camera/Composition (มุมกล้อง)
บอกมุมมองและการจัดองค์ประกอบ
ตัวอย่าง:
- "close-up portrait"
- "wide angle shot"
- "bird's eye view"
- "low angle"
- "rule of thirds"
- "shallow depth of field"
7. Quality Keywords (คำเพิ่มคุณภาพ)
คำที่ช่วยให้ภาพมีคุณภาพสูงขึ้น
ตัวอย่าง:
- "highly detailed"
- "8k resolution"
- "professional photography"
- "masterpiece"
- "award-winning"
- "sharp focus"
ตัวอย่าง Prompt แบบเต็ม
ตัวอย่างที่ 1: Portrait Photo
A young Asian woman with long flowing black hair, wearing a white linen dress, standing in a lavender field at golden hour, soft warm sunlight, photorealistic style, shallow depth of field, Canon EOS R5, 85mm lens, professional portrait photography, highly detailed, 8k
ตัวอย่างที่ 2: Fantasy Art
An ancient dragon perched on a cliff overlooking a medieval kingdom, massive wings spread wide, scales shimmering with iridescent colors, dramatic sunset sky with purple and orange clouds, epic fantasy art style, cinematic lighting, highly detailed, trending on ArtStation
ตัวอย่างที่ 3: Product Photo
A sleek modern smartphone floating in mid-air, minimalist white background, soft studio lighting with subtle reflections, product photography style, clean and professional, 3D render, photorealistic, high-end advertising aesthetic
ตัวอย่างที่ 4: Interior Design
A cozy Scandinavian living room with large windows, natural wood furniture, soft beige and white color palette, indoor plants, morning sunlight streaming in, architectural photography style, wide angle lens, warm and inviting atmosphere, interior design magazine quality
เทคนิคขั้นสูง
1. การใช้ Weighted Terms
บางเครื่องมือรองรับการให้น้ำหนักคำ:
Midjourney:
beautiful sunset::2 over the ocean::1
(sunset มีน้ำหนัก 2 เท่าของ ocean)
Stable Diffusion:
(beautiful sunset:1.5) over the ocean
2. การใช้ Negative Prompt
บอกสิ่งที่ไม่ต้องการ:
Negative: blurry, low quality, distorted, deformed hands, extra fingers, ugly, bad anatomy
3. การ Reference Style
อ้างอิงสไตล์:
- "in the style of Studio Ghibli"
- "Pixar 3D animation style"
- "Art Deco poster design"
- "Japanese ink painting style"
4. การใช้ Aspect Ratio
กำหนดสัดส่วนภาพ:
--ar 16:9(Landscape/วิดีโอ)--ar 9:16(Portrait/มือถือ)--ar 1:1(Square/Instagram)--ar 4:3(Classic)
คำที่ควรรู้
คำเกี่ยวกับคุณภาพ
| คำ | ความหมาย |
|---|---|
| highly detailed | รายละเอียดสูง |
| photorealistic | สมจริงเหมือนภาพถ่าย |
| 4k/8k | ความละเอียดสูง |
| sharp focus | โฟกัสคม |
| masterpiece | ชิ้นเอก |
คำเกี่ยวกับแสง
| คำ | ความหมาย |
|---|---|
| golden hour | ช่วงแสงทองตอนเย็น |
| blue hour | ช่วงแสงฟ้าตอนพลบค่ำ |
| rim light | แสงขอบ |
| volumetric lighting | แสงที่เห็นเป็นลำ |
| soft light | แสงนุ่ม |
คำเกี่ยวกับมุมกล้อง
| คำ | ความหมาย |
|---|---|
| close-up | ถ่ายใกล้ |
| wide shot | ถ่ายกว้าง |
| bird's eye view | มุมสูง |
| worm's eye view | มุมต่ำ |
| Dutch angle | เอียง |
ข้อผิดพลาดที่ควรหลีกเลี่ยง
1. Prompt สั้นเกินไป
❌ "a cat" ✅ "a fluffy Persian cat sleeping on a velvet cushion, soft window light, cozy atmosphere"
2. ขัดแย้งกันเอง
❌ "a bright dark room" (สว่างและมืดพร้อมกัน?) ✅ "a dimly lit room with a single bright lamp"
3. ใช้คำที่ AI ไม่เข้าใจ
❌ คำสแลง คำเฉพาะที่ไม่แพร่หลาย ✅ ใช้คำภาษาอังกฤษที่ชัดเจน
4. ใส่รายละเอียดมากเกินไป
❌ prompt ยาว 500 คำ ✅ จับประเด็นสำคัญ 50-150 คำ
แบบฝึกหัด: ลองเขียน Prompt
ลองเขียน Prompt สำหรับสถานการณ์เหล่านี้:
- ภาพ Profile LinkedIn - ต้องการภาพดูเป็นมืออาชีพ
- ภาพขายเสื้อผ้า - ต้องการภาพสินค้าที่น่าสนใจ
- ภาพหน้าปก Blog - ต้องการภาพเกี่ยวกับ technology
ตัวอย่างคำตอบ
1. LinkedIn Profile:
Professional headshot of a confident business person, wearing a navy blue blazer, neutral gray background, soft studio lighting, friendly smile, sharp focus, corporate photography style, high quality
2. เสื้อผ้า:
A stylish summer dress on an invisible mannequin, clean white background, professional product photography, soft even lighting, fabric texture visible, e-commerce style, high resolution
3. หน้าปก Blog Technology:
Abstract technology background with flowing blue digital particles and circuits, modern futuristic design, dark background with glowing elements, tech blog header style, wide aspect ratio, clean and minimalist
สรุป
การเขียน Prompt ที่ดีต้อง:
- บอก Subject ชัดเจน - อะไรเป็นตัวหลัก
- อธิบาย Setting - อยู่ที่ไหน บรรยากาศแบบไหน
- ระบุ Style - ต้องการภาพแบบไหน
- ใส่รายละเอียดแสง - แสงมีผลมากต่ออารมณ์
- เพิ่ม Quality Keywords - ช่วยให้ภาพคุณภาพดีขึ้น
ลองฝึกบ่อยๆ แล้วจะเก่งขึ้นเรื่อยๆ นะคะ!
อยากเขียน Prompt เก่งขึ้น?
เรามี คอร์ส AI ที่สอนการเขียน Prompt อย่างละเอียด พร้อม workshop ฝึกปฏิบัติจริง ทั้งออนไลน์และ สอน AI เชียงใหม่ แบบ on-site ดูรายละเอียดที่ หน้าคอร์สเรียน นะคะที่รัก!
เขียนโดย
AI Unlocked Team
บทความอื่นๆ ที่น่าสนใจ
วิธีติดตั้ง FFmpeg บน Windows และ Mac: คู่มือฉบับสมบูรณ์
เรียนรู้วิธีติดตั้ง FFmpeg บน Windows และ macOS พร้อมการตั้งค่า PATH อย่างละเอียด เพื่อใช้งานโปรแกรมตัดต่อวิดีโอและเสียงระดับมืออาชีพ
สรุป: เส้นทางการเรียนรู้ AI สำหรับคนไทย ฉบับสมบูรณ์
สรุปทุกสิ่งที่คนไทยต้องรู้เกี่ยวกับการเรียน AI ตั้งแต่เริ่มต้นจนถึงการหางานและพัฒนาอาชีพ รวมทุก resources และ tips ในที่เดียว
อนาคตของ AI ในอีก 5 ปี: แนวโน้มและการเปลี่ยนแปลงที่จะเกิดขึ้น
วิเคราะห์อนาคตของ AI ในช่วง 5 ปีข้างหน้า ทั้งด้านเทคโนโลยี การทำงาน ธุรกิจ และสังคม พร้อมวิธีเตรียมตัวรับมือ