Procedural Walking Animation in Minecraft — Transcript
Full transcript
- 0:02Hi. Today's project is a spider with a procedural walking animation.
- 0:07Its movements are generated in real time to adapt to its surroundings,
- 0:11which would be infeasible to implement with traditional key-framed animations.
- 0:18Let's start by creating a kinematic chain for a leg.
- 0:21A chain is composed of a root node, and any number of rigid segments,
- 0:25which we can render using the new Block Display entities.
- 0:30To move the chain, we will first move the last segment to the target position.
- 0:35Then, we will recursively move each parent segment to the base of its child.
- 0:41Now the chain is no longer attached to its root.
- 0:44We can move it back using the same principles.
- 0:47We will repeat this procedure until we find a solution within some acceptable margin of error.
- 0:54I specified a maximum of 10 iterations in case a solution is never found.
- 0:55This a commonly used algorithm called FABRIK.
- 1:01Currently, the joints can rotate with 360 degrees of freedom.
- 1:06This is fine for flexible appendages,
- 1:08but for leg joins, we typically want to restrict them to only rotate on one axis.
- 1:14To apply this constraint,
- 1:15I straightened the chain towards the target before applying the algorithm.
- 1:21Here, I created a spider with 4 chains for legs.
- 1:26Let's accelerate the body forward.
- 1:33If each leg gets too far away from its rest-position, let's tell it to return to the rest-position.
- 1:50Let's also make sure that the adjacent legs are grounded before we start moving each leg.
- 2:12Right now, the spider will stand in awkward poses after coming to a rest.
- 2:17Let's decrease the trigger-distance while the spider is standing still.
- 2:34One other issue, is that the legs will phase through each other
- 2:37if the rotation changes too rapidly.
- 2:40We can interpolate the rotation gradually across multiple frames.
- 2:49Next, we could tell the spider to stop moving if its legs get too far away from their rest-position.
- 3:03Right now, the spider can only walk on a flat plane.
- 3:08To fix this, we will scan a column of blocks to find the ground height
- 3:12and use that as our new rest-position.
- 3:19We need to move the body as well.
- 3:22So I averaged the position of all the legs, added a small offset, and used the result
- 3:28for the body position.
- 3:57Next, I would like the spider to respond to gravity.
- 4:03To add this, we will accelerate the body downwards.
- 4:07If the spider has at least one pair of opposite legs on the ground,
- 4:11we can apply an upwards force to counteract gravity.
- 4:28For the final challenge, I want the spider to be able to walk on these discontiguous pillars.
- 4:34This is impossible with our current strategy, as the spider's leg won't be able to locate the ground
- 4:38while passing between gaps in the terrain.
- 4:43To fix this, we could try scanning the 8 neighbouring columns as well and picking the one closest
- 4:48to the rest-position.
- 4:49However, this created a new problem, since the legs would now prefer moving half a block
- 4:55to the adjacent columns instead of stepping up one full block.
- 4:59To address this, I set the comparison point half a block above the rest-position
- 5:03if the path is obstructed.
- 5:31Lastly, I want to mention a bit about the block display entities I used to render the spider.
- 5:38In Minecraft, all entities can rotate on 2 axes.
- 5:42They have a pitch,
- 5:44a yaw,
- 5:46but no tilt.
- 5:49This is a problem for the leg joints, since every time they crossed over the y-axis,
- 5:54they would rotate 180 degrees in order to re-orient themselves upwards.
- 5:59Here's what that looks like in context.
- 6:09Thankfully, the block display entities allow us to specify a custom transformation matrix.
- 6:15This means can rotate them using a matrix with an arbitrary up-vector
- 6:19instead of the usual rotation component.
- 6:23I used the cross-product between the y-axis and the end-effector,
- 6:27since that always faces the same direction.
- 6:30Here are some variations I was able to create by changing a few parameters.
About this transcript
This page contains the full transcript of Procedural Walking Animation in Minecraft by Cymaera, generated from the public captions YouTube serves with the video. The transcript has 663 words across 61 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.