Freedom Reborn

Freedom Force Forums => Technical Issues => Topic started by: Randomdays on March 16, 2021, 09:46:18 AM

Title: Possible breathrough on importing Keyframes
Post by: Randomdays on March 16, 2021, 09:46:18 AM
As a lot of people here have done, I'm trying to get of hold of animation and keyframes. especially with importing from other games.

Most of the games I've worked with don't have multi action kfs, but break them up into individual sets - an idle kf, a death kf, etc.

I've tried importing a rigged mesh with its kfs into Blender and trying to animate and got no animation. I've tired exporting each separately, rename them to FF standard, and the character viewer crashes.

I did some modding for the original Neverwinter and imported a bunch of static buildings into the game from nifs with no problem, but I remembered there was a lot of things with animation I never tried.

I re-installed GMax 1.2 and found the nif import/export scripts for it online. After importing an Elephant from EE2 with its idle kfs, I got a couple of errors, but the elephant loaded and animated!

It seemed to focus in on just the head which just bobbed up and down. I tried different means of exporting, set to FF, - exporting the nif by itself worked, exporting both together gave me a larger nif with the kf's built in, and the third way that exported successfully gave me a seperate nif and kf.

Nothing worked with character viewer, but with nifskope with the combine nif/kf file, it animated  - the head and tail both moved!

What i don't know how to do is get the combined nif/kf out of nifskope as seperate items, or how to get the seperate items into nifskope to work together.

If that can be figured out, maybe a large kf can be built up from each individual one. At least we could have something like the Elephant do simple motions instead of being static. It would mean no more re-rigging for anything imported from another game.

So, looking for people who have some skill with either gmax or nifskope to do some experimenting. I'm going to try some nifs from some other games, and FF, to see if I get the same import errors with GMax.

I can send the various  import and output combos over to experiment with.

RD

Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 17, 2021, 10:47:48 AM
Update - good and bad.

I tried importing a Civ 4, EE2 and EE3 nif with kf to Gmax and they all imported with errors. They animated but were distorted.

I went back to Blender and tried importing an EE3 Barbarian with KF's and he worked! Using the frame by frame I could watch him walk.

Exporting them as separate items - the nif was fine but the kf gave an error with nifskope. Exporting them as a combined single nif with the KF embedded in the FF mesh worked fine - I could watch him walk in nifskope as well.

Opening the EE barbarian in nifskope and then adding the kf in also worked, but you can see that the kf's are very different than FF.

So I'm almost there - what I would need is someone who knows nifskope to look at the files in there and see if they can get the kfs out of the nif, or get the converted kf to play nice with the Character Viewer and game.

Failing that, the only thing I can try next is to try to find an old version of Max that has nif scripts - the nifs were originally written with max, so that should work.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: spydermann93 on March 17, 2021, 10:27:02 PM
Sounds like you're making great progress, RD!

Unfortunately, I don't even know where to begin to help by looking at the KF files. I've done very limited editing, but I've no clue what the errors would be. Anything specific popping up or does it just error out?
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 18, 2021, 10:38:15 AM
Hey Spyder.

I just found out that you can load a nif into nifskope and then using the "spells > animation" menu at the top, load in the kf's as well and see the mesh animate in nifskope.

The error I'm getting when trying to loading the kf's is "this is not a normal .kf file; there should be only NiControllerSequences as root blocks."

Doing some more checking though, I'm getting this on almost any FF kf, including male_basic, so I don't think this is a problem anymore.

Looking at the exported, simple walk kf in one nif window and male_basic in the other. they look the same, but it just won't animate when renamed to keyframes.kf.

I added an attack animation in with the walk , and the character viewer shows the two choices, but nothing happens, similar to when you load the wrong kf in.

In Blender, animation works when you go frame by frame, so I know all's good there. If I export the mesh with the kf imbedded, he animates fine.

Last thing I did was I found a  trial copy of Max 8 and installed it. The meshes/kf import fine with no error, they animate ,and they export fine - but the max kf's make the character viewer error out.

At this point I'm back to running out of things to try. Anyone who wants the mesh and some kfs to experiment with, let me know.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 18, 2021, 09:19:06 PM
Well, the erroring out problem turned out to be something simple - each set of animations in the kf have a label. IE melee 1, walk, fly, etc. The exported kfs didn't have the label, but it was an easy change in nifskope.

Still no animation, but I'm thinking that the nif scripts have been around for a awhile and should be good, so I think it must be me. I'm going to see if I can do some Google searching, but my thought now is that the files are good, but instead of grabbing a whole set of frames, maybe I'm only grabbing a single frame. the exported kf's are only about 16 k in size.

You can convert the mesh/ skeleton, etc by just importing/ exporting, it looks like the kfs won't work that way.

I thought i saw somewhere when poking about that you have to do extra work like creating a scene in the editor. I'm going to give it a little more research and testing before giving up and moving to something else. there might be some help from the forums of other games like Morrowind or Civ 4 on how they do their custom content.

RD

Edit - just found this walkthru that might be useful - http://wiki.tesnexus.com/index.php/Creating_character_animations (http://wiki.tesnexus.com/index.php/Creating_character_animations)

Also, just found that on the niftools site that there are new nifscripts for newer versions of Blender.
Title: Re: Possible breathrough on importing Keyframes
Post by: windblown on March 18, 2021, 10:39:11 PM
Hey Randomdays,
I'd like to take a look at them. I'll send you my email address.
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 18, 2021, 11:38:56 PM
Thanks Windblown.

I'll send them your way when I get home.

Doing a little research, it looks like I'm probably wrong about the single animation frame theory.

The link I put up though has a step where you select the scene root (skeleton/armature) before exporting the kfs. This could make a difference if it ties the skeleton to the kfs for animating on export. It'd be great to do one simple change and seeing the nif moving around in the Character Viewer.

The link also has a few of its own links to more help with animation and other modding topics.

There's also the news that there are different nifscripts out for newer versions of Blender which might make a difference.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 19, 2021, 11:24:24 AM
Well,

No luck using the setting from the link.

Tried downloading a newer version of Blender (2.79) with new nif scripts - errors out. 2.8 and 2.9 won't run on my laptop with openGL

I tried importing the EE3 Barbarian and walk kf's and exporting them as Civ 4 and that works fine in nifscope. - opening the nif and then adding the kfs.

Maybe its just a problem with FF?

I looked at some of the archives from FR from about 2008/9 and it appears that they were using Max 3-5 about with "official" scripts.

RD

Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 19, 2021, 09:22:00 PM
Sent some files to Windblown.

I was able to dig up Irrational's official exporters, but they won't work with the Max 8 Trial I found. Tried to find a trial for Max 3-5 but no luck there either.

I think I'm about stalled out and out of options. Anyone got an old Max 3-5 disk or trial out there?

As far as I can tell from reading the FR archives, all the original "greats" that created the keyframes we use - Val, Yellow Lantern, Gren, Tommyboy, etc, used the official Irrational plugins with Max 3-5.

To anyone's knowledge, has anyone made a working FF set of keyframes with Blender, Gmax or the nifscripts version of scripts with Max?

If its never been done, maybe it can't be done.

RD

Edit - Oh, One thing of note - The nifs with the embedded kfs seem to work in FF. This could have some use for map items - A waving flag, swaying sign, maybe even a rotating ferris wheel, merry go round, etc.
Title: Re: Possible breathrough on importing Keyframes
Post by: windblown on March 19, 2021, 11:09:35 PM
I've just sent you an email  :)
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 20, 2021, 02:13:08 AM
Serendipity strikes.

I was flipping over to bring some buildings into the game and still thinking about the kf issue, when I started thinking that maybe I was being a bit nearsighted with FF.

Since it appeared the process worked with Civ 4, maybe it would work with FFvTR?

I pulled out my disks and stated installing i,t and checked here and saw the note from Windblown. Checking my email, he was able to get the files to work - by converting them to FFv3R!

I'm trying to duplicate the process, but if I can't maybe he'll be willing to do a bunch of imports and help out.

The kfs still wouldn't work just by converting them - it took someone who knew how to work with keyframes to do it

Yay Windblown!

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 20, 2021, 07:19:33 AM
Checking what Windblown had done, I tried it with an EE3 War Elephant. It DID animate, but all over the place as if the weight painting was off (probably me). It is a complex nif with a lot going on. I'll try something easier next.

It looks like EE3 and Civ 4 will work. Blender doesn't like the EE2 kfs at all, and (big letdown) Dark age of Camelot uses kfa's, not kfs.

Wildlife Park 2 looks like it will work - the kfs are multi-action like FF/FFvt3R. The animals seems to all have walk, run, attack, idle and death animations. Most have other animations like walk back/side, rest, swim, etc.

Zoo Tycoon 2 - Doesn't use kfs at all for some reason. Uses xml files called bfms.

Sid Meier's Railroad - I didn't see a lot that would be useful, available or not.

Morrowind, Oblivion and Fallout 3 - I've got them but not easily available at the moment. Anyone with these, check the files and see if they use standard nif/kfs.

I don't have Pirates, but if anyone does, please check it.


Also, if anyone knows anything about other engines that have animations that Blender can handle, check them out. I'm thinking that maybe the Unreal Engine, which has games which include DC Online.
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 20, 2021, 10:17:00 AM
I found a Kraken in a custom mod for Civ 4. I converted its nif and idle kf to FFvt3R and, using the kfs that Windblown sent me as a guide, tried to match the data input.

Happily, it worked fine! There's a little breakage in the mesh but the animation is smooth.

(https://i.postimg.cc/xd5dhLy2/Kraken-1.jpg) (https://postimages.org/)


I then went back, converted the attack kfs and using nifscope, joined the 2 kfs together, and that worked as well.

(https://i.postimg.cc/3RwwTWnD/Kraken-2.jpg) (https://postimages.org/)


For now, the attack is a looping animation like the idle one till I find out how to make it one cycle only.



Wildlife Park 2 may not work after all, which would leave just Empire Earth 3 and Civ4, but luckily they're both massive games with lots of Units.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 20, 2021, 06:15:53 PM
Working on the Kraken and things are going well.

At present, he's big enough to easily gobble up a man and tangle with an elephant, but not big enough to take on a ship.

The attack animation is now non looping.

Added in animations for pain, melee idle and walk.

From the animations provided, I scan still add death and run. The other animations are variants of those so I'm not sure if they need to be included - die fade, run die, and run die fade.

The die animation just have him not moving, while the die fade has him sinking to the bottom.

From those who are active with FFvt3R, are there any other required animations? I know I could copy and rename the pain for stunned if needed.

Edit - Thinking about it, with these imports, they'll be limited to whatever animations are provided with it, so that might be an issue if the game requires something and its not there. I might have to just use renamed copies of existing animations to cover.

After the Kraken and the Barbarian I started with are done, I'll look again at the WP2 Crocodile. While exporting the large multi animation kf didn't work, if I split it up into lots of single kfs in nifskope by deleting all but on animation in each, that might work.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: spydermann93 on March 20, 2021, 07:49:54 PM
Very nice progress, RD!

Can't wait to see what happens next!
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 21, 2021, 12:14:03 AM
Thanks Spyder

Finished adding all the available animations for the Kraken. Everything looks like its working well and playing nice.

I added a new folder on the mega site I'm using named "FFvt3R Keyframe Iimports" and uploaded it there.

https://mega.nz/folder/bxoATQBA#zhsyE8hp1uwMeDk7r17BcQ (https://mega.nz/folder/bxoATQBA#zhsyE8hp1uwMeDk7r17BcQ)

Everyone feel free to download and play around with it.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 21, 2021, 03:59:57 AM
Finished up the EE3 Barbarian. Total animations wound up to be 2 melee attacks, idle and melee idle, fall forward and back, and walk and run.

These direct kf imports might actually be of limited use due to their few kf choices, and the fact you won't be able to use nfskope to add animations from any other set of kfs.

I'll be loading up the mesh in a couple of minutes as soon as I package it up and put it on the Mega site and everyone can check it out as well as the Kraken. That makes one successful import each from Civ 4 and EE3.

RD

Edit - Had to redo both meshes as I had forgotten to put the bounding boxes on. If you've downloaded them, please delete your old versions and grab the new ones instead.
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 21, 2021, 07:05:25 AM
Wildlife Park 2 Imports update - tons of great animals that can be imported, but also takes extra work to get to work.

1) When you import to Blender, you get everything but the mesh. To get a complete import, I have to import/export it thru the Max 8 trial I found.

2) Doing so gets everything into Blender, but seems to mess with the rigging a bit.

3) It looks like Blender can't handle the large, multi action kf which is like FF/FFvt3R. I'm having to copy/paste each individual action into a temp kf and then rejoin them after conversion.

I uploaded a beta of the crocodile with 3 animations - idle, melee and walk, to the Mega site. You can see the problems with the midsection when the mesh is walking.


I'm asking for a mesher's help, if there are any out there, to help with fixing the rigging problem. For now, I'm going to try to get the large kf through Max 8, and then concentrate more on unrigged map items, and rigged items from Civ 4 and EE3 if that doesn't work.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 22, 2021, 03:58:39 AM
Good and Bad with Wildlife Park 2;

It looks like for some reason, Blender will not import the main mesh on these animals. I tried going thru nifskope and exporting as obj or dae, and then into Blender, but not all the information is transferred.

Importing/ Exporting with the Max works. But with with the crocodile and a test elephant, with the walk animation, I can see that the midsection on each is out of whack.

These nifs also use a "grid" mesh to control the main mesh, and I have no idea how to work with this.

The kfs for the game though have more animations compared to Civ 4 and EE3 - so they would be more useful for FFvt3R.

Since I only started with a 30 day trail on Max 8, I'll convert a bunch and put them to the side until a mesher steps up to lend a hand.

For Civ 4 and EE3, I think I'll concentrate on the non human nifs, since these would be harder to find "donor" meshes to convert to. The human ones would probably

be more useful to transfer them over with the old way of binding them to a standard FFvt3R mesh to get the full range of animations

I think this thread is about done - all further updates will probably in the releases area, but I'll keep an eye out for comments here.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Tomato on March 22, 2021, 05:02:23 PM
So I've been keeping up with this, haven't really had time to really delve in and offer help, but I wanted to say this: this is legitimately exciting stuff and I'm so happy to see it.

Getting animations made has always been the big hurdle (I legitimately cannot make any animations in max, I go through nifskope for any edits I make) and if this gives us more tools to play with that's pretty groundbreaking.
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 22, 2021, 09:47:26 PM
Thanks Mato.

I think the main help I would like now is someone who can work with the WP2 meshes to get them to look better in game. The crocodile is up on the Mega site if you want to look at it.

Looking at what I think are the minimum required animations and what's missing. I think the flailing forward and back, landing/get up forward and back, and maybe dodge left and right, would have to be faked.

For the Spider I'm working on at the moment, is there a way to move the direction the mesh is animated? If we could rotate run 0 degrees, I could make the run into a climb, which would be neat

RD.
Title: Re: Possible breathrough on importing Keyframes
Post by: Tomato on March 22, 2021, 10:51:12 PM
For the run, worst case you can just do it in nifskope. You just need to find the control for the main bone/handle for that animation and rotate it, plus potentially tweek the position, but it's absolutely doable.
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 22, 2021, 10:58:47 PM
(Edited)

Thanks...that would be normally the spine then? and all the other bones would follow?

Another thought... the kfs animate by moving the bones in the armature by their name to different positions. If I went into a mesh from another game and renamed each of its bones to match the names of the bones for say, "male_basic", would the kfs for male basic then work on it ?(after using the scripts to make the mesh the right version for FFvt3R)



Also, I went ahead and installed my Oblivion disk and looked at the files. The animations are separate kfs which could probably be worked with. Strangely, the skeletons/armatures are kept in separate directories from the meshes. The meshes are weight painted, so it might be simple as putting them in Blender together. The meshes are also split into pieces, IE the Ogre has separate head and body meshes.

Even if they work, I don't know if they would be a good fit as the detail is so much higher than FFvt3R.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 27, 2021, 12:02:10 AM
Update - The Giant spider is done and came out looking pretty good. I haven't tried to make the climbing animation yet though.

Since I haven't heard from any meshers willing to help, I went ahead and took a look at the crocodile. It looks like just a few vertexes are assigned to the wrong body part - IE a stomach part assigned to a leg. I'm going to  see if I can edit him into looking better as he moves. The Elephant will probably be the same. Not sure why the import process is doing this.

I'm going to try to focus on new material that doesn't have good animations/ kfs in FF/FFvt3R already - mostly animals.

To do list - crocodile, elephant, giant scorpion, squid and octopus, a bear, some dinosaurs, a snake mod from Morrowind if I can get it work, a dragon.

WP2 with all the addons has quite a few to pick from, even though they will be the hardest to import. I'm still having to go through Max first before Blender.

There's a lot of fantasy/ LotR units, but I'm going to try to stay away from most of those and keep with units that would more likely show up in a Superhero Comic, like the above, as well as doing some map items like buildings and vehicles.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 27, 2021, 09:15:02 AM
The beta of the Crocodile had been replaced with a much better final version. Although its still not perfect, it took a lot of tweaking to get it where it is.

If you downloaded the beta, delete it and replace it with this one.

Also, couldn't figure out the direction change for the Spider climb animation for the Giant Spider, so uploaded it without for now.

RD

Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 28, 2021, 12:43:49 AM
I just finished setting up the elephant in game.....

(https://i.postimg.cc/g0wzzLbQ/elephant.jpg) (https://postimages.org/)

They animate and fight in game just fine, but there's still a few issues I have to work out, not just with them , but all the other new animals as well.

1) When knocked out, the elephant falls down but then goes back to the idle animation.

2)I'm not seeing the  melee animations - might be a naming problem.

3) At first, I couldn't select the character. Just putting a collision and selection box with the mesh isn't enough - I have to join them to the armature in nifskope by importing it from another mesh and then resizing in Blender. Doable, but will take time for all the animals, plus probably I'll have to check the recent vehicles I did as well for FF.

For now, consider all the recent uploads as betas till things are worked out.

RD
Title: Re: Possible breathrough on importing Keyframes
Post by: Randomdays on March 28, 2021, 06:09:52 AM
These have gone as far as I can take them I think. I've tried them all in the rumble room without error.

1) All imported animals have working selection and collision boxes as far as I can tell.

2) The spider, kraken, crocodile and elephant now will lie down and stay there when knocked out till fading away. The barbarian still gets back up again.

3) It looks like the contact distance for a melee attack is a little greater than it should be.

I'm going to start a release thread for these and any other creatures that wander into the game.

Comments still welcome here. I'll keep an eye out for any help offered.

RD