This has been a daunting task for me but I'll try to share what I know and maybe that will help you.
So, nomatter what road you go down (either using fancy controllers and hand-animating or using a biped rig loaded with a BVH) it all gets baked down to linear keys at the end because it appears that's all that NWN can understand. There are lots of different approaches to exactly how that conversion is performed. The "Bake Anims" in NWMax is just one way to do it. I've also exported to FBX to bake the controllers and used a couple of homebrew MaxScripts to bake out the Character Studio rigs as well. Depending on what the controllers are, you're going to have to look for a baking process which works best with them. You might also puzzle over some elements of
this very old post (pre NWMax, IIRC) which maybe hints that there are (non-Biped) controllers which can be baked down to rotation keys only (but by what method they meant remains a mystery), which is what I'd be shooting for based on what I know so far. They might have been talking about a baking process performed by the official BioWare export scripts/plugin or something else (maybe even a function inside Max). If for some reason you find yourself needing KeyManager and AttributeKeyer (which are mentioned in that thread) I think I have copies of them floating around somewhere.
Animators like NinjaWeaselMan and every other animator I've either been able to contact or learn about have all done their animations by hand even when it looked good enough to be mocap. He
talks about his process for creating the animations starting about 38 minutes into the podcast and it goes on for about 5 minutes. I bring this up because in my hunt to tame BVH files one of my first tasks was to find out if anyone else had done it before. It doesn't look like it.
Ok, so that's hand animating and controllers and baking things down. You can probably get pretty far if you're good with setting up your rig and the animations you're looking to get in-game are something you can make yourself. I was pleasently surprised what a good HI-IK rig can do after watching a video which showed how to rig with it but I'm usually too busy to get lost in hand animation.
Now for the fun part! Biped!
Using Biped to get something out to NWN is a nightmare and you probably already know that by now, LOL. In trying to bend this damned thing to my will I had devised three milestones in using a Biped rig with a single BVH loaded on it:
1. Export a biped rig converted to editable mesh and bake the Biped keys into linear position and rotation
2. Same as above but with a series of animations (producing the smaller animation list subset of a "creature", basically)
3. All of the above, plus a zillion more animations converted into a phenotype OR developing a successful method of replacing individual player animations seamlessly with ones from BVH files.
I was only able to get the first part achieved by using "Biped Dumper" (look
here for it). That's a slightly newer version than I was using so it may work even better. There's a chance that's not the right script but it jives with what I've got in my MaxScript directory. If it fubars for you let me know and I'll do more digging.
So with that you make your Biped rig, load a BVH onto it, turn on in-place mode so the model doesn't go traipsing around (i.e. leave X/Y 0-ish of the model base), run biped dumper and then you should be able to figure out where to go from there. It's not pretty but pretty doesn't matter: It's all about those animations. If you know what you're doing, that'll basically get you an animated dancing (or whatever) skeleton placeable.
At least milestone 2 is technically possible using the above method if you want to throw the time at it to start stitching those animations together, assuming you have the BVH animations to support walking, running, fighting, etc and assuming that you can make decent "bookend" (neutral pose/bind pose/whatever you want to call it) frames for your animation so NWN (hopefully) plays everything back correctly.
Ok, let's stop right there for a sec. Just like I said there were more than one way to bake animation keys, there's actually a better way to do all this, but I wasn't able to actually execute it. Hypothetically, there's a much more elegant solution and one which also should allow you to make a phenotype much more easily, and here it is:
1. Create a custom .fig file for Character Studio whose pivot points match pmh0's pivot point locations and which also matches the pmh0 skeleton, including being named correctly (i.e. torso_g, rhand_g)
2. Create a custom .mnm file so importing the BVH animations maps the animations correctly onto your new skeleton. This is not a perfect approximation but it's going to look something like
this. You can just open it up in a text editor. Notice how you're going to have to make some tradeoffs and tradeoffs mean cleanup, probably in the Curve Editor. Now, if you know how to interpolate the rotations (for instance) of several different objects into a new, single, object then you could take a regular Biped rig (or one with only minor changes) and use that conversion process to "blend down" the animations to the NWN skeleton. I have no idea if such a thing is even possible.
If you can get that part achieved you'll basically have a NWN-friendly Biped rig which you can load BVH anims onto, dump them to something usable, and turn around and export them to NWN.
I'm no expert but when I see you talking about the assemblies and list controllers I'm thinking you may be getting hung up on a problem (in regards to Biped rigs with BVH anims on them, at least) which isn't something you have to deal with. However, as with everything in Max, there are always multiple paths to get to the same finish line. I came to my own conclusions about what was the absolute shortest path from beginning to goal and those conclusions might not have been authoritative.
I am busy but I might have some time to work with you to develop either a technique, a MaxScript interface, or both in order to make it possible to realize BVH->NWN and share that with the community.
Modifié par OldTimeRadio, 18 février 2011 - 12:10 .