#5
by dignity
About characters:
If you already have a physicalized character inside the engine, the rest is not that hard. At least if you're using the GameSDK code.
First of all you should create animations like a walk cycle, run cycle, e.t.c. Then you can start to set up your own mannequin setup. Look into the default player/ai setup inside the GameSDK project to see how it is done.
Now we need to talk about blendspaces. You may notice inside the default players mannequin setup, that the entire movement fragement seems to be just one animation. Well... this "one thing" is actually a blendspace. Blendspaces take lots of animations an blend them together. This is pretty useful, because of the vatiety that you can achieve (e.g. if you use a gamepad, you can of course control the movement speed with the stick. Due to the blendspace, the animation speed will automatically fit to this movespeed).
What I would do to create a blendspace is this: copy the blendspaces of the GameSDK character into your characters animation file. Add them to your character's .charparams (which will soon be deprecated, but right now we don't have any information how it'll be done in the future). And then open the blendspace files with notepad or notepad++. You'll want to search for the paths to the animations. Load up the GameSDK character inside the character tool and look at the animations that you just found inside the blendspace. Now you can vreate your own animation to replace the default one. If you finished the animations, just alter the paths inside the belndspace to your animations.
By the way: there are three forms of animation:
Fullbody, UpperBody, Additive. As far as I know, you need to set this inside the .animsettings file.
Fullbody is like a base animation. For example walk or run cycles. UpperBody animations are animations that will overwrite others. Only bones in your upper body can be animated for these animations (the engine will detect if you are using a bone that is not prt of the upperbody. It does so due to a setting in a lua script. But I'll tell you more about that later. At least that's what I've heared. I'm not 100% sure here).
So basically if you have a walk cycle and overlay an upperbody animation (e.g. holding a rifle), the upper body will be overwritten. So that the feeds will walk, and the arms are holding a rifle without getting any influence from the fullbody animation.
Additive animations are much more tricky. They will "add" to your animation. So you can for example create a breathing animation and use it as an additive. To stay with our example: you have a walking character (fullbody animation) that holds a rifle (upperbody animation) and now you assign the additive animation, the character will start breathing while walking an holding the rifle.
Now that we know about that, it's time to create an entire mannequin setup. You might want to search the docs by the way. They habe a tutorial there about framents, fragment id's, transitions e.t.c.
But let's talk about context pretty short.
A context is really what it sounds like. For example you can create contexts for weapons, that the player holds. So if you are having a rifle with the name "myrifle", you should create a context with the same name ("myrifle") for the player. In this context, you will set all the animations, needed for that (e.g. reload, shooting, idle, e.t.c.).
This here is a brief explanation. It's not complete. So you might want to look into the GameSDK mannequin setup here aswell.
So what you need to do now is getting into the lua scripts (i think it was human.lua for ai and player.lua for player). In the top part you'll find setting about the model (change it to your character), the shadow model (will also be your character), the animations to use (should point to your mannequin setup).
And if you scroll down, you'll find a part where bones are defined. Replace these names with the names of your skeletons bones.
That should be it.
Pretty big bunch of work. I have never created a full character, so I can't tell you in more detail.
But I hope that this was useful.
- Jannis