Multiple Animations

Hello, I was wondering what file format I can use which allows multiple bone animation sets in one model, as far as I know the blender X file exporter only allows you to export one animation at a time.

I looked at if Panda3D accepted the FBX file format but it doesn’t look like it.

Any help would be greatly appreciated.

Thank you.

You can try the Chicken exporter for Blender, which can directly export into .egg files, and as far as I have tried it does support multiple animations:
chicken-export.sf.net/

By this, do you mean multiple different animations within a single egg file, or do you just mean multiple different animations that can play on the same model?

Panda itself supports both, although few converters support multiple animations within a single egg file. But, really, it’s hard to think of a case when you need to have multiple animations within one egg file, since storing them in separate egg files works just fine and is often easier to manage anyway.

All of the converters that support animations at all can handle multiple different animations on the same model.

David

I would prefer to have multiple animations stored in one file.

Also, how would I apply a skeleton to more then one model?

X files for example store both the model and skeleton animation data in the same file, at least when I used blender.

You can always concatenate multiple egg files together into one long egg file. Though again, it’s not clear what advantage you gain from doing this; it just makes it more difficult to load them separately later.

For instance, if you have a model.egg and an anim.egg, you can copy them together and then you will have both the model and its associated anim in the same egg file.

I don’t understand what you mean by this. A skeleton is a hierarchy of joints that is associated with a model. Each model has its own skeleton, though of course multiple models might have equivalent skeletons, if they represent different forms of the same character.

Unless you mean some Blender trick to apply a skeleton from one model onto a different model?

David

Note that x2egg will preserve this structure. If you give it an x file that contains a model and its animation data, it will output an egg file that contains the model and its animation data.

David

I am confused,

let me re-state the question,

I have a model M, M has skeleton animations, I export M as a file which contains both its animation data and model data(IE the Colada format, which allows multiple animations in one file)

How would I load that file?

If I created separate animation files, how would I have them attach and play on the same model? I am confused by you saying models have separate animation files.

  • Separate question, how would I attach models to bone, or models with bones to other models? IE I have human X and armor Y, how would I attach armor Y to human X and have the armor follow the human animations?

Thanks!

I have a model M, M has skeleton animations, I export M as a file which contains both its animation data and model data(IE the Colada format, which allows multiple animations in one file) 

OK, well, to load this model in Panda, you will first need to export into a file format that is understood by one of Panda’s converters, or use a Panda exporter to save it. At the moment, Collada is not supported by Panda (though pro-rsoft is working on this). You can save it in X file format, or depending on the modeling package you are using, you might be able to convert it directly to Panda without going through an intervening file format (we have converters for Blender, 3DSMax, and Maya, for instance).

Separate animation files is the way Panda normally works. You can specify all related files–including the model file(s) and the associated animation files–to the Actor constructor, or to Actor.loadModel() and Actor.loadAnims(). See the documentation about Actor in the Panda3D manual, and the various examples in the distribution, for more information.

There is an example of this being done in one of the sample programs.

I know this is an older post but I am in need some insight on this subject. I am aware of how to load models with separate animations (such as the ralph demos) but I am unaware of how I would go about exporting these seperate animations. Would I export these out to X, and if so would I choose not to save the mesh? This is unclear to me.

I have been modeling for a long while and I have numerous compatible models, but they all have continous frame animations. Is there a way to call the individual frames to isolate the animation?

Any input on this would be greatly appreciated, as our project is moving faster than was expected and we are now in need of our custom actors.

I don’t know about the various export options–they depend on the exporter(s) you are using. If you are going through X, you are limited to whatever options your X exporter gives you. You could try different combinations and see what you end up with.

In any case, Panda can play the animations individually whether you have one animation per file, or all animations in a single file. In the latter case, you don’t have control over the names of the animations; those are assigned from the names they are given in the file. You can use actor.getAnimNames() to list all of the names you have, and then try to figure out which is which animation. Also, if you really just have one continuous animation with the individual animations embedded within it at particular frame ranges, that’s OK too–you’ll just use the methods like actor.play(‘anim’, fromFrame = 27, toFrame =42).

David

Thank you drwr, that was exactly the information I needed :wink: I will give the different methods all a try and see if it is in our best interest to choose one over the others. Over time working with a few different game design platforms we have amassed many models with differing animation formats. I thank you for your help, It was spot on.