[REL] Havok Animation Converter, Thread 2

Post » Sun May 27, 2012 5:12 am

@Rongphale: Thanks for that link, it did help me to finally get a somewhat working animation into Skyrim. It isn't perfect though, I typically always end up with a file that's slightly smaller than the original file even when I don't do anything to the animation, but at least it actually has animation data in it unlike my previous tries. So thanks for that :smile:

To the animation experts : A few questions if you don't mind, is it normal for vanilla animations in kf format (even unaltered) to come out of export with some errors? For example, in the jump animation I was using as a test (which I exported unaltered), I was able to get it in-game but the head and hands would sink into the body. Some other animations I've tried also had similar issues where certain body parts would sometime distort during motion. I was just wondering if these kind of errors are to be expected or if there are perhaps some means to prevent them from happening?

Sorry if these questions disrupt the main discussion, I just want to learn a bit more about animations for Skyrim.

I'm facing the same problem. I am using 3DS Max 2012, the 3.7.1 nifscripts, and the latest hkxcmd tool. I import and export into Max following the instructions on the nexus wiki for working with animations. Animations display in the game, but the head, hands, and weapon do pretty random things. The results are different depending on the animation; for instance, mt_walkforward causes the head to collapse into the body, but mt_runforward does not. In both instances I have not altered the animation, just imported it and exported it without editing. I assumed this was do to a problem in my settings, but I haven't had any luck uncovering what I'm doing wrong. I hope this is a common enough problem that someone has worked out a fix, but either way I just wanted to say how much I appreciate the time experienced folks are willing to take to help those of us who are just learning.
User avatar
David Chambers
 
Posts: 3333
Joined: Fri May 18, 2007 4:30 am

Post » Sat May 26, 2012 11:20 pm

I'm facing the same problem. I am using 3DS Max 2012, the 3.7.1 nifscripts, and the latest hkxcmd tool. I import and export into Max following the instructions on the nexus wiki for working with animations. Animations display in the game, but the head, hands, and weapon do pretty random things. The results are different depending on the animation; for instance, mt_walkforward causes the head to collapse into the body, but mt_runforward does not. In both instances I have not altered the animation, just imported it and exported it without editing. I assumed this was do to a problem in my settings, but I haven't had any luck uncovering what I'm doing wrong. I hope this is a common enough problem that someone has worked out a fix, but either way I just wanted to say how much I appreciate the time experienced folks are willing to take to help those of us who are just learning.

Yes, this is precisely the problem I had with too. Typically, when there is little movement in the animation, the mesh would be fine most of the time. But if there are a lot of movements involved, it's usually parts like the head, weapon, or hands that would get distorted. Yet, I have seen certain mod being able to successfully alter animations like jump, spell casting, walking, by modifying the game's own animation, so at least we know it's possible. Unfortunately, the modders I've spoken to either: use Blender, or don't speak English well enough to be able to offer a good enough explanation

Which is why I'm hoping some of the experts here could help shed some light on how to perhaps minimize these issues :smile:

Oh, and bear in mind I'm not using the Havok Tools, since my current aim is to simply modify existing animations, I'm currently just using the hkxcmd tool to convert hkx into kf and back.
User avatar
Aaron Clark
 
Posts: 3439
Joined: Fri Oct 26, 2007 2:23 pm

Post » Sun May 27, 2012 6:58 am

Yes, this is precisely the problem I had with too. Typically, when there is little movement in the animation, the mesh would be fine most of the time. But if there are a lot of movements involved, it's usually parts like the head, weapon, or hands that would get distorted. Yet, I have seen certain mod being able to successfully alter animations like jump, spell casting, walking, by modifying the game's own animation, so at least we know it's possible. Unfortunately, the modders I've spoken to either: use Blender, or don't speak English well enough to be able to offer a good enough explanation

Which is why I'm hoping some of the experts here could help shed some light on how to perhaps minimize these issues :smile:

Oh, and bear in mind I'm not using the Havok Tools, since my current aim is to simply modify existing animations, I'm currently just using the hkxcmd tool to convert hkx into kf and back.
So then, what ARE you using? Not Havok/Max, not Blender. Can you describe which tool you use, and what do you do to change the animation?
User avatar
Anna Beattie
 
Posts: 3512
Joined: Sat Nov 11, 2006 4:59 am

Post » Sun May 27, 2012 12:40 am

Thanks Fore I try it. How I can use this?

Save in ms estension and Run Script?
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Sat May 26, 2012 6:15 pm

I'm facing the same problem. I am using 3DS Max 2012, the 3.7.1 nifscripts, and the latest hkxcmd tool. I import and export into Max following the instructions on the nexus wiki for working with animations. Animations display in the game, but the head, hands, and weapon do pretty random things. The results are different depending on the animation; for instance, mt_walkforward causes the head to collapse into the body, but mt_runforward does not. In both instances I have not altered the animation, just imported it and exported it without editing. I assumed this was do to a problem in my settings, but I haven't had any luck uncovering what I'm doing wrong. I hope this is a common enough problem that someone has worked out a fix, but either way I just wanted to say how much I appreciate the time experienced folks are willing to take to help those of us who are just learning.

Basically, the data created by the KF export from Max is bad and wrong. Here's what I've been doing:

Export from 3DStudio 2012 as a XML HKX using the 2011 version of the Havok Tools. I open that svcker up with a text editor (notepad works fine, but is hard to read) and I transplant the relevant data from my exported file into a copy of one of the XML HKXs coverted directly from the game. The "relevant data" is found in ObjectID="#0003" and is everything from "int name="numFrames" " to the end of the huge-ass array full of numbers.
User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm

Post » Sun May 27, 2012 4:01 am

That's good to know. I have just been using the hkxcmd tool to convert the .kf back to .hkx and then dropping it directly in game. I've downloaded the free tools from havok but haven't installed them yet. Do you have a recommendation for a specific tutorial that I can reference for working with the havok tools and with the XML to get the animation back in working order? I certainly don't expect you to do my homework for me, but a nudge in the right direction would be greatly appreciated. Thanks so much for the help.
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Sun May 27, 2012 3:59 am

So then, what ARE you using? Not Havok/Max, not Blender. Can you describe which tool you use, and what do you do to change the animation?

I use 3ds max 2011 64 bit with the hkxcmd tool to change hkx files to kf and back. My line of questioning began in post no.150 (and subsequent posts) of this thread where I detailed what I intended to do and the difficulties I encountered. Basically, I'm a beginner and all I wanted to try for now was to modify existing animations. This involve simple things like limb repositioning, so that stances or moves would look more the way I like it. Initially, I had problems with exported animations resulting in 1 kb files (even unaltered vanilla animations), this was later resolved thanks to Rongphale's link as it turned out to be export setting issues.

But my current problem, involves trying to minimize mesh distortions that would occur on certain exported vanilla animations, even when they are unaltered. I figured that if I can't find a way to get rid of these issues even with unaltered animations, why bother modifying them at all? So that's what I'm trying to figure out right now.

@Dementor : Well that sounds... daunting :blink: , I guess I'll have to try to get HavokTools first. And this method works for you? I mean it gets rid of most mesh distortion issues on your exported animations?
I may have to get back to you on this.

Thanks for the replies
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am

Post » Sun May 27, 2012 12:51 am

I've created a tool for Havok 2011.3 conversions so people using Max 2011 or Max 2012 can use the havok exporter and convert the animation file through some tools to get the binary pack output file. its a simple converter only to be used with havok tag xml files to convert 2011.3 animation to 2010.2 animation. Its really dumb and cannot do anything more sophisticated that some minor xml transformations but they are enough to fix the examples I was using.
  • Grab hktcnv from the optional portion of the downloads at nexus for hkxcmd.
  • Set up Max export as per Saiden's configuration posted previously in part 1 of this thread.
  • Change the "Write to Platform" command to export in Tagfile and XML format
  • Add an Execute Command from available filters to the export chain
    • Add the following command to convert 2011.3 Tag XML to 2010.2 Tag XML
      • path/to/hktcnv.exe path/to/source_export.hkt path/to/dest_export.hkt
    • Please don't add that verbatim. Obviously fix the paths to be correct for your machine. I can't help you with the specifics as its your machine.
    • You can optionally add the following to the second line to convert the 2010.2 tag Xml file to binary pack file for use in game
      • path/to/hkxcmd.exe convert -v:WIN32 path/to/dest_export.hkt path/to/final.hkx
User avatar
WTW
 
Posts: 3313
Joined: Wed May 30, 2007 7:48 pm

Post » Sun May 27, 2012 5:06 am

Thank you very much for the suggestion and explanation. Hopefully I'll have time to experiment this weekend.
User avatar
Ruben Bernal
 
Posts: 3364
Joined: Sun Nov 18, 2007 5:58 pm

Post » Sat May 26, 2012 9:25 pm

I've created a tool for Havok 2011.3 conversions so people using Max 2011 or Max 2012 can use the havok exporter and convert the animation file through some tools to get the binary pack output file.
Ah, excellent, thanks man! This should save me a ton of time.
User avatar
Euan
 
Posts: 3376
Joined: Mon May 14, 2007 3:34 pm

Post » Sun May 27, 2012 8:03 am

Hi.
I’m grateful that I could use this tool.
I'm very new for modding and not good at English.
I want you to break my faults.

I compared hkx>xml file and hkx>kf>hkx>xml file, both converted by 1.4 tool.
I have not been other than the conversion.
I found the following differences.
sample is mt_jump.hkx

[hkx>xml]
53
1
256
400
x41080000
x3df0f0f1
x3d088889


[hkx>kf>hkx>xml]
52
1
256
388
x410aaaab
x3dec4ec4 -- 0.115385 -->
x3d0b35e1


Is this correct?
User avatar
Dalley hussain
 
Posts: 3480
Joined: Sun Jun 18, 2006 2:45 am

Post » Sun May 27, 2012 6:10 am

I believe some of the shifts in duration and frames are due to a change requested by fore to improve compatibility in animations he used. Quantization is picked by the spline compression algorithm and not something I give control over.
User avatar
Flutterby
 
Posts: 3379
Joined: Mon Sep 25, 2006 11:28 am

Post » Sat May 26, 2012 7:13 pm

@rongphale, bones without a proper rig (which is what we have) svck compared to either biped or bones with a proper rig with IK and constraints. More talented animators will alter the skeleton and add their own tools around it to aide in skeleton manipulation. But they usually do not release their tools. I've dreamed of porting puppets or something to max for easier skeleton manipulation but dont have time to do that kind of project.

Root probably is intended to be the location where feet interact with floor so you probably should change the rotation of other bones up the hierarchy to get what you want.

Ya, thanks for the info. I had a minor success in manipulating that bone, with the help of the Bone Tool in max. It's ugly, but at least I get it done.
There are 2 bones call [NPC] & [NPC root]. What is the difference between those? Sometimes the [NPC Root] bone behaves just like [NPC]. Dragging it around also re-position the whole rigg. Other time, it acts like a pivot point for the skeleton. :(

nice ... if u want a spear model let me know :tongue: ....
May I use it for my horse combat mod? Having a crouched lance feature will be very nice :)
User avatar
clelia vega
 
Posts: 3433
Joined: Wed Mar 21, 2007 6:04 pm

Post » Sat May 26, 2012 10:04 pm

I believe some of the shifts in duration and frames are due to a change requested by fore to improve compatibility in animations he used. Quantization is picked by the spline compression algorithm and not something I give control over.
Ho, ho. That makes it sound like I'm the cause of the problem with an undue request. :smile: But it was a BUG, when hkxcmd created key at every 158 or 159 ticks, while it should be every ONE frame (= 160 ticks in 3DS).

Maybe mirap's problem has a similar cause as the other 2 places you fixed already? In retarget.cpp, line 435, there is a statement
hkReal incrFrame = srcAnim->m_duration / (hkReal)nframes;

but should be
hkReal incrFrame = srcAnim->m_duration / (hkReal)(nframes-1);
User avatar
Tha King o Geekz
 
Posts: 3556
Joined: Mon May 07, 2007 9:14 pm

Post » Sun May 27, 2012 2:58 am

Thank you for your anolysis.
I hope my post will help even a little.

By the way, can I get NoCameraRemove_Build of New Version or NoCameraRemove mode as command line option?
Removing camera had impact at least for jump animation of during sneak.
User avatar
Jeneene Hunte
 
Posts: 3478
Joined: Mon Sep 11, 2006 3:18 pm

Post » Sun May 27, 2012 5:08 am

@fore, Retarget isn't used in this case as its a routine that is currently disabled or at least not used. And sorry to drag your name into the mud. Best guess is its probably the kf->hkx converter and we made a change there that is not appropriate or the max importer is not doing its job.

@mirap, add "-s" to the command line to disable the sibling pruning algorithm (i.e. no camera remove)
User avatar
Maria Garcia
 
Posts: 3358
Joined: Sat Jul 01, 2006 6:59 am

Post » Sun May 27, 2012 5:16 am

I think someone here mentioned either in this thread or the previous thread that they were having to recreate the character skeletons in order to make this stuff work. I think it was SaidenStorm, fore, The Hologram, or that one girl who was making the jiggly briasts mod. (I think it might have been her)
Anyway, I've been having some trouble making a custom race I built playable in game. Every time I select it in the race selection menu, the game crashes. I've gotten a test NPC with a walking animation set up and it works, yet still the game crashes.

I'm thinking that I might be missing some essential bones, nodes, cameras, etc. that are missing from my skeleton.nif that are in bethesda's skeleton.nif

For the record, I currently have all the bones that control where weapons are holstered when not drawn that work fine - granted, I need to find out how to change their orientation so they look less funny. I also have a left hand magic node and right hand magic node as well as a SHIELD and WEAPON bone that I haven't really gotten to test yet. (my test companion never draws their weapon/magic)

I have also yet to make a _1stperson skeleton.nif and .HKX file, which I will try later tonight after I'm done with classes; I've noticed that the _1stperson skeleton.nif is different in that it has three new bones: NPC LookNode [Look], NPC Translate [Pos ], and NPC Rotate [Rot ].

------------------------------------------------------------------------------------------------------------------------------

Edit: Disregard all of the above. Turned out to be some weird problem with my body biped object being selected under first person in the body data tab. :/
User avatar
Mariana
 
Posts: 3426
Joined: Mon Jun 12, 2006 9:39 pm

Post » Sat May 26, 2012 11:36 pm

How can I convert an XML HKX to a normal HKX?
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Sat May 26, 2012 10:12 pm

@MoopusMaximus

Maybe, following option is equivalent to it.
-v:WIN32

ex. hkxcmd.exe convert -v:WIN32 -i animations\mt_behavior.xml
User avatar
lisa nuttall
 
Posts: 3277
Joined: Tue Jun 20, 2006 1:33 pm

Post » Sat May 26, 2012 4:01 pm

@The Hologram
You are very careful.thank you.
User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Sat May 26, 2012 4:30 pm

I don't quite get how animations and behaviors work with each other. I've read things that say you can't perform an action like attacking, jumping, or moving without a corresponding animation to play for that action. But I've made a new race with just some forward walk and run animations, but I can still jump. With attacking though, it's weird. I was able to equip weapons and attack some guards, but the weapons didn't attach themselves to the correct bones and I couldn't seem to control when I would actually attack, and when I did, the attack sounds would play very rapidly. It would also start the attack again every time I started moving in a different direction.

And spells just won't do crap for me at all >:/
I'm considering making a new thread for this.
User avatar
Jessica Stokes
 
Posts: 3315
Joined: Fri Jul 28, 2006 11:01 am

Post » Sat May 26, 2012 8:51 pm

From the documentation:
Behavior: A composition of states, transitions and logic defines a behavior for a character. This is the aggregate set of responses, reactions, or movements which can be made by a character. In HBT behaviors can be blended together as well as nested within one another.

Behaviors typically define how you transition from one animation to another if you have a chain of animations. Or how to blend more than one animation together at same time. It also defines specific events, sequences and properties that can be bound and used by the engine while the animation is playing.

I haven't the time to invest in this heavily at the moment so that is about the extent of my knowledge.
User avatar
Hayley Bristow
 
Posts: 3467
Joined: Tue Oct 31, 2006 12:24 am

Post » Sun May 27, 2012 6:01 am

I tried importing a converted KF file of a horse animation, and my horse turned into a pile of goo in the middle of my 3ds max viewport...am I doing something wrong?

Edit: Actually I seemed to have gotten it working. I imported the Skeleton first with no Skin modifier and import skeleton, then the mesh with the Skin modifier but no import skeleton, and then it worked.
User avatar
Amy Siebenhaar
 
Posts: 3426
Joined: Fri Aug 10, 2007 1:51 am

Post » Sat May 26, 2012 11:39 pm

Hologram thanks so much for this tool!
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Sun May 27, 2012 3:42 am

Post Limit.
User avatar
Dorian Cozens
 
Posts: 3398
Joined: Sat May 26, 2007 9:47 am

Previous

Return to V - Skyrim