AI Game Dev & Open Sourceอ่าน ~5 นาที4 วิว

เจาะลึก ChatGPT Pixel Effects (MIT): เปลี่ยน GIF จาก ChatGPT เป็น Pixel Art VFX Sprite Sheet ใช้งานจริงใน Godot 4.7 ครบ 4 ขั้นตอน พร้อมสคริปต์ Python & 5 เอฟเฟกต์ฟรี! (2026)

คู่มือและรีวิวโปรเจกต์ Open-Source kasperzackgames/chatgpt-pixel-effects (MIT License) ที่เปลี่ยน GIF ระเบิด, ลำแสง, สายฟ้า, เสาไฟ และภูเขาไฟจาก ChatGPT 1 Prompt ให้กลายเป็น Sprite Sheet พิกเซลคมกริบพร้อม Aseprite JSON, แก้ปัญหาขอบชมพู/กริดเพี้ยน/ภาพสั่นด้วย Python (unfake 1.0.7), ทำ Background Relighting ไม่ให้ดูแปะลอย และนำเข้าฉาก Godot 4.7 พร้อม Camera Shake & Impact Flash

K
อาจารย์ Kevin (AI Agent & Prompt Architect)Founder & Lead AI System Architect · Kevin AI Academy
Kevin AI Academy
Step by Step
ChatGPT Pixel Effects (M
ChatGPT
จากไอเดีย → ChatGPT Pixel Effects → Pixel Art VFX
kevinaiagent.tech
เจาะลึก ChatGPT Pixel Effects (MIT): เปลี่ยน GIF จาก ChatGPT เป็น Pixel Art VFX Sprite Sheet ใช้งานจริงใน Godot 4.7 ครบ 4 ขั้นตอน พร้อมสคริปต์ Python & 5 เอฟเฟกต์ฟรี! (2026)
1ChatGPT Pixel Effects2Pixel Art VFX3Godot 4.74Sprite Sheet

Executive Direct Technical Insights: kasperzackgames/chatgpt-pixel-effects

MIT License • ChatGPT GIF → Python Cleanup (unfake) → AI Relighting → Godot 4.7

นักพัฒนาเกม 2D สาย Pixel Art ทุกคนรู้ดีว่าแอนิเมชันเอฟเฟกต์ (VFX) อย่างระเบิด ลำแสง หรือสายฟ้า ใช้เวลาวาดทีละเฟรมนานมาก — และถึงแม้จะสั่ง ChatGPT เจน GIF ให้ได้ แต่ไฟล์ดิบมักมีปัญหา "พิกเซลไม่ตรงกริด, สีเกิน 250 สี, ควันติดสีชมพูจากฉากหลัง, เฟรมสั่น และวางลงฉากแล้วดูแปะลอย" โปรเจกต์ chatgpt-pixel-effects (MIT License) แก้ครบทั้ง 7 ปัญหาด้วย 4 ขั้นตอนจบในไม่กี่นาที พร้อมแจก 5 เอฟเฟกต์สำเร็จรูป (explosion, beam, eruption, fire-pillar, lightning) และโปรเจกต์ Godot 4.7 ที่กด F5 เล่นได้ทันที!

4 Steps
แก้ครบ 7 ปัญหา AI Pixel
5 VFX
ระเบิด • ลำแสง • สายฟ้า • ไฟ
26 Colors
บีบจาก 253 สี → พาเลตเดียว
Godot 4.7
MIT • พร้อม Flash & Shake
Pixel art stick figure fight demo with ChatGPT GIF effects in Godot 4.7
ภาพเคลื่อนไหวจริงจากโปรเจกต์ (MIT): เอฟเฟกต์หลักทั้งหมดในฉากต่อสู้นี้ — ลำแสงปะทะกัน (1 GIF กลับด้านและเปลี่ยนสี), สายฟ้าฟาด, แรงระเบิดเห็ด และภูเขาไฟปะทุ — เกิดจาก ChatGPT GIF อย่างละ 1 Prompt แล้วผ่านสคริปต์ Cleanup + Background Relighting ใน Godot 4.7

1. เจาะลึก 4 ขั้นตอนเปลี่ยน ChatGPT GIF เป็น Game-Ready Pixel Art VFX

ขั้นตอนที่ 1: สั่ง ChatGPT สร้าง Animated GIF (แก้ปัญหาที่ 1–4 ตั้งแต่ใน Prompt)

ใช้ Prompt ต้นฉบับจาก PROMPT.md เพื่อบังคับสเปกเกม 2D ชัดเจน: 16 เฟรม @ 80ms, กล้องนิ่งสนิท, ยึดจุดฐานล่างตรงกลางทุกเฟรม, จำกัดพาเลต ~20 สี และพื้นหลังสีชมพูสด #FF00FF (สำหรับเอฟเฟกต์สีม่วงอย่างสายฟ้าหรือเวทมนตร์ ให้เปลี่ยนเป็นสีเขียว #00FF00 แล้วคลีนด้วย --key green):

Make an animated GIF of a pixel-art explosion for a 2D side-view game, rendered as large as you can (at least 512x512). 16 frames, about 80 ms per frame. Use fine pixel art: each art pixel is only 2 to 3 image pixels wide, so the explosion has a lot of detail (about 120 art pixels tall at its peak). The camera does not move. The bottom edge of the frame is the ground line, and the explosion hits the ground at the bottom centre, at the same point in every frame. Don't draw the ground itself. Sequence: a tiny spark on the ground; one bright white flash frame; a huge orange and yellow fireball that grows until it fills about three quarters of the frame height and rises into a mushroom cloud with a fiery stem; debris chunks and sparks flying out in arcs; a thin dust ring rolling sideways along the ground; the fire breaks up into a light grey smoke column that rises and drifts; glowing embers fade out until the frame is empty. True pixel art: crisp pixels on one even grid, hard edges, no anti-aliasing, no blur, no soft gradients, a limited palette of about 20 colours (white, yellows, oranges, reds, dark reds and four neutral greys for the smoke). Background: flat solid pure magenta #FF00FF in every frame, nothing else. No text, no borders.

ขั้นตอนที่ 2: รันสคริปต์ Python clean_gif.py (สร้าง Sprite Sheet + Aseprite JSON)

สคริปต์ใช้ unfake 1.0.7 + numpy + Pillow + OpenCV ทำ Content-Adaptive Downscale ย่อพิกเซลที่เพี้ยน (2.5–4 px) ให้ลงกริดเป๊ะ 122×116, บีบพาเลตจาก 253 สีเหลือ 26 สี, ล้างสีชมพูที่ติดมากับควันสีเทา (--neutral-greys), ลบขอบ Fringe 102 พิกเซล และปักหมุด Anchor ฐานล่างไม่ให้เฟรมสั่น:

git clone https://github.com/kasperzackgames/chatgpt-pixel-effects.git
cd chatgpt-pixel-effects
python3 -m venv .venv && source .venv/bin/activate
python -m pip install -r requirements.txt

python scripts/clean_gif.py example/explosion.gif   --name explosion --mode adaptive --cell 2.6 --impact 1 --scale 1   --neutral-greys --grey-chroma 0.05 --colors 20 --out-dir out

ผลลัพธ์ใน out/explosion/ จะได้ครบทั้ง explosion_sheet.png (16 เฟรมเรียงแถวเดียว), explosion_sheet.json (สไตล์ Aseprite พร้อม meta.anchor และแท็ก anticipation / impact / fireball / smoke), explosion_contact.png และ explosion_palette.hex

ขั้นตอนที่ 3: ทำ Background Relighting (แก้ปัญหาที่ 6 — เอฟเฟกต์ดูแปะลอย)

แทนที่จะแปะวงแสง Glow ทับฉากแบบทื่อๆ โปรเจกต์นี้ใช้เทคนิคฉลาดมาก: รัน make_marked_input.py เพื่อแต้มจุดสีส้มตรงตำแหน่งระเบิดบนฉากหลัง (ขยาย x5) แล้วส่งให้ Image AI วาด "ฉากหลังเดิมเป๊ะทุกพิกเซลแต่โดนแสงไฟสีส้ม-เหลืองสาดกระทบพื้นและหน้าผาใกล้จุดระเบิด" จากนั้นคัดเก็บเฉพาะพิกเซลที่อุ่นขึ้นเพื่อ Blend เข้าฉากจริงตอนระเบิด!

python scripts/make_marked_input.py godot/backgrounds/canyon.png 196 154 out/lit/marked_x5.png

ขั้นตอนที่ 4: เปิดฉาก Godot 4.7 (เพิ่ม Impact Flash, Camera Shake & เศษหิน)

เปิด Godot 4.7 → กด Import เลือกไฟล์ godot/project.godot → กด F5 แล้วกด Space หรือคลิกเพื่อจุดระเบิด ฉากจะซิงก์ White Impact Flash, Screen Shake, Debris และ Background Relight Blend ให้ตรงกับเฟรม --impact 1 โดยอัตโนมัติ

🎮 สายพัฒนาเกมอินดี้ & Godot 4 ห้ามพลาด!

โหลดสคริปต์และ 5 เอฟเฟกต์ฟรีจาก GitHub หรือดูคลัง 370 สไตล์สร้างเกม AI + Godot/Blender MCP ในหน้า Game Dev Studio

แท็กที่เกี่ยวข้อง:#ChatGPT Pixel Effects#Pixel Art VFX#Godot 4.7#Sprite Sheet#Indie Game Dev#Python#Open Source#MIT License
SHARE THIS ARTICLE

แชร์บทความนี้ต่อให้เพื่อนหรือทีมของคุณ

เลือกส่งต่อผ่าน Facebook, LINE, X (Twitter), WhatsApp, Email หรือคัดลอกลิงก์ได้ทันที

สนใจเรียนรู้เทคนิค AI เจาะลึกกับ อ. Kevin แบบจับมือทำ?

เลือกลงทะเบียนคลาสเรียน AI Content, Agentic AI Foundation หรือ Private 1-on-1 เพื่อนำไปใช้กับงานจริงของคุณทันที

ดูรอบและจองคลาสเรียน ↗