Open/Close Animation and Interference Checks
Course 3 · Module 3 Suggested time: about 3 hours — build open–close animation for the parts, check for collisions, and name clips ready for the Twin Format: a hands-on lesson — read it and follow along directly in Blender; exporting GLB to the Twin is in M04
Lab · Clip list · ← Table of Contents · ← M02 · M04 →
Objectives (Learning Outcomes)
Section titled “Objectives (Learning Outcomes)”By the end of this lesson you should be able to:
- Build animation to open–close a part, or to reveal the internal structure
- Simulate motion to assess usability (no parts pass through each other)
- Build a set of motion sequences (named clips / actions) for the Twin or teaching material
Key phrase Animation in M03 is a mechanism-checking tool, not just something to make it look nice — if the lid opens and clips through the base, the design is not yet ready to print.
How this differs from Course 2 M03
Section titled “How this differs from Course 2 M03”| Course | M03 focus |
|---|---|
| Course 2 M03 | Virtual Device · sensor script · event simulation |
| Course 3 M03 (this module) | Animating the product in Blender (opening the lid / rotating a part / short clips) |
Read alongside this chapter
Section titled “Read alongside this chapter”| Document | Use when |
|---|---|
| M02 — Modeling, Materials, Render | You need Enclosure_lid / Enclosure_base already split |
| Insert / edit keyframes | Press I to insert a keyframe |
| Timeline | Play / scrub frames / Auto Key |
| Actions | Storing animation as a named Action |
| Dope Sheet | Organising keyframes for the whole clip |
| Graph Editor | Smoothing the motion (optional) |
| Set Origin | The lid’s pivot point (the hinge) |
| Parenting | (Optional) attaching a part to the lid |
| glTF Animations | Preparing clip names for export in M04 |
| Blender Fundamentals — Animation | Official video (choose the Animation chapter) |
| INC111-2021 (Thai) | Thai-language tutorial |
| Clip list worksheet | Recording clip names, length, and rotation axis |
1. Why Animate the Product?
Section titled “1. Why Animate the Product?”Animation in enclosure work answers questions a still image cannot fully answer:
| Question | What motion shows |
|---|---|
| Does opening the lid collide with a hand or a cable? | The lid’s rotation path |
| Does the internal space fit the PCB / battery? | Opening the lid reveals the empty space |
| How does the user understand the way to open it? | A short clip for teaching material |
| What states can the Twin play? | The clip’s name, such as lid_open |
At this early stage of the course, mainly use Location / Rotation keyframes. Save an Armature (bones) for when the mechanism is genuinely complex — for most cases, a lid box rotating around its back edge is enough.
2. Prepare the Lid Pivot (Do This Before Keyframes)
Section titled “2. Prepare the Lid Pivot (Do This Before Keyframes)”From M02, you should already have separate objects, such as Enclosure_lid and Enclosure_base.
2.1 Place the origin at the hinge
Section titled “2.1 Place the origin at the hinge”The lid’s Origin point = the pivot point (Set Origin)
Recommended steps:
- Select
Enclosure_lid - Enter Edit Mode · select the edge or point you want as the hinge (usually the inner back edge)
Shift+S→ Cursor to Selected- Object Mode →
Object → Set Origin → Origin to 3D Cursor - Move the Cursor back to the World Origin if you want (
Shift+S→ Cursor to World Origin)
Test it: press R and rotate around the correct axis (usually X or Y, depending on how the model is oriented) — the lid should open like a hinge, not float away as a whole block.
2.2 Apply Rotation and Scale
Section titled “2.2 Apply Rotation and Scale”Before inserting keyframes:
Ctrl+A→ Rotation & Scale on the lid (and the base if needed)- Read Apply
If Rotation in the Item panel is not zero even though the lid looks straight, it can be confusing when setting keys — Apply makes the starting values easy to read.
3. Keyframe Workflow — Lid Open / Close
Section titled “3. Keyframe Workflow — Lid Open / Close”Reference the official examples in Editing Keyframes and control timing with the Timeline
3.1 Set frame rate and range
Section titled “3.1 Set frame rate and range”| Setting | Lab default | Where |
|---|---|---|
| Frame rate | 24 fps or 30 fps (same across the team) | Output Properties |
| Clip length | 1–3 seconds per clip | e.g. 24–72 frames at 24 fps |
| Scene End | Long enough to play the clip | Timeline Start/End |
Example: a lid_open clip at 24 fps, 1.5 seconds long ≈ frame 1 → 36
3.2 Insert keys (closed → open)
Section titled “3.2 Insert keys (closed → open)”- Go to frame 1 (lid closed)
- Select
Enclosure_lid - Press
I→ choose Rotation (or LocRot if it needs to move too) - Go to the clip’s end frame (e.g. 36)
- Rotate the lid open to the real working angle (e.g. 90° or 110°)
- Press
I→ Rotation again - Press Space (or the Play button in the Timeline) to play it back
If you want Blender to insert keys automatically while you rotate: turn on Auto Key in the Timeline (Timeline) — remember that once it is on, every movement gets a key.
3.3 Optional second clip — close
Section titled “3.3 Optional second clip — close”Build a separate close clip, or continue into the next frame range:
- Frame 36 = open
- Frame 72 = closed (copy the rotation value from frame 1)
For the Twin, it is usually clearer to name these separately: lid_open and lid_close.
3.4 Name the Action
Section titled “3.4 Name the Action”Animation in Blender is stored in an Action (Actions)
- Open the Dope Sheet → Action mode (or the Action panel in the Animation workspace)
- Give the Action a short English name, such as
lid_open - Avoid empty names / duplicate names / Thai names in clip files that will be sent to the Twin
Good names:
| Good name | Avoid |
|---|---|
lid_open |
Anim1, asdf, open_lid_th |
lid_close |
final_final2 |
battery_reveal |
Long names full of spaces |
Record every clip in animation-clip-list.md
4. Collision / Interference Check While Playing
Section titled “4. Collision / Interference Check While Playing”Play the animation slowly and check:
| Check | Pass means |
|---|---|
| Lid vs base | No severe intersection right at the hinge |
| Lid vs tall components | No collision with the USB head / sensors / display |
| Cable / finger space (concept) | There is room to imagine a hand opening it |
| Extreme angle | The open angle does not exceed what the real mechanism can do |
If there is a collision:
- Move the hinge (the Origin)
- Reduce the opening angle
- Or go back and fix the shape in M02 (wall clearance / component height)
Key phrase Motion that collides = a design bug, caught more cheaply here than after it’s printed.
You do not need to turn on Physics simulation in M03 — visual inspection + Wireframe is enough for the lab.
5. Useful Product Motions (Pick What Fits)
Section titled “5. Useful Product Motions (Pick What Fits)”| Motion idea | Typical keys | Twin / teaching use |
|---|---|---|
| Lid open–close | Rotation on the hinge | The core of this lab |
| Revealing the PCB inside | Lid open + a held camera | Teaching material on the structure |
| Removing the battery (concept) | Location of Battery_block |
Showing a service compartment |
| LED state / a rotating part | A slight Rotation, or Emission (from M02) | Demonstrating an operating state |
Choose at least one open/close set to meet the criteria — the rest is extra work.
6. Sequences for Twin and Teaching Media
Section titled “6. Sequences for Twin and Teaching Media”6.1 Keep clips short and purposeful
Section titled “6.1 Keep clips short and purposeful”| Guideline | Why |
|---|---|
| 1–3 seconds per clip | Easy to manage · light to export · viewers understand one point |
| One clip = one intention | lid_open does not mix in a long camera rotation |
| Consistent names across the team | M04 / Bitstream Studio references the same names |
6.2 Prepare for glTF export (preview of M04)
Section titled “6.2 Prepare for glTF export (preview of M04)”Per glTF Animations:
- What exports well is keyframed transforms (and, in some cases, shape keys)
- If there are several Actions to export, they usually need to be Stashed into the NLA, depending on the export mode
- Track / action names affect the clip names inside the GLB file
In M03, just make sure playback in Blender is correct and every clip is fully named — the export button details are in M04.
6.3 Optional playblast for evidence
Section titled “6.3 Optional playblast for evidence”Record a short piece of evidence without a full render:
- Viewport → View → Viewport Render Animation (menu name varies by version)
- Or screen-record while pressing Play
Attach the file or a sequence of screenshots together with the clip list.
7. Quality Gate Before M04
Section titled “7. Quality Gate Before M04”| Check | Pass means |
|---|---|
| Lid origin at hinge | Rotating it behaves like a hinge |
| At least one open/close motion | Plays back in the Timeline |
| No severe mesh intersection | Checked during playback |
| Named action/clip | e.g. lid_open |
| Clip list filled | animation-clip-list.md |
| Scale from M01–M02 unchanged | The PCB still fits |
Next Steps
Section titled “Next Steps”- Do the lab: Lab
- Fill in animation-clip-list.md
- When ready, continue to M04 — Blender to Twin Integration
References and Further Reading
Section titled “References and Further Reading”Blender animation (official)
Section titled “Blender animation (official)”- Editing Keyframes (4.5 LTS)
- Timeline
- Actions
- Dope Sheet
- Graph Editor
- Set Origin
- Parenting
- glTF 2.0 — Animations
- Blender Fundamentals 4.5 LTS
- INC111-2021 Blender (Thai)
Course links
Section titled “Course links”- M02 · M04 · Course 3 TOC
- Course 2 M03 (Virtual Device — a different focus)
Check your understanding
Section titled “Check your understanding”Three short questions in quiz.yaml, one per objective of this lesson. Try answering them yourself first, then compare with the answer key and explanations in the file.
Continue hands-on at Lab: lid animation and a short motion sequence
Lab · Clip list · ← TOC · ← M02 · M04 →
Review questions
Answer on your own first, then open the answer.
-
ก่อนใส่ keyframe การเปิดฝา ควรวาง origin ของฝาไว้ที่ใด (Objective 1)
- ตำแหน่งกล้อง
- กึ่งกลางของฉาก
- ที่บานพับ
- กึ่งกลางของฝา
Show answer
Answer: C. ที่บานพับ
หัวข้อ 2.1 Place the origin at the hinge
-
ชื่อคลิปใดเหมาะสำหรับส่งเข้า Twin (Objective 2)
- `lid_open`
- `Anim1`
- `เปิดฝา`
- `final_final2`
Show answer
Answer: A. `lid_open`
ตารางในหัวข้อ 3.4: ใช้ชื่อภาษาอังกฤษสั้น เลี่ยงชื่อว่าง ชื่อซ้ำ และภาษาไทยในชื่อคลิป
-
ถ้าฝาเปิดแล้วชนชิ้นส่วนสูงภายใน บทเรียนเสนอทางแก้ใด (Objective 3)
- ซ่อนชิ้นส่วนที่ชนตอนเรนเดอร์
- export ใหม่โดยไม่ต้องแก้อะไร
- เลื่อนบานพับ ลดมุมเปิด หรือกลับไปแก้รูปทรงในโมดูล 2
- เปิด Physics simulation ให้ชิ้นส่วนเด้งออก
Show answer
Answer: C. เลื่อนบานพับ ลดมุมเปิด หรือกลับไปแก้รูปทรงในโมดูล 2
หัวข้อ 4: Motion ที่ชนคือบั๊กดีไซน์ที่จับได้ถูกกว่าตอนพิมพ์แล้วค่อยรู้
Cite this lesson
If you teach from this lesson or reuse it in slides or documents, credit it with the text below. If you changed it, add (adapted) after the title.
"Open/Close Animation and Interference Checks" 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
Thai attribution: "แอนิเมชันเปิด–ปิดและการตรวจการชน" จาก TESA Open Knowledge โดยสมาคมสมองกลฝังตัวไทย (Thai Embedded Systems Association: TESA) https://github.com/tesaiot/tesa-qualification-program สัญญาอนุญาต CC BY-NC 4.0
Lesson link: https://tesaiot.github.io/tesa-qualification-program/en/courses/product-design/m03-motion/l01-motion-and-interaction/
This lesson adapts the source below; keep its credit too.
https://github.com/drsanti/TESAIoT-Courses/blob/287c21814ba8c75f693136616dcd270349a15966/C3/M03/README.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
Content is licensed CC BY-NC 4.0. Reuse it non-commercially and credit the Thai Embedded Systems Association (TESA) every time. · How to cite TESA