แล็บ: ส่งออก GLB และนำเข้า Twin
วิดีโอประกอบ
ดูบน YouTube (เปิดในแท็บใหม่)
-
BS-02: Install BitStream Studio ผศ.ดร.สันติ นุราช (KMUTT)
วิดีโอโดย ผศ.ดร.สันติ นุราช ภาควิชาวิศวกรรมระบบควบคุมและเครื่องมือวัด คณะวิศวกรรมศาสตร์ มหาวิทยาลัยเทคโนโลยีพระจอมเกล้าธนบุรี (KMUTT) · ดูทั้งชุดใน playlist AIoT Foundation
Course 3 · Module 4
Type: Hands-on (prepare · export · import · mark points · test)
Suggested time: ~2.5–3 ชั่วโมง
Read first: Lesson · Export checklist · ← TOC · ← M03 · M05 →
Keep these tabs open
หัวข้อที่มีชื่อว่า “Keep these tabs open”| Document | Why |
|---|---|
| glTF 2.0 exporter | export options |
| glTF Animations | stash / names |
| Bitstream Studio | Twin host |
| Hackathon web-app | optional ex05 / ex06 |
Lab Goals
หัวข้อที่มีชื่อว่า “Lab Goals”- ได้ไฟล์
.glbจากโมเดล M02/M03 - นำเข้า Bitstream Studio แล้วขนาด/แนวแกนใช้งานได้
- กำหนดจุด sensor หรือ interaction อย่างน้อย 1 จุดพร้อมชื่อ
- ทดสอบอย่างน้อย: วางโมเดล + (คลิปแอนิเมชัน หรือ telemetry)
- กรอก export-twin-checklist.md
Prerequisites
หัวข้อที่มีชื่อว่า “Prerequisites”- ไฟล์จาก M03 (หรือ M02 ถ้ายังไม่มีคลิป — แจ้งใน checklist)
- Bitstream Studio พร้อมใช้
- คัดลอกงานเป็น
m04_enclosure_twin.blendก่อน export
Lab A — Prepare for export (required)
หัวข้อที่มีชื่อว่า “Lab A — Prepare for export (required)”- Apply Scale บนชิ้นที่จะส่ง
- ตรวจชื่อ object และชื่อคลิป (
lid_openฯลฯ) - ถ้ามีหลาย Action: Stash ลง NLA ตาม คู่มือ glTF
- ซ่อน/ลบ cutter และของที่ไม่ต้องการส่ง
- Save
.blend
Pass when: เล่นคลิปใน Blender ยังถูก และ Scale เป็น 1,1,1
Lab B — Export .glb (required)
หัวข้อที่มีชื่อว่า “Lab B — Export .glb (required)”File → Export → glTF 2.0- เลือก glTF Binary (.glb)
- เปิด Apply Modifiers · Materials · Animations (ถ้ามี)
- Export เป็น
enclosure_twin.glb - จดตัวเลือก export ใน checklist
Pass when: มีไฟล์ .glb และขนาดไม่เป็น 0 byte
Lab C — Import into Twin host (required)
หัวข้อที่มีชื่อว่า “Lab C — Import into Twin host (required)”- เปิด Bitstream Studio
- นำเข้า
enclosure_twin.glbตาม UI ของเวอร์ชันที่ใช้ - ตรวจ: มองเห็น · สเกลใช้ได้ · แนวแกนวางบนพื้นได้
- ถ้ามีคลิป — เล่น
lid_open(หรือชื่อที่ส่งออก) - แคปหน้าจอ
Pass when: สกรีนช็อตแสดงโมเดลใน host และ checklist ติ๊ก Import OK
Lab D — Mark sensor / interaction point (required)
หัวข้อที่มีชื่อว่า “Lab D — Mark sensor / interaction point (required)”- เลือกอย่างน้อย 1 จุด (เช่น
sensor_bmi270_slotหรือinteract_lid) - บันทึก: ชื่อ · อยู่ตรงไหนบนกลอง · ผูกกับอะไร (เซ็นเซอร์ / คลิป / LED)
- แคปหรือวาดประกอบใน checklist
Pass when: คนอื่นในทีมอ่านชื่อแล้วชี้จุดบนโมเดลถูก
Lab E — Data or motion test (recommended — part of the complete deliverable)
หัวข้อที่มีชื่อว่า “Lab E — Data or motion test (recommended — part of the complete deliverable)”เลือกอย่างน้อยหนึ่ง:
| Option | What to do |
|---|---|
| E1 — Clip | เล่นแอนิเมชันใน Twin ให้ครบรอบเปิด (และปิดถ้ามี) |
| E2 — Telemetry | Link Simulator หรือ Board แล้วให้มีสตรีมขณะโมเดลอยู่บนจอ |
| E3 — Web-app | เปิด Hackathon ex05 หรือ ex06 คู่กับ Twin แล้วแคปคู่ |
Pass when: มีหลักฐานไฟล์ภาพ/คลิปในโฟลเดอร์ผลงาน
Lab F — Optional
หัวข้อที่มีชื่อว่า “Lab F — Optional”- เทียบสเกลกับ GLB จาก ternion-3d-assets-free
- Re-import
.glbกลับ Blender เพื่อยืนยันคลิปไม่หาย - ลด poly แล้ว export รอบสอง เปรียบเทียบขนาดไฟล์
Deliverables checklist
หัวข้อที่มีชื่อว่า “Deliverables checklist”-
enclosure_twin.glb(+.blendต้นทาง) - สกรีนช็อตใน Bitstream Studio
- จุด sensor/interaction ≥ 1
- ผลทดสอบ Lab E
- export-twin-checklist.md กรอกครบ
Troubleshooting
หัวข้อที่มีชื่อว่า “Troubleshooting”| Symptom | What to try |
|---|---|
| โมเดลยักษ์หรือจิ๋วใน Twin | ตรวจ Unit Scale ทีม · Apply Scale · export ใหม่ — อย่าแก้แค่ซูมแล้วจบ |
| ไม่มีแอนิเมชันใน GLB | Stash Action · เปิด Animations ตอน export · ตรวจชื่อคลิป |
| วัสดุดำ/หาย | ใช้ Principled · ตรวจ Materials ใน export · ไฟใน Twin |
| Boolean ดูไม่ถูกหลัง export | เปิด Apply Modifiers |
| Import ไม่ขึ้น | ตรวจนามสกุล .glb · ลองโมเดลตัวอย่างจาก free assets เพื่อแยกว่าพังที่ไฟล์หรือที่ host |
| Telemetry ไม่เกี่ยวกับโมเดล | คนละท่อ — โมเดลเป็นภาพ; ใช้ ex05/ex06 เป็นหลักฐานข้อมูล |
Lesson · Export checklist · TOC · M05 →
อ้างอิงบทเรียนนี้
ถ้านำบทเรียนนี้ไปสอน ทำสไลด์ หรือทำเอกสารต่อ ให้อ้างอิงด้วยข้อความนี้ ถ้าดัดแปลงเนื้อหา ให้เติม (ดัดแปลง)ต่อท้ายชื่อบทเรียน
"แล็บ: ส่งออก GLB และนำเข้า Twin" จาก TESA Open Knowledge โดยสมาคมสมองกลฝังตัวไทย (Thai Embedded Systems Association: TESA) https://github.com/tesaiot/tesa-qualification-program สัญญาอนุญาต CC BY-NC 4.0
ข้อความอ้างอิงภาษาอังกฤษ: "Lab: Export GLB and Import to Twin" from TESA Open Knowledge by the Thai Embedded Systems Association (TESA), https://github.com/tesaiot/tesa-qualification-program, licensed under CC BY-NC 4.0
ลิงก์บทเรียน: https://tesaiot.github.io/tesa-qualification-program/courses/product-design/m04-blender-to-twin/l02-lab/
บทเรียนนี้ดัดแปลงจากต้นฉบับด้านล่าง เมื่ออ้างอิงให้คงเครดิตต้นฉบับไว้ด้วย
https://github.com/drsanti/TESAIoT-Courses/blob/287c21814ba8c75f693136616dcd270349a15966/C3/M04/lab.md · Original content by Asst. Prof. Dr. Santi Nuratch (ผศ.ดร.สันติ นุราช), KMUTT. Course 3 (C3/) of drsanti/TESAIoT-Courses. TESA funded the work and holds the rights; published here under CC BY-NC 4.0. The upstream repository carries no licence file. Text kept faithful; structure, front matter, quizzes and notes added by TESA Open Knowledge.
TESA Open Knowledge · © 2026 สมาคมสมองกลฝังตัวไทย (TESA) · CC BY-NC 4.0
เนื้อหาเผยแพร่ภายใต้ CC BY-NC 4.0 นำไปใช้ต่อในงานที่ไม่ใช่เพื่อการค้าได้ โปรดอ้างอิงสมาคมสมองกลฝังตัวไทย (TESA) ทุกครั้ง · วิธีอ้างอิง TESA