POST QUESTIONS/BUG REPORTS HERE

Topics: User Forum
Coordinator
Nov 18, 2006 at 11:35 PM
Post here if you find any bugs or have any questions on how to use the component.
Dec 13, 2006 at 11:28 AM
Hi,

I tried using your simple demo and it works fine with your bear_walking.X and bear.jpg however i get this error when i tried a skinned mesh with 6 bones:

Building content threw Exception: Failed to parse System.Single at token number 41216
value: MeshTextureCoords
Surrounding tokens:
,0,0,0,0,0;{PDX01-Default}}*MeshTextureCoords{977;0.500000;1.000000;,0.750000;1.000000;,0.791667;
at Animation.Content.XFileTokenizer.Throw(Type type)
at Animation.Content.XFileTokenizer.NextFloat()
at Animation.Content.AnimatedModelImporter.AnimatedMeshImporter.ImportMaterial()
at Animation.Content.AnimatedModelImporter.AnimatedMeshImporter.ImportMaterialList()
at Animation.Content.AnimatedModelImporter.AnimatedMeshImporter.ImportMesh()
at Animation.Content.AnimatedModelImporter.ImportNode()
at Animation.Content.AnimatedModelImporter.ImportRoot()
at Animation.Content.AnimatedModelImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAndLoadAsset(BuildItem item, BuildItem requestingItem)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetViaCache(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, ITaskItem[] sourceAssets, TaskLoggingHelper msbuildLog, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates)



the associated texture was a .dds which may be the root of the problem. just ask if you want me to post / upload the .X and .dds i ran the test with.
Coordinator
Dec 13, 2006 at 7:23 PM
You'll have to email me the file (david_astle@hotmail.com) for this one.

;{PDX01-Default}}*

Looks suspicious.
(the asterisk always denotes where the parsing fails)
Coordinator
Dec 14, 2006 at 5:01 PM
Thanks for emailing it.

I found the problem and fixed it; will upload new source code later today and email you an update project so you don't have to recompile it yourself. The model will then load and render correctly.
Coordinator
Dec 14, 2006 at 9:40 PM
Source code uploaded and email sent.
Dec 21, 2006 at 4:38 AM
In my project im trying to use animated meshes, and non-animated meshs. Could you tell me if theres functionality in your component, or the XNA framework that would allow me to determine whether or not the .X file that I would like to load / have loaded, has an animation in it or not?

Right now, I just put a try catch around the call :

try
{

AnimationController ac = new Animation.AnimationController(this, tmpModel, 0)
'its an animated mesh
}
catch
{
' its not an animated mesh
}


However, if the component fails to load an animation or throws an exception during the load, it does not free and unhook it self from the base class for that model.
Dec 21, 2006 at 5:41 PM
Hi, I'm having some trouble with some models (.x files) exported from Studio Max (using Panda exporter) and Cinema 4D...
The files look OK in DirectX Viewer...
I'm using the "simpleDemo" example, and works fine with the bear_walking.x and tiny.x, but with my own animated models I just get the blue screen with nothing in it...
I'll e-mail you one simple .x file that I'm tring to use.

Thanks
Coordinator
Dec 21, 2006 at 9:24 PM
It works fine with the latest source code, so you can either wait for the next release or compile the source yourself. The demo wasn't build from a stable release.
Coordinator
Dec 21, 2006 at 9:25 PM
In response to dj:

It's assumed that the programmer knows which models he wants to animate and which ones he won't. Under what circumstances is this a problem?

Dec 22, 2006 at 1:35 PM
OK, I'll try it
Thank u
Dec 29, 2006 at 5:53 AM
In response to dastle who was responding to dj:

Quote: "It's assumed that the programmer knows which models he wants to animate and which ones he won't. Under what circumstances is this a problem?"

That assumption is fine for small projects where "the programmer" is doing everything, but breaks down on larger projects where there are multiple artists handling models that the programmer never interacts with directly. I would agree with dj that its important for the code to be able to discover whether a model has an animation without having to pay the cost of catching a thrown exception.




Jan 1, 2007 at 12:20 AM
I have ported a HalfLife model with animations (run, jump, walk, idle, die..etc) and tested with your animation library.

It works AWESOME!!! Thank you...!

Now for my silly question... I started to "tweak" your shader code to experiment with a few effects in combination with the bone animation.

In the "Skin4" I added the following line before the return (I also pass game time to the parameter "Time"):

output.position.y += sin(Time * 0.008) * 0.3;

This works perfectly and gives me the desired "bounce / floating" effect.

When I try to do the following to get a "wavy" effect:

output.position.y += sin(Time + output.position.y) * 0.3;

I get the following exception when the code trys to execute the mesh.Draw:

"Both a valid vertex shader and pixel shader (or valid effect) must be set on the device before draw operations may be performed."

It seems that so long as I place only constants into the "sin" function all works well but as soon as I try to put "output.position.x y or z" into the sin it causes the above exception.

Any idea on what is causing this?

In the DX EffectEditor I'm able to test both and they work fine but not in this animation project.
Jan 5, 2007 at 12:29 AM
Just downloaded the latest release... bit confusing now with the 2 dll's so I'm not sure if I even have it setup correctly. I have the project reference set to animation.dll and the content pipeline assembly as animation.content.dll.

I tried a simple boned object but get this error (see below)... I am guessing it maybe a mapping coordinate issue but I don't understand the importer process. Does anything jump out as being obviously wrong?

Thanks for your help, and this animation controller (when I get it working)

Error 1 Building content threw Exception: Failed to parse System.Single at token number 110223
value: 0.588000
Surrounding tokens:
;0.000000;;TextureFilenameDiffuse{"REDRUST2.png";}}Material09Default{*0.588000;0.588000;0.588000;1.000000;;72.000000;1.710000;1.710000;1.710000
at Animation.Content.XFileTokenizer.Throw(Type type)
at Animation.Content.XFileTokenizer.NextFloat()
at Animation.Content.XModelImporter.ImportMaterial()
at Animation.Content.XModelImporter.XMeshImporter.ImportMaterialList()
at Animation.Content.XModelImporter.XMeshImporter.ImportMesh()
at Animation.Content.XModelImporter.ImportNode()
at Animation.Content.XModelImporter.ImportNode()
at Animation.Content.XModelImporter.ImportRoot()
at Animation.Content.XModelImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAndLoadAsset(BuildItem item, BuildItem requestingItem)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetViaCache(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, ITaskItem[] sourceAssets, TaskLoggingHelper msbuildLog, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates) H:\XNAProjects\3DRocketShips\3DRocketShips\Content\Models\animrocket.X 3D_RocketShips
Developer
Jan 5, 2007 at 12:48 AM
In Solution Explorer, select your model, then in Properties select Content Importer=X File - XNA Framework.

This will tell the pipeline to import your model with Microsoft's importer.

I know this is confusing. We should probably look for a way to make custom importer not a default for newly added models as Microsoft's X importer is probably more reliable.

About DLLs: yes, you did your setup of DLLs correctly.
Jan 5, 2007 at 2:25 AM
To LeeC22:

Is your model export from 3DS Max? The default material name may cause the error. Try to rename the material name to start with alphabet (i.e. delete the "09" at least), and you can pass of it. Could any developer correct this bug?

By the way, is the library tested with X files exported from Max? I am struggling with another error "IndexOutOfRangeException" from Animation.Util.InterpFrames(). Since I cannot get the source code successfully (Click to download but always return a "Zero Sized Reply" error from browser... poor), I cannot peek to the source to exactly locate what the problem is. Could anyone help?
Jan 5, 2007 at 10:35 AM
mnikonov: thanks, I think I have it set to the animation importer, I'll change that, thanks.

justinlg: I'll give that a go, thanks... it's a bad habit I have of not renaming the materials, one to change I suspect.
Developer
Jan 5, 2007 at 6:27 PM
If you export from MAX then I suggest that you try exporting to FBX.
Latest version of Animation Library supports FBX with Microsoft's default FBX importer.

All existing X format exporters in MAX are less reliable then FBX.

Don't forget to grab latest FBX plugin for MAX (plugin is free):
http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=8299784

Coordinator
Jan 5, 2007 at 7:39 PM
It should be compatible with 3DS max, and I have tested it with a number of 3DS exported models. If your model isn't working, would you mind emailing it to me at david_astle@hotmail.com?
Jan 8, 2007 at 9:49 AM
I posted some models (FBX and X by kWXport) in the another thread. You can have a look on them at:

http://www.yourfilelink.com/get.php?fid=255566

Thanks!
Coordinator
Jan 9, 2007 at 6:42 AM
Ok, I'll have a look tomorrow.
Jan 9, 2007 at 6:18 PM
Here's a minor bug I found when using the X File content importer... references to texture files with spaces in their filename don't work ;) I got an error saying XNA couldn't find the resource "front", when the texture is actually called "front screen2.tga"; changing the filename and the reference in the .X file fixed the problem. Just thought I'd mention it!
Jan 10, 2007 at 2:19 AM
Hi guys,
Hate to be the bear'r (soooo cheesy) of bad news... but the bear_walking.x model isn't loading (or drawing?) correctly with version 3 of the component.

If needed, I can upload a screenshot (or even the source that I'm working with, which is just the AnimationDemo Solution/project just prior to version 2.5).

Thanks,
Terry
t.roshto@gmail.com
Coordinator
Jan 10, 2007 at 9:48 AM
Yes, there is a critical bug in version 3.0 and we are aware of this. Thanks. I've archived the 3.0 version.
Jan 10, 2007 at 6:30 PM
I get this error everytime i try to run the examples given with the 4 Alpha versions.

Error 1 Cannot find importer "AnimatedModelImporter". C:\Documents and Settings\astrid fremin\My Documents\Visual Studio 2005\Projects\SimpleDemo\SimpleDemo\bear_walking.x SimpleDemo

Thanks for your work :)
Jan 10, 2007 at 6:50 PM
Sry haven't seen the threads just added today
Developer
Jan 16, 2007 at 9:52 PM
I just realized that LeeC22's error is probably caused by the fact that the model is in binary .X format.

Error 1 Building content threw Exception: Failed to parse System.Single at token number 110223
value: 0.588000
Surrounding tokens:
;0.000000;;TextureFilenameDiffuse{"REDRUST2.png";}}Material09Default{*0.588000;0.588000;0.588000;1.000000;;72.000000;1.710000;1.710000;1.710000
at Animation.Content.XFileTokenizer.Throw(Type type)
at Animation.Content.XFileTokenizer.NextFloat()
...

I was getting same kind of errors when trying to import binary .X models with David's custom .X importer.

The solution for this problem ccan be

a) convert model to ascii .x format

or

b) use Microsoft's .X importer


Jan 16, 2007 at 11:29 PM
What's the best way to convert to ascii? Do you know? Thanks!
Jan 17, 2007 at 1:55 AM
dastle, Is there a 4th version coming out with a fix or is there a work around?

(I'm basically trying to use the bear_walking.x file, using "X File - XNA Framework" for the Content Importer, and "Model - Animation Library" for the Content Processor)

Thanks,
Terry
Coordinator
Jan 17, 2007 at 11:52 AM
Yes, but we have to decide on some issues. The latest two code checkins are incompatible in a variety of ways.
Developer
Jan 17, 2007 at 1:48 PM
Lots of issues addressed in latest changeset.
With Microsoft's importer, animation now shows correctly for complex models (in particular, the blockeater.x, jurman_skin.fbx, and bear-walking.x models work correctly).
Jan 18, 2007 at 3:13 AM
hey guys, I compiled the 16440 release of the source and the animation on the bear_walking.x file seems really really jerky. Ya'll probably already noticed this by know, but I thought I'd post just in case.

Thanks,
Terry
Coordinator
Jan 19, 2007 at 5:49 AM
In the previous change set interpolated animations were taken out. I'm working to reintegrate that feature.
Developer
Jan 19, 2007 at 4:36 PM
Interpolations added with latest changeset. Now bear walks just fine with Microsoft's importer.

With custom .X importer, the bear animation is not working yet. More debugging needed to find out why this happens.

Jan 28, 2007 at 6:40 AM
I'm trying to animate a FBX file that does not contain any animation information, with a BVH file.

I added the Animation.dll and Animation.Content.dll to the project and content pipeline areas.

When I add a BVH file to the solution explorer, it does recognize it as:

Content Importer: BVH - Animation Library
Content Processor: Animation - Animation Library

But when I go to compile I get:

Error 1 Building content threw FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Single.Parse(String s, NumberStyles style, NumberFormatInfo info)
at Animation.Content.BvhImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAndLoadAsset(BuildItem item, BuildItem requestingItem)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetViaCache(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, ITaskItem[] sourceAssets, TaskLoggingHelper msbuildLog, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates)


The BVH file I am using is from bvhfiles.com (simple quick registration, email only) -- Free BVH -- Walking -- WalkNormal.zip

Direct Deep Link may work : http://bvhfiles.com/walking/WalkNormal.zip



Suggestions?

Also, once I've got past this, what's the next step? Do I simply do:

controller = new AnimationController(this, aiko_model, "007"); // WalkNormal contains 007.bvh

Thanks!!!
--
Mike Cortez
Coordinator
Jan 28, 2007 at 11:51 PM
Thanks for the report, I found the bug and fixed it.

To load it, use
ModelAnimationCollection animations = content.Load<ModelAnimationCollection>("my bvh file");

Actually, right now, if a file has no animation info, I think the controller will crash. This will be fixed very soon, however, along with the addition of allowing animation at a per-bone level.

So, you'll have to wait a day or two to use bvh animations in an fbx file that contains no animation info.
Jan 29, 2007 at 7:51 AM
Hey Dave What am i doing wrong.
I'm using the kilowatt .x exporter and when i use place my .x model in your project i get it to load and display fine. I've used my model in all three of your examples by simply inserting it as an asset in the place of the one that is already there. But when i try to create my own project xna express crashes when i try to run the program ( the build succedes though). I even coppied all of the code from one of your game1.cs files into a newly created project file's game1.cs. I've included all the animation dlls and set up my project settings identicle to how the examples are set up? Could you help me out?

It seems as though I'm having the trouble on this line:
protected override void LoadGraphicsContent(bool loadAllContent)
{
if (loadAllContent)
{
// Load the model, Create a viewer, and store a reference to its controller
Model model = content.Load<Model>("creature");
-----------ModelViewer viewer = new ModelViewer(this, model);
controller = viewer.Controllers0;
}

// TODO: Load any ResourceManagementMode.Manual content
}



System.Exception was unhandled
Message="Model contains no animation info; the tag is not an instance of Dictionary<string, object>. Please use the \"Model - Animation Library\" processor or a subclass."
Source="Animation"
StackTrace:
at Animation.AnimationController..ctor(Game game, Model model)
at Animation.AnimationController..ctor(Game game, Model model, Int32 animationIndex)
at Animation.ModelViewer.Add(Model model)
at Animation.ModelViewer..ctor(Game game, Model model)
at worm.Game1.LoadGraphicsContent(Boolean loadAllContent) in C:\Documents and Settings\Clayton Tye\Desktop\animation_test\worm\worm\Game1.cs:line 85
at Microsoft.Xna.Framework.Game.Initialize()
at worm.Game1.Initialize() in C:\Documents and Settings\Clayton Tye\Desktop\animation_test\worm\worm\Game1.cs:line 69
at Microsoft.Xna.Framework.Game.Run()
at worm.Program.Main(String[] args) in C:\Documents and Settings\Clayton Tye\Desktop\animation_test\worm\worm\Program.cs:line 14
Jan 29, 2007 at 1:26 PM
hi,

I was just wondering what exporter / model program you used to create your models. Also a list of those exporters you know your library has trouble dealing with. Many thanks and keep up the good work :)
Coordinator
Jan 29, 2007 at 3:01 PM
You need to add the Animation.Content dll in the content pipeline tab of the project properties.

Then you need to select Model - Animation Library as the content processor.
Coordinator
Jan 29, 2007 at 3:02 PM
I have yet to encounter a .x file that is imported by microsofts importer and doesn't work with the library, so any exporter that exports to .x should work fine.

.fbx files, on the other hand, are another story. For some reason, about 30%ish of fbx files don't quite work, and debugging this is next to impossible since there is no fbx viewer.
Coordinator
Jan 29, 2007 at 3:05 PM
Oh yeah, with that said, the microsoft .x importer seems to have trouble with maya exported .x files. However, the kilowatt .x exporter for 3ds seems to work great, as well as milkshapes .x exporter. Blender doesn't really have a universally functional .x exporter, and it has no .fbx exporter at all.

I believe maya can export to .fbx and export the animations to .bvh, which should work fine.
Jan 29, 2007 at 3:47 PM
thanks for the quick reply and info cheers
Jan 29, 2007 at 8:08 PM
About .x exporter for Milkshape, wich one did you tried ? There is 2 :
- DirectX 8.0 file
- DirectX (JT)

I tried both on an .ms3d animated model

http://www.psionic3d.co.uk/gallery/displayimage.php?album=2&pos=9

Im using the DirectX SDK (June 2006) viewer to view the resulting .x files.

for the first exporter I got Headless dwarf !!! and for the second there simply too many options, and all the combinations that I tried didn't give me a good animated dwarf !

Can you please tell me how can I export it to .x ???
Coordinator
Jan 29, 2007 at 8:21 PM
Well, the microsoft importer doesn't like it because the normals are ridiculous and the animation data has no scale component, but is split into keyframes. I loaded up my importer, and it works fine, so I guess I'll put that back into the library.
Coordinator
Jan 29, 2007 at 8:30 PM
Haha, love the animation by the way :)!
Jan 30, 2007 at 1:02 AM
psionic's free models have great animation sequences to open in Milkshape3D, export to .X files and test with the Animation Component. http://www.psionic3d.co.uk/gallery/thumbnails.php?album=2

Ive played with both the Milkshape3D X file exporters and the "DirectX 8.0 File..." exporter works fine for most cases (remember to put in something around 160 for the frame offset to slow down the animation). The "Direct X 8.1 (JT)..." exporter gives gaps in the models as it doesnt seem to connect all vertices to assigned faces.

On that same line, Milkshape3D exports the entire animation sequence as a single X file AnimationSet. psionic uses a common technique of having multiple animations in a single file and giving the frame info assignments for each animation. Currently I dont see a way to have the AnimationController treat a single AnimationSet as multiple animations with frame info flags (and really I dont think it needs to).
But I havent found a tool to break the frames out into separate AnimationSets for .X files, and I wasnt able to figure it out with a text editor (I need to do more research on the format). If anyone knows a way to do this it would help me out (might have just figured it out while writing this).

I am also doing some more research on your code to break out some of the pet peeves I have (ie overloading the model draw function and hiding it in the Animation.dll, I personally would rather have single model Animation update and render commands put into the Game.cs Update() and Draw() functions). Once I get a better grasp on the inner workings, I am going to put out more of a graphical tutorial to help users get started. I think a lot of people are missing the point that after you add a model to your project, you need to goto the model properties within the C# IDE and change the content processor to Model - Animation Library. A few pictures are worth thousands of words ... etc, etc

Ive only been at the XNA thing a couple of days now, but your guys' Animation Component Lib is very helpful to fill in a large gap MS left out, and will help get more beginners into XNA 3D development . Props.
Coordinator
Jan 30, 2007 at 1:46 AM

Thanks for the post benco, the models do indeed seem to be very good test subjects. What other pet peeves do you have, might I ask? :)
Coordinator
Jan 30, 2007 at 1:48 AM
A good way to split the animations is to do it in the processor by reading in an xml or txt file that describes the what animations should occur at what time intervals. The processor could then break the animation up according to the xml file.

I might as well implement this, as it's simple enough and doing it in the lib will save people a lot of time.
Jan 30, 2007 at 3:05 AM
Thats really the only peeve I have at this point, and it may not be valid as I havent dug in and gotten the full understanding I want. Ill get back to ya after some more testing.
Coordinator
Jan 30, 2007 at 4:00 AM

Now might be a good time to re-comment the code. About a month ago, when the project was new, it was very extensively commented, but it has changed so much that it seems very sparsely commented at the moment.
Developer
Jan 30, 2007 at 5:56 AM
BVH can be used with both .X and .FBX.
I've posted help on this on homepage of the project. David, is there a way to make this into a separate WIKI page?
Jan 30, 2007 at 6:13 AM
Finally...a have a nice little dwarf with good animations (and with his head too!)

I used the DirectX JT exporter with the following options :
In the Geometry part (left part), the checked options are
- Right Handed
In the Animation part (right), the checked options are
- 'Loop animation'
- 'Spline Positions'
- 'Spline Positions'
And to slow down the animation speed, just put a high number in 'Animation Time Factor' (I used 160)

In the Format part (bottom), select 'DirectX Skin and Bones' to obtain all the parts of the dwarf well connected without holes. And just check 'S&B Templates'.


And of course you have to use the 'X File - Animation Library' Content Processor for this model to load correctly (you have to get and compile the last source code of AnimationComponents library).


BTW dastle, could you please make a Wiki, cause newbies (like me) may have some hints (like the above one), and it will let use share them with others, and as the library changes, it will let us update those hints to match the changes. Cause a forum will become more difficult to search when it grows.
Jan 30, 2007 at 6:57 AM
dastle posted :

"A good way to split the animations is to do it in the processor by reading in an xml or txt file that describes the what animations should occur at what time intervals. The processor could then break the animation up according to the xml file.

I might as well implement this, as it's simple enough and doing it in the lib will save people a lot of time. "

Yes, please if you can implement it, it will save us (heuh me) a lot of time.

Many free animated models (Halflife, Doom, Quake) use this technique to put all the animations in a single file. And as I know, for a specific game (quake 3 for example) the animations and the frames are always at the same intervals (so one could use a single quake3_animations.xml file with all his quake 3 models).

thank you one more time for this very helpful library (without it I could not expect making a 3d game with XNA)
Coordinator
Feb 2, 2007 at 8:17 PM
I made it so that you can split up animations in the processor as described by an xml file. I'll put up a wiki on how to do that before the next release. I successfully split up all the animations for the dwarf model, and since it is a GREAT model for demonstration purposes, I am trying to get permission to use in samples.
Feb 3, 2007 at 9:31 PM
When should we see a new release with multiple animations? and improved compatibility
Coordinator
Feb 4, 2007 at 3:16 PM
Edited Feb 4, 2007 at 3:18 PM
Sometime next week is the best I can say right now. I have an extraordinary amount of real life responsibilities at the moment.

Also, I'll have to create new examples for the new codebase to demonstrate things like mixing a walk and nod animation such that the nod doesn't affect the legs.
Coordinator
Feb 5, 2007 at 5:04 AM
Actually, I got animations working at a per bone level and will check in the source later tonight. Tomorrow I'll try to cook up some examples and make the next release.
Feb 5, 2007 at 5:44 AM
Awesome news!

This is what we've all been waiting for :)
Coordinator
Feb 5, 2007 at 7:05 AM
The good news is I checked in the source and the code works - it is very easy to get a dwarf to run while nodding his head, for example.

The bad news is that finding the optimal design was quite difficult, and I'm not completely satisfied with my design decisions.

Here is what the code looks like to make a dwarf walk with a blended attack motion, and have his head nodding:

controller.RunAnimation("attack2", false);
controller.RunAnimation("walk", true);
RunningAnimation anim = controller.GetBlendAnimation("walk");
foreach (string s in anim.AffectedBoneNames)
{
controller.BoneAnimationss.BlendFactor = .6f;
}
anim.RemoveAffectedBone("head");
controller.RunAnimation("nodhead", new string[] { "head" },false);