Procedural Running / Galloping in Minecraft — Transcript
Full transcript
- 0:03Hi. This is a followup to my last video about procedural walking animations.
- 0:09Since then, I added support for different body plans.
- 0:12Here's a really small spider.
- 0:15And here's a really big one.
- 0:18Here's a quadruped.
- 0:20A hexapod.
- 0:22And an octopod.
- 0:26They all work using the same ruleset I described in the last video.
- 0:30All I had to do was generalize the functions I used to group adjacent and diagonal leg pairs.
- 0:37I made a few improvements to the ruleset.
- 0:40The legs now move ahead of the rest position.
- 0:45I also added an adjustable cooldown to space out the movement of diagonal leg pairs.
- 1:01Next, I added galloping.
- 1:03While galloping, we group legs into horizontal pairs. A leg in each pair
- 1:08is designated as the dominant leg. When the dominant leg exits the trigger-threshold,
- 1:15we will move both legs at the same time.
- 1:22We can add a cooldown between vertical pairs to prevent that leap-frogging motion.
- 1:37We can also customize the gait by adding a cooldown between horizontal pairs.
- 1:54Unfortunately, this does not play well with our current gravity system.
- 2:02In the last video, we apply a normal-force only when there is at least one grounded
- 2:07diagonal leg pair, but this is too big of a simplification to support galloping.
- 2:12So I came up with a more elaborate rule set that doesn’t require a full rigid body simulation.
- 2:17The first step is to specify a center of mass. It does not need to be accurate,
- 2:22as long as it's in a believable position.
- 2:25Next, we will draw a polygon around each grounded leg.
- 2:29If the center of mass is contained within the polygon,
- 2:32we apply an equal but opposite force to gravity.
- 2:36Otherwise, we apply the force at an angle, originating from the closest point on the polygon.
- 2:50To detect if a point is contained in a polygon, we will cast a line from the
- 2:55point towards an arbitrary direction. If there is an odd number of intersections,
- 3:01then we know it is contained in the polygon.
- 3:09An unintended benefit of this new system is that
- 3:13the spider now falls off ledges in a much more convincing manner.
- 3:49I also added cloaking. Each segment locates a block in the
- 3:54player's line of sight and camouflages itself by adopting a similar texture.
- 4:00However, it does not copy the block directly.
- 4:03For one, it avoids switching to blocks with directional textures. As an example,
- 4:08grass blocks are mapped to moss blocks.
- 4:11For another, it also avoids transparent or non-full blocks. Leaves are mapped to
- 4:15moss blocks, while slabs and stairs are mapped to their full-block counterparts.
- 4:21I thought the camouflage pattern worked too well. To add a bit of imperfection , I made
- 4:26it intermittently select a different block with similar color. The randomizer is seeded with
- 4:32the segment's position, that way it still looks random without being too chaotic.
- 4:37For the glitch effect, I use glazed terracotta.
- 4:42To address some of the questions I got in my last video, here's a more detailed visualization
- 4:48of my inverse kinematics implementation.
- 4:51A chain is composed of a root position, and any number of segments, each containing a length and a tip-position.
- 5:00To move the chain to a new position, we first set the last segment's position to the target.
- 5:06Then, we will subtract the parent's position from
- 5:08the child. This will give us a vector indicated by this arrow.
- 5:13Next, we will normalize the vector. We will divide it by its own length,
- 5:17resulting in a new vector with a length of 1.
- 5:20Finally, we will multiply the vector by the segment length.
- 5:24This vector now represents the segment's base position,
- 5:27which we can use as the target for the next segment.
- 5:31We will move the chain back and forth,
- 5:32until we find a solution within some acceptable margin of error.
About this transcript
This page contains the full transcript of Procedural Running / Galloping in Minecraft by Cymaera, generated from the public captions YouTube serves with the video. The transcript has 638 words across 57 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.