SLIDE: platformer has been in development on and off for a year now. Yet, you still control an orange ball of a main hero. A proper player representation – an avatar – has been loooong time overdue.
For some time I’ve been hoping for a proper 3d artist/animator to show up, with his shining armor and a white horse, he would surely deliver awesome avatar. But it looks like I’m not really worthy of hero-modellers’ attention, or no one really heard my telepathic cries for help.
So I had to actually do something myself. Well, apart from procrastination.
That’s the first time anyone can see new avatar. Yeah, it’s still small. But it’s not a ball anymore!
Yeah, but what exactly should I do?
Well, there are several criteria for my game’s main hero:
- I should be able to pull it off – and I suck at modelling and animations
- Avatar’s size is rather small – no tiny detail are allowed, just shapes
- It should look like a part of the world I’ve created so far
- It should look like it can perform those types of moves that exist in the game – most notably squishing while sliding along floors, walls, ceilings and in-betweens
- Its height should be close to its width. Kinda like circle or square…
It automatically means no humans, humanoids, animals and robots. Nothing with limbs, facial expressions and such.
So I had the options:
- Simplistic and futuristic vehicle exploring foreign planet
- Abstract-shaped animals
- Slimey oozeling-like creature
Vehicles did not turn me on, I could not imagine abstract-shaped animals, so slimy-ooze it was.
This is the first draft of what I thought my slime-dude could look like.
Side note: I’ve been thinking about avatar long before I had the visual style, and among other things I considered:
- A particle flying along some sort of electrical chain
- A soccer ball – like it was kicked and now the ball has got to hit the goal
- An girl in a hovercraft on a hostile planet (I could not help but picture it in anime-style). I feel like I should make it readable and post somewhere…
Anyway, making slime-thing seemed pretty simple. I mean it’s pretty easy to model something like this, but how do I go about animating it?
This is the way slime-dude’s model looks like now up close. It’s almost as cool and detailed as Drake from Uncharted 4 =)
I mean, I know the basics of the technology and process involved in rigging characters with bones – you make a mesh, create a skeleton, assign bones to vertices of the mesh so that when you move bones the model deforms and you are ready to animate. Even I could do it. I can’t do it well, but if I were to make a stickman waving a hand, you’d understand that it’s waving a hand, not taking a piss. At least that’s a starting point to get better from.
But how do I create a skeleton for something that should become any shape? Experiments with bones yielded nothing relatively resembling what I hoped to achieve, leaving me severely demoralized.
As a last resort I had to ask google for an advice (to think of it, maybe that’s where I should have started😀 ) – and it helped. Turns out Unity supports blendshapes (since version 4.3). Basically it allows to have direct control over each individual vertex’ position. I can transform my mesh into anything I want as long as the polycount does not change.
It works like this:
- First, I need to create an initial model – the one that will be transformed into all other shapes and things.
- Now I need to create “poses” – the shapes to turn into. In order to make sure there are no weird thing going on during said transformations, I just copy-paste initial model and move vertices until I’m happy with the result.
- Once the poses are ready, I have to tell the initial pose about the existence of other ones – it’s simply done with the morpher modifier (in 3ds max).
- I import (or export?) it in Unity – that’s where I actually create blendshape animations. What I do, basically, is say “at this point of time your shape should be 90%poseA and 10% poseB, and in 15 frames you should be 0% poseA and 100% poseB”.
- Finally a little bit of coding is necessary to tell the game what animation should be played at what conditions (ie play run animation if the player is running, play slide animation if the player is sliding etc)
This is how animating looks in Unity. Really simple – for simple animations, like mine.
To think of it, it is essentially identical to any keyframe animation. the difference is that I have to manually model those keyframe-poses once, and then I can transform my avatar into them.
The clear upside of this approach is the level of control – if I want to, I can transform a ball into a house and then into a car and then into an octopus and so on.
On the other hand this control is achieved by manually moving each and every vertex to a “correct” position. Which is OK in my case – my avatar is pretty minimalistic – but it can easily become too damn gigantic amount of tedious work to pull it off.
All the poses I could come up with. I use them as keyframes to animate the slime-dude. Some of them look weird, right?
So here we are, above are the poses I’ve got so far, and those are enough to make basic running, jumping, sliding, standing, yawning, squishing, stretching, attaching, pushing the wall, birth and win animations – of course they need a lot of work but at least I have something to improve now. Except for the death animation, but I suspect I would have to do it somewhat different.
By the way, if you are a ninja-animator with mad skills (or at least if you know stuff) I’d be really grateful if you were to share how you would approach animating such kind of character.
BTW, SLIDE: platformer needs your help to pass the Greenlight process, so hit this link and leave a vote. Thanks! =)