phant0m32 Posted September 7, 2011 Share Posted September 7, 2011 I want create a new handgrip animation that will work for rifles with foregrip attachments in Fallout New Vegas. I would like to create an animation for the 2-hand auto animation type, so I've decided to create a new handgrip animation called "2hahandgrip3" since this animation does not already exist. First I'm trying to learn how to export a working handgrip animation from 3ds Max by using one of the existing animations from the BSA. I started by importing the skeleton into Max, and then I imported the 1st person handgrip animation labeled "2hahandgrip2_22smg.kf" into Max. Then I tried to re-export the animation using the NifTools plugin/exporter. Unfortunately, every time I exported I ended up with a useless/empty .kf file in Nifskope. Assuming(perhaps wrongly) that the problem was the Niftools plugin, I decided to use the Civ 4 exporter/plugin since I use 3ds Max 8. However, when following similar procedures with the Civ 4 plugin, there was an error message during export stating that no animation sequence was defined and the export failed. After some google searches about the error message, I read something suggesting that I use the Civ 4 Animation Manager Utility/Dialogue to define the Actor as the "Bip01" bone. I also set the appropriate starting and ending frames, and set the animation to loop. Then, I exported the 2hahandgrip2_22smg.kf using the Niftools plugin and the resulting .kf file very closely resembled the original imported .kf file in Nifskope. There were some differences however: -The original .kf contains 32 blocks, while my exported version contains 31 blocks. I've figured out that the original .kf has an extra NiTransformInterpolator block associated with something called the "Bip NonAccum". I'm not sure what this is or if I need it... -I've also noticed that if you look at the block details of the "NiControllerSequence", it lists all of the "Controlled Blocks". If you further expand some of these "Controlled Blocks", the original .kf has the "Controller Type" entry filled in with the string "NiTransformController". However, in my exported .kf this entry has been left blank. These were the only differences I was able to discern between the original .kf and my exported .kf. Perhaps these differences are not significant, or perhaps there are other differences I'm not aware of. To test my exported animation, I named it 2hahandgrip3.kf and placed it in meshes\characters\_1stperson in my FONV game directory. Next, I created a test mod using the GECK to verify if my new .kf would work in-game. I modified a two hand automatic weapon, the assault carbine, by changing it to use HandGrip3 in the GECK form for the weapon. Then, I saved the mod and loaded/tested it in-game by equipping an assault carbine weapon in 1st person perspective. However, there was no change in the way my character gripped the weapon... my .kf file had no effect at all. To verify that my exported 2hahandgrip3.kf file was actually the source of the problem, I decided to make a copy of the original(from the BSA) 2hahandgrip2_22smg.kf and rename it to 2hahandgrip3.kf. I also modified this .kf file using Nifskope and changed the "NiControllerSequence" block name to HandGrip3. Then I placed this .kf in meshes\characters\_1stperson and tried my test mod once more. This time, when I equipped an assault carbine in game I noticed that the handgrip animation was different. This tells me that something is wrong with the process I'm using in max to set-up/export .kf files since the file I exported had no effect when used in-game... but the re-named original .kf from the BSA worked when used with the 2HA HandGrip3 slot. I've attached the .kf I exported and the original .kf from the BSA with this posting in a .rar file. The .kf from the BSA is called 2hahandgrip2_22smg.kf, while the .kf I exported is called 2hahandgrip3.kf. My hope is that someone will be able to notice any significant differences between the two files... which in turn could hint at what I'm doing wrong when setting-up/exporting animations from 3DS Max. Link to comment Share on other sites More sharing options...
Ghogiel Posted September 7, 2011 Share Posted September 7, 2011 (edited) -I've also noticed that if you look at the block details of the "NiControllerSequence", it lists all of the "Controlled Blocks". If you further expand some of these "Controlled Blocks", the original .kf has the "Controller Type" entry filled in with the string "NiTransformController". However, in my exported .kf this entry has been left blank. Yeah that is an error you can fix that in nifskope, they should all point to the right controller type me thinks. Which will all be transform controllers in this instance. Also if you haven't, dl and run your KF file through the KFupdater app. but appears your anim is the right version so you must have done that if that was exported with the civ4 plugin. However if you look at your txt keys in the nif, you haven't set up the note tracks right it seems or something went goofy there, the txt key is trying to start an animation called :name EMPTY_SEQUENCE_AT_1f That sequence name doesn't exist. just change that string to "start" and add in the missing data under controller type and see what happens. The reason why niftools exports empty kfs for you is because you haven't defined the sequence start, name, cycle in the animations graph editor note tracks. If you don't define the start and end, you'll get zip. I don't think you should do this, but worst case scenario you could just replace all the nitransformdata blocks in the vanilla kf with the ones you exported :whistling: Edited September 7, 2011 by Ghogiel Link to comment Share on other sites More sharing options...
phant0m32 Posted September 8, 2011 Author Share Posted September 8, 2011 Yeah that is an error you can fix that in nifskope, they should all point to the right controller type me thinks. Which will all be transform controllers in this instance. By error, do you mean its something I did wrong... or is it something that always occurs with the Niftools exporter? I hope its something I did wrong so I don't have to manually type in the data after every export.... However if you look at your txt keys in the nif, you haven't set up the note tracks right it seems or something went goofy there, the txt key is trying to start an animation called :name EMPTY_SEQUENCE_AT_1f That sequence name doesn't exist. just change that string to "start" and add in the missing data under controller type and see what happens. That strange sequence name was assigned by default by the Civ4 animation manager utility (not the exporter... I'm exporting with Niftools) I used. Good catch though, I never noticed that in the text keys. After changing the string name to start and manually typing the missing data for the controller type, the animation finally seems to work in game. Thanks so much for these suggestions Ghogiel! :thumbsup: The reason why niftools exports empty kfs for you is because you haven't defined the sequence start, name, cycle in the animations graph editor note tracks. If you don't define the start and end, you'll get zip. I'm very new to working with animations in 3ds max and in general. I think I've figured out how to add the start/end note tracks using the Track View - Dope Sheet interface after some google searches. But I can't figure out how to name the sequence or set it up as a cycle through the graph editors/track views. Is it too much to ask for some guidance about how to do this? Link to comment Share on other sites More sharing options...
Ghogiel Posted September 8, 2011 Share Posted September 8, 2011 (edited) Yeah it's an niftools error for the missing controller type. It does it for me too. IIRC the KFupdater utility will fill that in if you run the kf through it. When you type in the text for the note track for start, write this without quotes um... "start -name MySequenceName -loop" Change MySequnceName to your actual sequence name. "Open", "Forward", "Stagger" etc. Sequence names are case sensitive. Change loop to clamp if wanted. (but if you use the kfupdater you have to fill that in anyway so..) Note this is kinda pointless to set up if you use the civ4 animation manager, the niftools exporter will actually benefit from setting it up in within the civ4 animation manager, and I recommend using the civ4 manager instead of messing with note tracks, but it's all good to know this stuff. :thumbsup:. And in fact I actually would recommend using the civ4 plugin for the export as well, just use the kfupdater tool to update the exported kf version to fallout consumable type, AFAIK the niftools plugin still only exports linear curves so when you tweak any keyframes in the curve editor it gets ignored. tbh you can force it with additional keys, and I haven't messed with it in a while to check that I'm not talking s***, but niftools exports are limited to transform controllers and morph controllers as well. the civ4 exporter will allow you to get other controller types out, and other types of animation data other than NiTransformData, meaning you can animate in max and get NiBoolData or NiFloatData, so animated alpha/texture/materials all the good stuff, but you will have to juggle things to make use of that exported data, it's not directly usable becuase of the way the Fallout version nifs index nodes, but the numbers in the animation data are all there, and lets face it, it is entirely easier to animate in a program designed for the task than it is in nifskope. Even though the civ4 exports particles, they won't be usable directly, but if the set up is complex it might be useful to do and recreate that system in a fallout version nif by hand. :thumbsup: Edited September 8, 2011 by Ghogiel Link to comment Share on other sites More sharing options...
phant0m32 Posted September 8, 2011 Author Share Posted September 8, 2011 (edited) Thanks for the reply, you really know your stuff Ghogiel. It sounds like I should get that kfupdater program. It also sounds like the Civ4 exporter is a better choice. I hate to keep asking noob questions, but I'm having another small problem. Now that I've learned how to export usable animations, I'm starting to actually create a unique handgrip animation. I can get my animations to export, but they wont immediately function in game because they lack some kind of "priority" data. I assume this priority value is related to bone priorities and how the game determines which animations to play. In Nifskope, if I look at the NiControllerSequence => Controlled Blocks the "priority" field for my exported animation is empty for all of the controlled blocks. How can I create/input this data in 3ds Max for my animation so I don't need to enter it post-export? Edited September 8, 2011 by phant0m32 Link to comment Share on other sites More sharing options...
Ghogiel Posted September 8, 2011 Share Posted September 8, 2011 (edited) Yep priority is bone priority. And yeah I have no idea how to set that up in max. With the gamebryo tools I believe you would set that up in the animation tool. which is an external app. It's just a number from 0- 100. so that data is easy to input by hand. Also the kfupdater requires this field, I think you can set up a bat file where you can specifiy per bone priorities, I just set the global one and edit any ones by hand in nifskope Basically in game animation these are used when more than one animation is played at the same time. This allows animation blending to happen. for example your Idle animation will have low bone priority, so other animations get called, which have a higher priority, so it gets overridden. If the priorities are the same then the bones move to an intermediary position, the bone get equal influence so it kinda blends so the position is in the middle somewhere now imagine a run animation, your arms are swinging from side to side as you run, like normal right. but at the same time you are doing other things, like firing or reloads, the bone priorities on the arms bones for that firing animation are higher allowing those bones to be overridden and controlled, but priorities for the legs are low, or non existent for lack of controlled blocks altogether, so the legs are still moving as you'd expect, because the run animation still has full control of them the other way of animation blending relevant to gamebryo is also done in the txt keys. they are called morph tags in the civ4 animation manager, which is actually exactly the official gamebryo, but has custom export script for that particular game, scripts which you can probably edit actually now that I think a about it.... hmm.. anyway yeah they are just txt keys basically. look in the walk/run forward animations and you will probably see a tag, I think they are named mt:L or something off the top of my head, but can be labeled anything I expect. basically that denotes the actual keyframe the animation will blend with another animation that has that same txt name key, this is so when the character transitions from run to walk, the character doesn't suddenly skip from left forward to right foot forward during the transition and the animation is forced to blend at particular keys, you can have more than one morph tag between animations and as soon as the next key holding a tag is played then that corresponding key you specified in the called animation is where the animtion starts at. apparently, traditionally, character animations start out with left foot forward. Now they have all this cool mirroring and special scripting in the state machine that do all this matching transitions, we'll see that with havok behaviour tools in skyrim. :cool: Edited September 8, 2011 by Ghogiel Link to comment Share on other sites More sharing options...
phant0m32 Posted September 8, 2011 Author Share Posted September 8, 2011 Thanks again Ghogiel. You've been extremely helpful, detailed, and patient in explaining everything. You're a real asset to the modding community. Kudos. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now