Skip to content

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 →


By the end of this lesson you should be able to:

  1. Build animation to open–close a part, or to reveal the internal structure
  2. Simulate motion to assess usability (no parts pass through each other)
  3. 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.

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)
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

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.

The lid’s Origin point = the pivot point (Set Origin)

Recommended steps:

  1. Select Enclosure_lid
  2. Enter Edit Mode · select the edge or point you want as the hinge (usually the inner back edge)
  3. Shift+S → Cursor to Selected
  4. Object Mode → Object → Set Origin → Origin to 3D Cursor
  5. 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.

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.


Reference the official examples in Editing Keyframes and control timing with the Timeline

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

  1. Go to frame 1 (lid closed)
  2. Select Enclosure_lid
  3. Press I → choose Rotation (or LocRot if it needs to move too)
  4. Go to the clip’s end frame (e.g. 36)
  5. Rotate the lid open to the real working angle (e.g. 90° or 110°)
  6. Press I → Rotation again
  7. 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.

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.

Animation in Blender is stored in an Action (Actions)

  1. Open the Dope Sheet → Action mode (or the Action panel in the Animation workspace)
  2. Give the Action a short English name, such as lid_open
  3. 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:

  1. Move the hinge (the Origin)
  2. Reduce the opening angle
  3. 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.


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.

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.


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

  1. Do the lab: Lab
  2. Fill in animation-clip-list.md
  3. When ready, continue to M04 — Blender to Twin Integration

  1. Editing Keyframes (4.5 LTS)
  2. Timeline
  3. Actions
  4. Dope Sheet
  5. Graph Editor
  6. Set Origin
  7. Parenting
  8. glTF 2.0 — Animations
  9. Blender Fundamentals 4.5 LTS
  10. INC111-2021 Blender (Thai)
  1. M02 · M04 · Course 3 TOC
  2. Course 2 M03 (Virtual Device — a different focus)

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.

  1. ก่อนใส่ keyframe การเปิดฝา ควรวาง origin ของฝาไว้ที่ใด (Objective 1)

    1. ตำแหน่งกล้อง
    2. กึ่งกลางของฉาก
    3. ที่บานพับ
    4. กึ่งกลางของฝา
    Show answer

    Answer: C. ที่บานพับ

    หัวข้อ 2.1 Place the origin at the hinge

  2. ชื่อคลิปใดเหมาะสำหรับส่งเข้า Twin (Objective 2)

    1. `lid_open`
    2. `Anim1`
    3. `เปิดฝา`
    4. `final_final2`
    Show answer

    Answer: A. `lid_open`

    ตารางในหัวข้อ 3.4: ใช้ชื่อภาษาอังกฤษสั้น เลี่ยงชื่อว่าง ชื่อซ้ำ และภาษาไทยในชื่อคลิป

  3. ถ้าฝาเปิดแล้วชนชิ้นส่วนสูงภายใน บทเรียนเสนอทางแก้ใด (Objective 3)

    1. ซ่อนชิ้นส่วนที่ชนตอนเรนเดอร์
    2. export ใหม่โดยไม่ต้องแก้อะไร
    3. เลื่อนบานพับ ลดมุมเปิด หรือกลับไปแก้รูปทรงในโมดูล 2
    4. เปิด 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.

Full guide: how to cite TESA

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