[REL] Havok Animation Converter, Thread 2

Post » Sun May 27, 2012 6:12 am

@fore, thanks for the assistance. I'll look in to what I can but do need some info. I thought my tool would put out a warning when it did non-uniform conversion of scale but I will have to double check that.
Hologram, only in Prometheus' case it could be non-uniform scaling, if any. My and Cherry's scaling (converted modded animations) is always uniform, oscilating or contstant.
User avatar
Monika
 
Posts: 3469
Joined: Wed Jan 10, 2007 7:50 pm

Post » Sun May 27, 2012 1:04 am

If I try to feed a XML file HKXCMD created right back into it, it claims: “File is not loadable”. Maybe I am doing it wrong?

For a vanilla walking animation, I use the command: “hkxcmd convert mt_walkforward.hkx” and get mt_walkforward-out.hkx in XML format. I rename it to mt_walkforward-xml.hkx and then use “hkxcmd convert -f save_default mt_walkforward-xml.hkx” to turn it back into packed binary. Hkxcmd sais: “File is not loadable”.
User avatar
Evaa
 
Posts: 3502
Joined: Mon Dec 18, 2006 9:11 am

Post » Sat May 26, 2012 10:03 pm

Regarding the convert, you may be right. I now recall encountering some parsing issues on loading some of the XML files. I may be being a little paranoid as I was doing some extra checks and the havok utility says the file is not loadable but might still be convertable.

I know AssetCC2 is much better at format conversions.


@fore, I'm not ignoring your problem exactly. I've pulled up the code (it doesn't warn about non-conforming scale like I thought) but have not made much progress since the code is pretty straightforward.

Does it behave any different if you do not compress the hkx during export? The only major assumptions I know of are that the tracks are ordered the same as the skeleton. The file seems to follow those assumptions. One thing I can think of is that there is some issue with how I playback the spline sampling but seems unlikely. There was a comment in the code from Havok that users of the sampling should normalize any rotations since they do not from that routine. I will try doing that though I think I renormalize anyway at one point or another in niflib.

Unfortuately, it looks like updates to nif.xml have broken my copy of niflib and its ability to export valid kf files with hkxcmd. I'll need to fix whatever broke and start debugging after that but currently I'm stumped. Its obvious that I must be missing something with regards to sampling animation using the havok tools.
User avatar
Lil Miss
 
Posts: 3373
Joined: Thu Nov 23, 2006 12:57 pm

Post » Sat May 26, 2012 7:09 pm

@fore, I'm not ignoring your problem exactly. I've pulled up the code (it doesn't warn about non-conforming scale like I thought) but have not made much progress since the code is pretty straightforward. Does it behave any different if you do not compress the hkx during export? The only major assumptions I know of are that the tracks are ordered the same as the skeleton. The file seems to follow those assumptions. One thing I can think of is that there is some issue with how I playback the spline sampling but seems unlikely. There was a comment in the code from Havok that users of the sampling should normalize any rotations since they do not from that routine. I will try doing that though I think I renormalize anyway at one point or another in niflib.

Unfortuately, it looks like updates to nif.xml have broken my copy of niflib and its ability to export valid kf files with hkxcmd. I'll need to fix whatever broke and start debugging after that but currently I'm stumped. Its obvious that I must be missing something with regards to sampling animation using the havok tools.
Hologram, I see your problems. After all it's amazing that you were able to put this tool together that early. Do you think it could be obsolete after the CK release?

I didn't use any compression except Spline compression. This was part of Saidenstorm's setup which I kept as much as possible, although it would create tremendously oversized hkx. I also tried several other things, like removing spline compression, read bones by file as well in the "Create Animation" filter. But I always see the scale transforms in the re-converted kf.

If there is anything I could help I would be glad to assist.
User avatar
Jeremy Kenney
 
Posts: 3293
Joined: Sun Aug 05, 2007 5:36 pm

Post » Sat May 26, 2012 6:55 pm

Well thanks for checking. I suspect I need to put together some different tools to sort this out. I suspect its just I'm missing something in how I'm supposed to use the havok library it will likely take some time before I make any real progress I suspect.

Edit: I also doubt the CK will have anything in it that will invalidate the need for this tool. Bethesda does not have much of a track record for producing exporters let alone importers or converters.
User avatar
WTW
 
Posts: 3313
Joined: Wed May 30, 2007 7:48 pm

Post » Sat May 26, 2012 5:26 pm

Havoks 2010.2 AssetCC2 tool is making fun of me, I think. It takes the XML file, goes busy for a moment, finishes without any error message but does not generate a output file. *giggles-hysterically*

Ah, well. Guess I'll just leave it to the professionals for now :smile: I don't really know what I am doing anyway.
User avatar
sam smith
 
Posts: 3386
Joined: Sun Aug 05, 2007 3:55 am

Post » Sun May 27, 2012 4:04 am

Hologram, there is another problem with exported kf files. The number of translation keys is always 1 too many.

Like the female mt_walkforward.kf. Stop time is 1.1333. This should translate into 35 keys (1.1333 * 30 +1). But there are 36 for a full blown bone like NPC Root.

Somehow it works with 3DS, because there the frame length is translated into around 155 ticks (should be 160), but that's a pain in the buttocks.
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Sun May 27, 2012 5:37 am

yeah thought there was an issue there. I quickly tried to figure out at one point but seems like there are slightly different timescales. I'll look at that in more detail when I go through the code again.
User avatar
JUan Martinez
 
Posts: 3552
Joined: Tue Oct 16, 2007 7:12 am

Post » Sat May 26, 2012 3:28 pm

Alright, I'm getting the following message when attempting to view my exported HKX animations in the CK: "Warning : Source contains hkxMaterial version 2, but 1 is the current version." It seems likely this is because I'm using the 2011.3 version of the Havok Tools, when you guys have been telling me over and over again that I need to be using 2010.

However, the version of 3DStudio I own is 2012, which means using the 2010 version of Havoc isn't a viable option I don't think. What are my options for a workaround, guys? Even better, what are the odds one of you programmy-types will be able to make a conversion tool between Havoc version 2 and Havoc version 1?

EDIT: Also, to Saiden Storm: I'm using your 3rd Person Female skeleton file to double check my heirarchies, and as the Havoc exporter is informing me, you've got two roots in the scene: your "Camera3rd" object isn't parented to anything. Is that the way it's supposed to be, or is this safe to ignore?
User avatar
Justin Bywater
 
Posts: 3264
Joined: Tue Sep 11, 2007 10:44 pm

Post » Sun May 27, 2012 12:02 am

So now the CK is crashing when I try to look at my exported animation rather than giving me an error. I consider this progress.

I've been looking through the XML versions of two animation files, "H2H_Idle" converted by hkxcmd and my altered hand-to-hand idle, exported by Havok Content Tools 2011.3 from 3DStudio 2012. The most obvious difference between them is in the annotation tracks array. H2H_Idle lists references to objects which are defined further down in the file, while my export defines them right there in the array. Beyond that, the two documents are very similar. I'm going to see what happens if I simply copy the data from the data array from my export to H2H_Idle and repack it with hkcmd.
User avatar
Jamie Moysey
 
Posts: 3452
Joined: Sun May 13, 2007 6:31 am

Post » Sun May 27, 2012 7:19 am

EDIT: Also, to Saiden Storm: I'm using your 3rd Person Female skeleton file to double check my heirarchies, and as the Havoc exporter is informing me, you've got two roots in the scene: your "Camera3rd" object isn't parented to anything. Is that the way it's supposed to be, or is this safe to ignore?

This is not an issue all it means is that your exporting 2 unconnected root hierarchies -> Bethesda set up their actors in preparation for paired animations that one is not.
User avatar
Sunny Under
 
Posts: 3368
Joined: Wed Apr 11, 2007 5:31 pm

Post » Sat May 26, 2012 9:23 pm

Hologram: does hkxcmd have a command to convert an XML .hkf file directly back into a packed file?
User avatar
Ells
 
Posts: 3430
Joined: Thu Aug 10, 2006 9:03 pm

Post » Sun May 27, 2012 3:25 am

In theory but I've been told its not working and AssetCC2 does a better job when it works and that is a tool included in the Havok tools. Unfortunately you need the 2010.2 version and its libraries and you cannot install Havok 2010.2 side-by-side with 2011.X.
User avatar
Elle H
 
Posts: 3407
Joined: Sun Aug 06, 2006 3:15 am

Post » Sat May 26, 2012 11:47 pm

In theory but I've been told its not working and AssetCC2 does a better job when it works and that is a tool included in the Havok tools. Unfortunately you need the 2010.2 version and its libraries and you cannot install Havok 2010.2 side-by-side with 2011.X.

If you have absolutely no option other then using 2011.x then you should install 2010.2 and copy/paste its Havok folder somewhere it will not get overridden then install 2011.x and when you export, export as Packfile - XML then see if you can get the 2010.2 standalonefilemanager or assetcc2 to convert the file to the 2010.2 format so it will actually be compatible with Skyrim.
User avatar
Pat RiMsey
 
Posts: 3306
Joined: Fri Oct 19, 2007 1:22 am

Post » Sat May 26, 2012 6:07 pm

If you have absolutely no option other then using 2011.x then you should install 2010.2 and copy/paste its Havok folder somewhere it will not get overridden then install 2011.x and when you export, export as Packfile - XML then see if you can get the 2010.2 standalonefilemanager or assetcc2 to convert the file to the 2010.2 format so it will actually be compatible with Skyrim.
That's not a bad idea, thanks.

Right now here's where my workaround stands:

Step 1: Export from Max as a KF via NIFTools exporter
Step 2: Convert the KT into an XML HKX via hkxcmd
Step 3: Export from Max as an XML HKX via HCT 2011.3. I had to delete the two camera objects from the scene before doing this: they weren't showing up in the KT version. I hope this won't cause any problems.
Step 4: Copy the "FloatBlockOffsets" and "Data" Arrays from the HKX exported from max via text editor and paste them over those arrays in the HKX converted from the KF. "Data" is the one with the HUGE wall of numbers, and FloatBlockOffset comes right before it. Make sure you grab the "size" field from before the data array as well.

This leaves me with an XML HKX that the Havok Preview Tool, at least, thinks is just fine. The animation is entirely intact (the KF -> HKX animation loses too many bones and keyframes for some reason, and can't figure out IK animation to save its life) In theory, so should the CK and Skyrim, but since I have no way of repacking the file without changing it to the 2011.3 version, there's no way for me to get it there.

The 2011.3 and 2010.2 HKX formats are very similar. Virtually the only change is as I mentioned above, the fact that in the 2010 version the "AnnontationTracks" array is full of [ref]s that point to each track as an object, which is defined later in the document. In the 2011 version, the tracks are defined right there in the array with [struc]s. Since the actual animation is all stored in the "data" array as far as I can tell, a program which converts one to the other shouldn't be hard. (but sadly, I'm not a programmer.)
User avatar
Ash
 
Posts: 3392
Joined: Tue Jun 13, 2006 8:59 am

Post » Sun May 27, 2012 7:07 am

GREAT SUCCESS!

I downloaded the 2010.2 version of the Havoc Content Tools, but did not tell it to install itself to 3DStudio. All I got was the standalone tools, and they didn't even overwrite the 2011.3 versions, so awesome. Upon using the 2010.2 Havoc Preview Tool to save the XML.HKX (created via the method above) as a binary.HKX, the CK and Skyrim gladly accept their new H2H_Idle animation.
User avatar
Kerri Lee
 
Posts: 3404
Joined: Sun Feb 25, 2007 9:37 pm

Post » Sat May 26, 2012 4:50 pm

Glad to hear you got something to work. Sorry to hear it sounds like a bit of work even though the XML conversion is likely quite trivial from what you post. I'll add it to my list of things to do when I have some free time. (i.e. not immediately).
User avatar
lexy
 
Posts: 3439
Joined: Tue Jul 11, 2006 6:37 pm

Post » Sat May 26, 2012 3:56 pm

Glad to hear you going something to work. Sorry to hear it sounds like a bit of work though the XML conversion is likely quite trivial from what you post. I'll add it to my list of thing to do when I have some free time. (i.e. not immediately).
Awesome, that's great to hear. My workaround is working, but it's a pain in the butt, and leaves me with a ton of in-between files, and remembering which HKX is the 2010 XML converted from the NF, the 2011 XML, and the 2010 XML with the 2011 data can be... taxing, lol.
User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm

Post » Sun May 27, 2012 5:49 am

To summarize:
Is it possible to create new animation and add them to the exisiting one?

thx,
User avatar
Lisha Boo
 
Posts: 3378
Joined: Fri Aug 18, 2006 2:56 pm

Post » Sat May 26, 2012 11:36 pm

To summarize:
Is it possible to create new animation and add them to the exisiting one?

thx,
Yes.

It is possible to get the game to play those animations during anything approaching normal gameplay?

Not really, not at this point.
User avatar
sarah taylor
 
Posts: 3490
Joined: Thu Nov 16, 2006 3:36 pm

Post » Sat May 26, 2012 4:44 pm

It's possible. Using papyrus scripting or condition functions.

Honestly it's even the most easy thing to do.

Otherwise i can't manage to export my skeletons. Everytime i load a game with my new skeleton, the game crash. fu.
User avatar
Annick Charron
 
Posts: 3367
Joined: Fri Dec 29, 2006 3:03 pm

Post » Sat May 26, 2012 7:45 pm

It's possible. Using papyrus scripting or condition functions.

Honestly it's even the most easy thing to do.
It is WHAT???

I would REALLY be interested to see some sort of proof, or an example for that.

We have reached consensus here, shared and headed by our honorable Saidenstorm, that it is NOT POSSIBLE to add any new animations ingame. (Without replacing existing ones). And now you tell that?
User avatar
Laurenn Doylee
 
Posts: 3427
Joined: Sun Dec 03, 2006 11:48 am

Post » Sat May 26, 2012 10:35 pm

It is WHAT???

I would REALLY be interested to see some sort of proof, or an example for that.

We have reached consensus here, shared and headed by our honorable Saidenstorm, that it is NOT POSSIBLE to add any new animations ingame. (Without replacing existing ones). And now you tell that?

I sidestepped the problem by using Paired Animations (For Now) to Play new animations but they can never be anything other then Idles because of all of the systems that get disabled when a Paired Anim triggers -> there is also a secondary problem that when a Paired anim gets called on the Player as the second target it locks all anim events except movement and you have to then force reset the players Behavior Graph to get back to normal functions.

As you said there is no way of adding new animations onto the Character Actor without Behavior Tool -> Im not sure WTF he was talking about... You can't conditionalize an animation to play that doesn't exist in the Behavior Graph, and just adding it into the Animations Folder does not make it magically exist so he's either frightfully confused or talking about animation replacers.
User avatar
Kelvin
 
Posts: 3405
Joined: Sat Nov 17, 2007 10:22 am

Post » Sat May 26, 2012 8:34 pm

converting the whole Skyrim - Animations folder ignores the meshes/actors/character/_1stperson/animations directory. what can i do to fix this?

---------

nm i got it. read somewhere that it looks for the skeleton file and then goes to the animations directory in that folder. just replaced an earlier pair of "animations" and skeleton with the ones in _1st person.
User avatar
Red Bevinz
 
Posts: 3318
Joined: Thu Sep 20, 2007 7:25 am

Post » Sat May 26, 2012 8:41 pm

Befoure I embark myself in a no exit tunnel , I woudl like to know if is possible to make the following :


I would like to create a new combat animation hybrid based on both 2h and 1 h and call it 1.5 h weapon animation , this woudl require to make 2 - 5 different sword idles of fighting with the sword type using eventually as base one of the 1h and one of the 2 h and mix together or use them as base alter the middle animation portions and leave unaltered the starting and ending loops ... woudl this work and allow the make use of the transitions between animations of the game or not?
User avatar
Amber Ably
 
Posts: 3372
Joined: Wed Aug 29, 2007 4:39 pm

PreviousNext

Return to V - Skyrim