Page 8 of 8

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 5:12 am
by David Chambers
@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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 11:20 pm
by Aaron Clark
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 6:58 am
by Anna Beattie
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?

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 12:40 am
by Claire Vaux
Thanks Fore I try it. How I can use this?

Save in ms estension and Run Script?

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 6:15 pm
by Flash
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 4:01 am
by Allison Sizemore
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 3:59 am
by Chloe :)
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

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 12:51 am
by WTW
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

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 5:06 am
by Ruben Bernal
Thank you very much for the suggestion and explanation. Hopefully I'll have time to experiment this weekend.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 9:25 pm
by Euan
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 8:03 am
by Dalley hussain
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?

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 6:10 am
by Flutterby
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 7:13 pm
by clelia vega
@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 :)

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 10:04 pm
by Tha King o Geekz
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);

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 2:58 am
by Jeneene Hunte
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 5:08 am
by Maria Garcia
@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)

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 5:16 am
by Mariana
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. :/

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 11:36 pm
by Lynette Wilson
How can I convert an XML HKX to a normal HKX?

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 10:12 pm
by lisa nuttall
@MoopusMaximus

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

ex. hkxcmd.exe convert -v:WIN32 -i animations\mt_behavior.xml

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 4:01 pm
by Lewis Morel
@The Hologram
You are very careful.thank you.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 4:30 pm
by Jessica Stokes
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 8:51 pm
by Hayley Bristow
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 6:01 am
by Amy Siebenhaar
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.

[REL] Havok Animation Converter, Thread 2

PostPosted: Sat May 26, 2012 11:39 pm
by Courtney Foren
Hologram thanks so much for this tool!

[REL] Havok Animation Converter, Thread 2

PostPosted: Sun May 27, 2012 3:42 am
by Dorian Cozens
Post Limit.