Editing unit skeletons and animations

DarkScythe

Hunkalicious Holo
Joined
May 6, 2014
Messages
804
Hey there, everyone,

I'd like to ask for some help from the unit conversion and import experts here, as I've gotten stuck here without really knowing what to do next.

First off, I've decided that I want some variety with my development, and so a year after I began work on my Spice and Wolf Civilization, I'm looking to potentially add a secondary project while I continue updating it.

This will be my second Civilization (not counting ones where I've collaborated with others) and my current design hinges pretty heavily on the ability to put a bunch of new units into the game. Unfortunately, if I can't get the units doing exactly what I want them to, I'll likely have to scrap this idea and think of something else. If Holo was ambitious for my first Civ, I guess I kind of shot myself in the foot as it's the bar I need to meet for my second one, haha.

In any case, so far I've gotten a prototype of the new model I'll need imported, and rigged to the Musketman. That was an adventure in and of itself since I've never used Blender before, but barring issues with skeleton alignment, it works.

However, here's the problem: I need these new units to fly. They will be flying / hovering units, similar to the Helicopter Gunship in function, but of course, I can't exactly use the Helicopter skeleton, because these models are humans. Ideally I would just mix and match the various unit parts, but I'm not sure that's possible.

As such, I have come to request some assistance from those much more experienced than I am in this field.

First of all, my prototype, while rigged properly to the Musketman's skeleton, isn't a perfect fit because my model's arms are shorter than the original's, and that's causing issues with not lining up with its skeleton properly. Is it possible or feasible to modify the skeleton to match the model? I don't quite feel the desire to stretch my model's arms out of proportion unless absolutely necessary.

The secondary question which follows from the above is then: Is it possible to create your own skeleton, or to mix and match "pieces" of different skeletons together so that the game can address the same model?

The third question is probably going to be the most difficult, but I believe it is technically possible: How does one go about altering or creating new animations? As I've noted earlier, my new models need to be able to "fly" similarly to the Helicopter, but no such "flying human" unit exists as a template, and so I am thinking that ultimately I will be required to make new animations for this effect.

The culmination of all this is that, ideally, I would like to have a new skeleton with its own animations tailored to my models such that I can import more of them and simply rig them to this new one. Note that I only mean to animate the unit's movement -- for weapon effects, I would like to use the existing effects (for example, the Helicopter's MG firing animation looks perfect for me.)

I have yet to announce the details of my next mod, mainly because of all these issues that can potentially cause me to have to scrap it and I don't want to get anyone's hopes up. However, if you need to inspect my prototype model for issues or information, feel free to let me know, and I can send it via a PM. If I can get all these issues worked out, and my prototype working as I've intended it to, I'll make a formal announcement of my next series.

Am I looking for the impossible, or is there a path forward for me?

Thank you!
 
1. Only to add effects. If you modify the skeleton the animations would put them back to their original positions and probably distort the mesh.

2. You can mix and match skeleton pieces but then you would need to create your own animations so this would not be a good option unless you know how to animate.

3. If you are going to do a flying person I think you are really going to need a custom skeleton and animations. The easiest way to achieve this would be to find a civ 4 unit that does this (if there is one) and import it along with its animations. Deliverator has a tutorial on how to do this. There is currently no way to edit civ 5 animations that I am aware of.
 
Thanks for the response, Wolfdog!

I've essentially resigned myself to the fact that I'll probably have to make my own skeleton and animations at this point, since I'm not sure anything would actually fit with the characters I'm importing. I'll try to take a look and see if Civ4 has anything usable, though.

In response to #1, I suppose that would be too convenient if it worked like I envisioned it, and combined with #2, yeah it does seem like I'll need to make my own .. question now is how to do so; Is there a guide available for doing this? I assume it's something related to the armature in Blender.

For #3, I don't know specifically about editing the Civ5 animations from a mod, but I do recall danrell posting an "edited animations" pack here which seems like it needed to be placed into the main Civ5 folder to overwrite the stock animation files. Regardless, it should theoretically be possible to introduce new animations into Civ5, since whatever Civ4 animations come with some of those custom units are not native Civ5 animations. I suppose if it's possible to insert animations from a new source, then the next step would be to create entirely new animations instead -- am I on the right track here, or is my logic incorrect?

In this case, as well as the first, would anyone know how to do so, or might there be any guides available? I'm banking on these units to be the highlight of the new Civ.
 
well, there was a fantasy mod that had flying dragons I think. The animation thingie for that might not work for what you want, though. I can't remember the name of the mod, but it was the one with the elf-chick in the steelkini with a castle in the background as the mod cover image.
 
3. If you are going to do a flying person I think you are really going to need a custom skeleton and animations. The easiest way to achieve this would be to find a civ 4 unit that does this (if there is one) and import it along with its animations. Deliverator has a tutorial on how to do this. There is currently no way to edit civ 5 animations that I am aware of.

Probably not quite what you need, but there is a flying Witch model in Civ 4...
 
Hmm, I'll have to look those up. LeeS, I do remember mention of that mod a while ago, but I can't remember which one it is either right now.

bouncymischa: Thanks for the lead! Amusingly, that could theoretically work perfectly for one other idea I have. However, I would still need to figure out how to make a new skeleton plus animations for my existing plans. :/
 
Thanks for the link, Nomad or What!

I've kind of resigned myself to the fact that whatever I do will be a lot of work regardless at this point, haha. The stuff I do might not be all that popular, nor am I all that well known, but I simply can't bring myself to making a bunch of average Civs just to get more stuff out there. I wouldn't be happy with it, and any topic I'd choose to work on deserves better than that.

I have many more plans for other Civs, but I can't imagine they'd be all that interesting with just the relatively simple ideas I have, so I haven't moved on them until I get a better idea for something interesting. At least with this upcoming idea, if I can get this to work, I feel it would be extremely fun and definitely a change of pace from normal Civs. Yeah, it's a ton of work, but hey, Holo was a ton of work too, haha. Holo's Lua was my very first foray into Lua script writing, and that hasn't stopped me from making it work somehow. If nothing else, I'm proud of my stuff.

Random tangent aside, I wasn't aware that Blender would be the program used for making these animations. I mean, I know Blender is capable of it, but jeez, after every other guide requiring me to install 16 different programs for one function each, I figured animation was yet another one.

Just to make sure though, are the animations actually created within Blender, or are you recommending that guide as more of an 'Introduction to animation" which I then carry over to another program?

As of currently, I'm still working on getting the required programs (details about which versions I need and are supported are sketchy, since ideally I want to install the latest versions, but not everything works with them) and my first priority is still to try and import the Witch model BouncyMischa mentioned, as well as rigging my custom model to it.

Unfortunately, I haven't had a huge amount of time to look into all that, so I'm still stuck there, but I'll hopefully have some time the next couple days.

As well, if Wolfdog says that Civ5 animations are not editable, I suppose my workflow would be similar to what I asked about in the other thread by Civitar: I'd need to create a "Civ4" animation file (a *.kf file?) and then follow the process to import said "Civ4" animation into a Civ5 gr2 animation file. I don't remember if Blender did those filetypes though, at least not without the Blender NIF scripts.

Amusingly at least, that time you helped me with the trigger files has actually come in handy now, as the *.ftsxml files aren't quite as scary as some of the directions for using Blender... But this will likely come way later after I actually get the animations created.

Am I off-base with anything yet?

EDIT:
Also, looking at that guide and the subsections it has, since I'm converting a model from other sources, I assume I can safely skip the Modeling section?
I have no idea if the Materials and Lighting section is useful either, since I'm not sure that Civ animations require independent lighting.
That seems to leave me at starting off with Rigging, and the whole 'Building the armature' section.
 
As well, if Wolfdog says that Civ5 animations are not editable, I suppose my workflow would be similar to what I asked about in the other thread by Civitar: I'd need to create a "Civ4" animation file (a *.kf file?) and then follow the process to import said "Civ4" animation into a Civ5 gr2 animation file. I don't remember if Blender did those filetypes though, at least not without the Blender NIF scripts.

I think if I remember rightly they are only editable with the proper granny software which costs a lot of money.

Blender 2.4 with nif scripts does import the .kf files then export it as a br2 open in nexus buddy and save as a gr2. But no such luck for 2.72.

Good luck.
 
I see.

That's for if you want to edit the Civ5 animations, right? Civ4 animations use something else?
On a brief look, it seems like the *.kf filetype was also used for Oblivion modding, so hopefully that leads to more guides and information and stuff about how that works.

At the least, deliverator's guide for importing Civ4 units into Civ5 does mention that you can convert the Civ4 animation files into gr2's for use with Civ5, so that's what I'm looking to aim for if it's not possible to edit Civ5's gr2 animation files directly.

I believe my first step is to follow Nomad or What's previously-linked guide to build a new skeleton. After that I'll try and play around with animations.
 
I see.

That's for if you want to edit the Civ5 animations, right? Civ4 animations use something else?
On a brief look, it seems like the *.kf filetype was also used for Oblivion modding, so hopefully that leads to more guides and information and stuff about how that works.

At the least, deliverator's guide for importing Civ4 units into Civ5 does mention that you can convert the Civ4 animation files into gr2's for use with Civ5, so that's what I'm looking to aim for if it's not possible to edit Civ5's gr2 animation files directly.

I believe my first step is to follow Nomad or What's previously-linked guide to build a new skeleton. After that I'll try and play around with animations.

If you want to import animations, it is best to find a game that uses .nif files with .kf animations. The NifTools website has a list of games that use them. If you are creating them from scratch you can simply just build them in Blender.

Important things to consider:

-Create a base pose and always start and end the animation in that pose. Otherwise, your animations will "skip" when they transition between animation cycles.

-Ensure if you are importing bones that you consistently rename them. So if you are using another units animations for the new unit you are making you will have to rename them accordingly. If all of your animations are borrowed from the same game you may be fairly safe in that regard. Also, remember the base pose!

-Bones without mesh will still animate but will not be visible in game (my wraith unit is a perfect example of this). However, mesh without a bone weight assignment will give you errors when exporting.

-keep the keyframes as SIMPLE as possible. Set your keyframes for the beginning/end poses for ALL bones (same pose!), then move the skeleton to your desired action and insert a keyframe as desired in your timeline ONLY for the bones that you have moved. Test the animation. If it does not move as smoothly as you like, tweak the offending bones at various points in the animation sequence until you get the motion you are wanting. Keyframe ONLY the bones you move.

Hope this helps.
 
Thanks for the tips!

But, er, doesn't Civ4 use nif and kf files?
When I talked about importing animations, I mainly meant that to get new animations into Civ5, it seems like we have to make and go through Civ4 as a middleman, even if it is quite a roundabout method.

As of right now, the set of animations I'll be importing are from that Witch set BouncyMischa linked. This will be more like 'practice' at importing Civ4 stuff into Civ5 than anything else, although I feel I can probably use those animations. It should set up the framework for me to repeat this process with my own animations, leaving the final part as "creating Civ4 animations."

To your point of the bones and meshes appearing in the game, though, a quick question there:
I, ideally, wanted my animations and model files to be fairly generic, such that different models would have different weapons, even if they would follow the same animation in the end.

What happens, for example, since I noticed that the Musketman gr2 had two separate weapon meshes, if I add in let's say four different bones, each mapped to four different weapons, but depending on which animation set I'm trying to make, I use a different weapon? Will the other weapons sort of just appear in the air in-game?

I'm trying to figure out the best way forward there, since largely the major animations would be the same, but the "arm movements" will be slightly different depending on which weapon I am trying to animate for.

Sorry if that was tough to understand, but I'm not entirely sure how to ask this, haha. If you need me to be more specific, I can try to explain again.

Otherwise, is there any way to check how many frames are needed for each animation? I'm not sure if Civ5's effects are hardcoded, or have any assumptions made about the length of animations, or if you can do whatever you want.

I also assume that if you want the entire model to shift around in the plot, you'd make the pose, and then move the entire model around? (I haven't yet looked at specifically how this works, so apologies if these are odd questions.)

Blender 2.4 with nif scripts does import the .kf files then export it as a br2 open in nexus buddy and save as a gr2. But no such luck for 2.72.

Whoops, must have missed this edit of yours last night. I did notice that the Blender NIF Scripts don't work for Blender 2.74. Found that out after an hour and a half of headaches wondering why it wasn't showing up. I do have Blender 2.49b available, but I suppose it's just me wanting to use the latest versions (because bugs and whatnot.)

However, it seems like at least for this part, I'll need to use 2.49, and i think it would allow me to bypass a couple steps from the older guides regarding using Nifskope to export to OBJ and all that.

As well, I assume there are no issues with passing *.blend files between the two versions? Basically import with 2.49, save as a blend, then open it in 2.74 in order to work on it, save as blend, load it back in 2.49 and export as KF whenever I get the animations? Or must the animating be done in 2.49?
 
Top Bottom