A technical look at some recent animation work for Hazelnut
6 days ago
– Sun, Jan 10, 2021 at 03:09:07 AM
Ok, so here is a look at some work for a feature in Hazelnut that isn't quite done, but I figured folks might still have interest in.
At some point in the story, the heroine gains access to an entirely new form, a river otter. This form develops over time, gaining new abilities as the story progresses, some of which function similarly to how a dungeon item fits into the gameplay sequence in the classic zelda-like scheme. This form has a complete animation set now, more or less:
One unique challenge that this concept has had so far (which I forsaw going into it), is that in this artstyle, characters which concentrate their bodymass into a single tile animate far more smoothly, look way less awkward as they are turning, and look way more believable in collision. Although the heroine is much taller than a single tile, because we as humans naturally understand the human form, and that it occupies only the space under the shoulders, our brains easily understand that in perspective she still occupies one tile. So while otters are quite long in body, I am rendering her as quite pudgy and bulbous. This gives the added benefit that round and soft objects are a boon for classic animation principles, since they are subject to many of the techniques that better sell an animation, such as elasticity, reactive deformation, inertia, and follow-through.
The run cycle and ground-animations feel fairly successful so far, and is probably the closest of the animations to being complete.
I watched a number of videos of otters in motion to get a sense for how they actually propel themselves. The motion is actually fairly interesting, and a bit different from most other mammals, but shared between their closer relatives like ferrets and weasels, and maybe a variation on what dogs seem to do. The best example I was able to find was an animation study by user "Panimated Sonja" on Youtube and Tumblr (you can watch it here: https://www.youtube.com/watch?v=cH-SsWJfHec ). I capture the 10 frames they drew here, for a reference:
The things that I take away, are: the front legs and back legs coordinate mainly as like-pairs, with a staggered action that probably creates more stability; there is a big contraction of the long spine, which generates a large amount of the force propelling the otter; the way the motion seems to work is that the back legs hop forward as the spine is contracting, and simultaneously the front legs leave the ground, the back legs push forward strongly, the spine straightens out, pushing the front of the body further still, and then the front legs make staggered contact, and provide the friction to plant the front of the body as the back prepares to repeat the motion. The back legs appear like they are responsible for about 2/3 of the power the four legs provide. I used these concepts as a guideline for my run cycle (the last 5 frames of each row):
The standing pose the otter takes at idle was suggested by a friend, and is a useful device that reinforces the idea that the body mass occupies a single tile. The transition between running and idle also seems to capture the active and somewhat nervous energy that otters have. Because the otter spends most of its frames with the majority of its body mass concentrated in a single frame, it ultimately seems to animate pretty gracefully while on the ground.
The primary purpose of the otter on the ground from a design standpoint is to use the burrow ability we have planned for it as a major feature, although it's not yet clear if the otter should have an attack on top of this- that may either end up serving to make the form more viable as a character controller, or it may also end up muddying the purpose and feel of the otter. The form is intended to feel quite different from the heroine's standard form, missing most of her abilities, but also to have enough utility that it is the best fit for some situations. The moveset must walk the line between utility, but also having it's own distinct experience, and not being redundant with her other abilities.
Another challenge to giving the otter a direct attack is that her body doesn't really lend itself to explaining how an attack with enough range to be viable could be delivered. The current idea, if we gave her that attack, would be for her to propel herself in a lunge, and roll it off as a ball. A rough look at that motion can also be seen in the ground preview video from last week:
It's likely I'd balance the utility of a roll attack with a few recovery frames that give vulnerability, since she is not meant to have the same combat potential as the heroine's primary form.
The swimming motion has been another highlight of the effort. The way that otters swim is just marvelous, but they are so dynamic that it is hard to immediately understand what they are doing. They are constantly twisting and rolling and flexing different parts of their bodies. User Airin Zhang on Youtube captures that pretty well in their animation:
I wasn't really able to parse what was going on until I saw a video of otters at the Milwaukee County Zoo exhibit underwater behind glass, which pretty much provides the only real way to see what they are actually doing in profile (you can watch that video here, where I timestamped it at the moment I captured: https://youtu.be/mXjE6-Fb53Q?t=99 ). Around 1:40, you can see what seems to be a perfect (rare) example of them using their primary propulsion technique while not turning at the same time. I captured the frames here:
From what I can tell, they seem to use their front legs similarly to how dolphins do- they keep them back to reduce drag, but temporarily lift one or the other in order to steer. Similarly to planes, their primary turning method involves roll rather than yaw, probably beause of the eccentric force their front legs apply against their center of mass. Here though the otter moves without using its front legs at all for a couple cycles. The energy seems to be divided between the otter's tail and their back legs. Otters actually have a broad, paddle-like tail to facilitate this motion. It's not clear if the tail or the back legs provide the majority of the energy. The cycle looks like the otter is creating an S-motion along their spine, and ending the motion through their tail, generating force on both the downward and upward motion. They slowly hook their back legs foward, and then increase their surface area with the webbing, and deploy a back-paddle, flattening them back out against their body. Then after a few cycles of this to generate power, they simple glide through the motion, sometimes adjusting course. Here is my current work to capture those motions:
Everytime the otter turns in real life, it is accompanied by a roll, so I also have the otter roll every time she turns.
Similarly to the ground form, it's not clear to what extent the otter should have attacks while swimming, but I did give her an animation for a tentative thrusting-roll attack to test. Most of her use is meant to be utility, navigating underwater spaces and manipulating event assets down there, while swimming away from hazards, and trying not to drown. Our intenion for that gameplay takes a nod from the Mermaid fins from the Gameboy Zeldas, where the underwater space is divided into multiple tiers where the player can change levels. The otter will be able to manipate objects by moving them with bubbles, most likely as well.
Here is the animation being tested:
The art is of course just prototype placeholder for tiles, so don't focus on that.
So far the motion feels sort of successful, but not yet ideal. The animations are a bit longer than the other ground animations, which feels somewhat hard to avoid, since otters are such a long-bodied animal, and the straighten their bodies completely for this motion. But if she is too long, than she will feel very unwieldy to turn. The turning motion will make her feel like a javelin making 90 degree turns on its center of mass, and over-emphasize the 4-way animation she has. As I finish work on that one, I will probably de-emphasize her length, and the frames that give the perception of her long body to address that issue. The roll she does on the other hand feels really natural to me, and seems to add livelieness and the idiosyncratic character that the motions of otters have. I may shorten her body length in the roll as well, to minimize the current awkwardness of turning.
Here she she is during surface swimming btw, similarly unfinished, but getting there (the scene she is swimming in is technically shallow water by our game logic, but just use imagination for now, lol):
The digging motion feels pretty good as well, maybe fairly close to what may be it's final form:
Otters aren't particularly known for digging, but they do burrow. In the animation, she basically does a shoveling motion with her forelimbs, making downard progress with each cycle. In the surfacing animation, she does a triumphant hop and dismount, which has to happen quickly so it feels responsive and not too control-laggy. I am thinking we might have the surfacing motion be a kind of attack that provides knockback, to reduce the difficulty of finding a suitable time and place to surface.
The utlity of the dig move is planned to be quite extensive, actually. The way it will function is that some surfaces like sand or grass will be diggable. Once she has burrowed, she will be in a new collision space entirely, to represent the unseen underground. She will run into hidden barriers down there, but also be able to dig under other barriers in the main surface playspace, like rocks or walls or cliffs. With enough experimenting, she will find new hidden paths. The ability will also allow her to circumvent some kinds of enemies. Additionally planned is the ability to manipulate some surface objects by mininig under them, and causing them to collapse into her mined path. The trail she leaves as she burrows will also have its own collision that some assets may respond to. Currenly planned to be prototyped for instance are puzzles which would involve creating a path of rails with her dug path for puzzle objects to be guided by. It is possible that some enemies will be blocked from crossing that path as well, but it's not clear if that particular feature will provide either interesting or broken gameplay, so we will have to prototype that concept as well to ultimately know.
We may have to play with the visuals a bit as well, in order to get the color not clashing with different environments, or for the path to look right when going under non-surfaceable terrain:
Part of the difficulty in prototyping this stuff is that simple ideas tend to have unforseen interactions with other existing features, and especially anytime you create a feature that involves collision as a major driving trait, you can expect something to interact in a funny way with it. Still, these features appear that they won't have too many special concerns in passing prototyping.
If you have anything intesting to add about ideas for these animations, or design comments about the concept of the otter form as currently described here, let us know, since this part of the game is under construction and in the process of coalescing into its final form!