Using BVH

Topics: User Forum
Feb 1, 2007 at 6:34 AM
I tried pulling the latest source, from changeset 17349, and attempted to follow the brief instructions from the wiki.

I am getting various warnings about animation being checked against my model, and certain bones missing (wrong names) -- which is to be expected (I need to tweak the stuff to match the Daz3D characters.)

What's not working from the wiki instructions:
1. There is no public constructor for AnimationController that takes only two parameters. I tried changing the private constructor, to public but then...

2. When I use my instance of AnimationControll, and call .Animations.Add() as in the example, "a" -- the ModelAnimationCollection collection has no "Name" attribute -- I substituted just a straight up string for the name of the animation.

Am I doing something horribly wrong, or perhaps someone hasn't been committed to CodePlex to make those wiki instructions good?

Feb 1, 2007 at 3:25 PM
Edited Feb 1, 2007 at 3:28 PM
You'll have to check with Michael on this one. I was also under the impression that you can't create a new model if it doesn't start off with animation info atm.

I would do a quick fix for this but I'm making a much larger change right now (ability to split up animations in processor via xml file; ability to use a helper gui to create the xml file by stepping through animation; ability to set animations on a per-bone basis)
Feb 1, 2007 at 10:51 PM
mcortez, please don't be so impatient about Wiki documentation correctness - this is just an early version of documentation and it needs much improvement.

You are right about constructor and "Name" property. The correct code should be something like this:

 Model model = content.Load<Model>("bear");
 AnimationController c=new AnimationController(game, model, 0);
 ModelAnimationCollection a = content.Load<ModelAnimationCollection>("bear_walk");
 c.Animations.Add(a[0].Name, a[0]);

I've updated Wiki. By the way, you can write comments straight to the Wiki page instead of forum - this would be easier to track.
Feb 1, 2007 at 11:31 PM
It's not about being impatient. Some instructions were posted, I tried to follow them, they didn't work. I assumed I had either done something wrong, or that the instructions were for a version of the code that wasn't committed (yet.)

Thus I asked. I wasn't complaining.

Library looks great, I just haven't been able to do much with it, since none of the FBX files that I'm looking to use have animation data in them. When I saw what looked like instructions being posted, that didn't specify animation information to the AnimationController constructor I was thrilled... It never crossed my mind that it was pseudo code.

Keep up the good work!