Animating FBX

Topics: Developer Forum
Nov 4, 2008 at 12:13 AM
Has anyone been successful at animating an FBX file? The docs say that FBX is supported. But, whenever I try to assign an animator, I get the following error:

"Entry point was not found."

Here is my code:

ModelAnimator enemyAnimator;

Model enemy = content.Load<Model>("enemy");


enemyAnimator = new ModelAnimator(this, enemy); <--- This is where I get the error. It complains about "enemy".

The "enemy" model loads perfectly. I can see it in my screen, I can scale it, move it, rotate it, etc... But, when I try to call it in the "new ModelAnimator()", it blows up.

Any suggestions would be greatly appreciated!

Thanks in advance,
ProxyProdigy
Nov 4, 2008 at 12:16 AM
Sorry. When I went back to the forum index, it showed that I posted this twice. Can someone please delete the other post? Thanks...
Nov 6, 2008 at 6:25 PM
>>enemyAnimator = new ModelAnimator(this, enemy); <--- This is where I get the error. It complains about "enemy"

Are you sure you are processing the "enemy" model with the proper model processor?  Sounds to me like you don't have animation tag information on the model.  You should take a look at the model's data structure in the debug window to make sure it has tagged info attached to the model.
Nov 17, 2008 at 12:36 AM
I'm using the Model - XNA Framework as the processor. How do I check for the tags for the data structure?
Nov 26, 2008 at 5:45 PM
I'm not sure for .FBX, but for .X files (Same functionality with fbx more or less) you have to use the Content Processor: Model - Animation Library
I'm pretty sure that using the Model - XNA Framework as the processor, is the cause of your problem because the model is not loaded as an animated model.
Feb 20, 2009 at 11:56 AM
Sorry. I know this is a little late. I had lost the link to this site and finally stumbled upon it again last night. I added a link to this site from my site so that I wouldn't lose it again.

But, yes. Your reply was indeed my problem. I changed the Content Processor and my animation worked.
Feb 20, 2009 at 6:42 PM
So this works ok with FBX?  I am toying around with this project and XNAnimation, and was starting to use XNAnimation more because I know it works alright with FBX, and Max/Maya have supported FBX exporters.. .. ..  All my older stuff is done with this project though, so I'd like to keep working with it...


Feb 20, 2009 at 8:29 PM
Yeah. I had a simple animation of an alien walking around that I used the Animation Component with. You can see it in one of the screenshots with the tank on my site. I used the SkinnedModel example for animating the whale's tale in the picture on my site (it's the blue blob with the fish in the upper right corner). I created the animations for both models in Milkshape3D and exported them to FBX. I'm still messing around with different animators to find what works best for me. But, yes, I didn't have any problems with this project animating my model.
Feb 20, 2009 at 9:22 PM
That's awesome news then.  I'm making a little blobby dude with legs in Max, along with some animations to go with him - just walk forward, walk backwards, turn left, turn right, run forward, and a jump.  I'll try to get them working with both animation projects, and post my results somewhere.

Would the people here benefit from me adding the source Max files into a depot somewhere?  I don't mind sharing, and if it shows someone how to set things up in Max I'm happy to add to the public knowledge base.



Alex
Feb 21, 2009 at 1:08 AM
Modeling is where I'm lacking in skills. I recently paid to have a model of an octopus made for a game I'm doing for someone else. However, I couldn't get any of these animators to work with the model the way I want it to. The model is rigged for spinning, stretching it's arms to attack & grab things, sneaking / crawling very low, and several other animations. I would post some pics of it, but they kinda what me to keep quite about it. Can't give out too many details of the game itself and my only screenshots would have a lot in them. Besides, since I've gotten A LOT of help from people in the community, I think it's only fair to share "some" stuff with the people that have helped me.

I wish I had someone that was good at modeling that would like to help out with some of my games. I know only one graphics guy, but he doesn't do 3D modeling. And, since pretty much all of my games are 3D, he's not much help. He's agreed to throw in some textures when I need them though. I've picked up some books for 3D modeling. But, with my schedule, I don't have time to write the code and still have time to learn how to model. I do have some basic modeling skills though. So, I'm not completely useless. :-)
Apr 27, 2009 at 1:18 PM
So.  Can anyone do the favor on posting, point by point, how you get a fbx model to work on Xna?

I was able to make a .x model work using Kw Exporter and I already posted how to do it all the way from 3d max to Xna 2.0 (doesn't seem to change that much on 3.0).
Also, if someone can help me to get a model from Maya 2008 -> .fbx -> Xna 3.0  it would really help me.   Thanks.
Apr 29, 2009 at 4:00 AM
Well, i'm not doing the 3d art in my project, & the person that does it, uses 3d Max 2008. But in general, I think that you need to adjust as much as u can of ur model before rigging. U have to correctly rig it, & set the weights. Then (in max) u have to collapse to the modifyier stack. Then hide the bones / biped. Then export it with Autodesk FBX exporter (comes with max / maya, no plugin).
Then u need to build the XML file according to the frames of ur animation (check where each movement start & stop & build the xml file).


If u want to load a non-animated model (fbx), a workaround is to add a bone (little useless bone inside somewhere of the model) because otherwise it may not let u export as fbx (no need of xml file there).

For X files, Kw Exporter never worked for me in Max. Panda used to work good, but the latest versions of 3DMax didn't work open it at all.
Hope to be helpful,
Cheers.
Apr 29, 2009 at 12:51 PM
Edited Apr 29, 2009 at 12:59 PM
I thank you for you help.  I did a lot of work before knowing the procedure to make it work from 3d max.   I would like to clarify that you have to reset the matrix stack of the model before you attach the skeleton to it.  Also, you need to collapse the biped (and additional bones you may have linked).   Then, you can rig it and set the weights.  Do we agree on that?  n_n

These act of reseting the model and bones.  I would like to know how are they done on Maya and how they are called, so I can tell my artist partner to do it before rigging or animating.    I thank you in advance.
Jan 6, 2011 at 10:14 AM
Edited Jan 6, 2011 at 10:16 AM

Hello, I have problem with setting up my project according this tutorial:

http://animationcomponents.codeplex.com/wikipage?title=Making%20a%20Dwarf%20Realistically%20Walk%20and%20Run


here you can see my setting in solution explorer and error which I got.
http://www.4shared.com/photo/xHQpYnHv/screen1.html

I'm not sure how to add content pipeline reference - I opened project properties (on top - project/project properties - the last one from pop-up menu)
then I didn't see the content pipeline on the left. ( I use visual studio 2008, xna 3.1)
here was only - see next screen
http://www.4shared.com/photo/1rO8gDSk/screen2.html

So I added link just reference path to folder where are downloaded DLL ( Xclna.Xna.Animationx86 and Xclna.Xna.Animation.Content)

I'm not sure where I should add Xclna.Xna.Animationx86.xml and Xclna.Xna.Animation.Content.xml
If just add into project or add into content of project.

I will be glad for every advice.