Update # 1 - Adjustments and rigging In my first week of true development on the game I've been spending a lot of time homogenising my various assets to look like they fit together, as well as getting the major players rigged. This process still has a way to go so I thought I'd make a post about how I'm doing this and why I'm bothering.
Model AdjustmentsAs I said in my first post the game's art comprises of models and textures made specifically for the game alongside asset store items, which can lead to a clashing mismatch of art styles. In order to make sure everything fits together I'm adjusting their proportions in my 3D modelling program of choice: Blender. And of course I'm using Photoshop for textures because I was suckered into a subscription 1000 years ago that I keep renewing because I'm too weak to learn Gimp.
As I said I'm going for a slightly whimsical art style, heavily inspired by the likes of FF9 and Grandia. Here's an example of an adjusted model before and after:
Before and after the tanning salon
This is actually a model made specifically for the game, but since it's birth the entire art style has changed. So I took it into the shop and made it more cartoonish by:
- Shortening the whole thing down, especially the legs. As a man with freakishly long legs for his height I couldn't spend all day looking at my own insecurities
- Expanding the size of the hands and the head to chibi-ish levels
- Fluffing up that sweet 'do even more
- Shrinking down the feet. I was thinking of Guybrush Threepwood when I did it and I like how it turned out
- Making his accessories way bigger and more integrated into his body. They have a story impact and I wanted them front and centre
While I did this I took the opportunity to make adjustments to the topology of the model that make it much easier for me to animate.
Also note his super duper tan. I'm no phenomenal painter so this is just a hue and saturation adjustment to the texture in photoshop
(the artist who made the original is though. You can check him out here and see a much better, properly lit representation of the original model).
Different models need different amounts of adjustments, but the main hurdle I've encountered is every single asset store item being saved as an FBX with scripts on the model (FBX is a file format used by a different, more expensive modelling program called 3DS Max). These get imported into Blender with thousands of random meshes sat doing nothing that must be hunted down and destroyed before you can adjust the model safely. Miss one and your model pretty much explodes the next time you try to load it.
Hooray
RiggingI first learned to rig humans in Blender ages ago using the basic rigging tutorial by Sebastian Lague, and honestly I've never really used a different method to get the basics set up since. I've added some bits of my own in though so I'll go through the details of how I rig in Blender to get around Unity's weird integration with it.
The basic rigSo I set up in the same way most people would, by building a basic human skeleton. For anyone that doesn't use Blender or doesn't rig/animate I'll go through it. A (very) basic rigged human looks like this:
My only regret... is that I have...boneitis!
The head and body controls are self explanatory, you rotate them around and they move the bits they're nearest to. But the other bits use something called Inverse Kinematics (
IK), essentially invisible levers that push around other bones and items. In this case I'm using an IK bone on the
Arm Controls to shove around the forearm and upper arm. The wrist follows it perfectly and the other bones in the arm bend and stretch accordingly.
I'm doing the same thing for the legs. It's pretty neat and speeds up animation ten-fold.
The Pole Targets sit in front of the model, floating about in space. They act as markers for the elbows and knees to point at, which lets you move them to rotate the arm. This saves you rotating each individual bone, and ensures a smooth rotation. Like so:
You feel like a genius the first time you get this working
You might be wondering where all the other bones have gone in that gif. Well because I use the IK bones to control them, I can hide the forearm etc and make it easier to see what my model looks like while I'm animating it. Thanks IK!
With a rig like this made you can quickly import it to other humanoid models of all shapes and sizes and start animating way, way faster than if you were making one from scratch (Shift+F1 in blender in case you're stuck on this point like I was). Behold!
The same rig on another model. It too was made specifically for the game
The issue with Blender, IK and UnitySo all's well and good. I have a rig that I can quickly and easily bring into Unity. So what's the problem? Well Unity won't actually import IK bones when it adds a Blender file to your assets. It keeps the animation, but not the bone.
"So what's the problem?" I cry rhetorically once more, "You have the animation, why do you still need the IK bones?"
Besides shoving other bones about another great function of IK bones is that they can be used as targets. So I could have an IK bone where I want a sheathe to be and then have my characters sword target it during the animation, creating a smooth sheathing animation with little worry. I once spent a significant amount of time making cool crossbow animations, only to have my nightmares come true when the crossbow laid limply on the ground beside my character upon loading the scene. Unity also likes to use IK bones in scripts.
The solution is painfully obvious and I'm embarrassed about how long it took me to figure out: you just add another 'real' bone on top of the IK one and lock it to the IK position. Unity will then import that bone, and as it uses the IK positions you can just play pretend that it's an IK bone. But that fraud bone knows what it really is. And the truth of it's deceit hurts it a little more each day.
Anyway I've still got a fair bit of rigging to go this week, and then it's on to base animations so I can get the game going proper with more interesting updates.
Thanks for reading!