3D Microduck: Interactive Biped Robot Playground
Lutfi's own MicroDuck simulator design, live in the browser: a servo-built biped robot with real joint kinematics — walk, run, sit, jump, quack, free-roam steering, camera presets and synthesized sound.
System Architecture & Engineering Concept
Microduck is a miniature bipedal robot with an oversized camera-eye head and a flat duck-bill beak, modeled faithfully after the physical micro biped robots in the reference photos. This build uses Lutfi's own MicroDuck 3D Simulator design: a PBR model assembled from rounded-box geometry with stacked servo blocks, neck wiring loops, CNC-style aluminum leg links, extruded thigh shield plates and chunky duck-boot feet — no external model files. A pure kinematics engine computes every joint pose (pelvis, neck, head, hips, knees, ankles) for idle, walk, run, sit and jump, with smooth pose blending between modes. Drive it two ways: Treadmill mode walks in place while the floor grid scrolls, and Free Roam mode lets you steer around the arena with WASD. Four studio color themes, four camera presets (Orbit, Follow, Head, Feet), a speed control, and a fully synthesized Web Audio soundscape — servo whirrs, footstep taps and a proper FM-synth quack — complete the simulator.
Implementation Highlights
- The robot model (MicroDuckRobot) is built from a custom rounded-box geometry generator plus extruded shield plates and tube-geometry neck cables, with PBR materials lit by a RoomEnvironment studio HDRI and ACES tone mapping.
- Kinematics is a pure, unit-testable module: calculateDuckPose(mode, time, speed) returns a full 21-joint pose, and applyPose maps it onto the Three.js joint hierarchy — rendering and motion logic stay fully separated.
- Scene manager handles pose-blend transitions, treadmill grid scrolling vs free-roam navigation, camera presets, FPS tracking, and a software-GL fallback path for GPU-less machines.
- All sound is synthesized live with Web Audio (FM quack, servo whirr, noise-burst footsteps) — zero audio files; four color themes re-skin every material at runtime.
Interactive Parameters
// Pure kinematics: walk gait (kinematics.ts)
const leftHip = Math.sin(phase) * hipSwingAmp;
const leftKnee = Math.max(0, -Math.cos(phase)) * kneeLiftAmp + 0.15;
const leftAnkle = -leftHip - leftKnee * 0.6 + (sinLeft > 0 ? 0.25 : -0.05);
// Mode changes cross-fade over 0.35s:
currentPose = blendPoses(prevPose, targetPose, transitionAlpha);
robot.applyPose(currentPose);