Sign in to follow this  

Proper exporting collada

This topic is 1391 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is a little off topic. How do you guys get collada file with animated rig ? I have rigged in maya and tried exporting it in collada extension. But something's wrong . What format do you guys use ?

Share this post


Link to post
Share on other sites

I usually export to FBX from Blender (since its Collada exporter is crap), use FBX Converter to convert to Collada, then import using Assimp.

Share this post


Link to post
Share on other sites

I am actually working on this problem now. I am using Blender. Right now this is all theoretical to me as I am making a simple parser to load a simple animation (when ever I stop fussing over the math for physics :c)

 

Things to know about COLLADA that I notice is that you save the a lot of the data separate to make it easier to understand.

 

One file you can use to just upload the vertices /normals/ whatever else

Every other file stores the bones(which vertices is influenced by which bone and by what weight)

What I do is bake each key frame animation of the animation loop I want to store in that file. (So 10 frame loop will have the data of what rotations the bones have at each frame)

 

When you load the mesh you can load the animation data with it and then apply which vertices is controlled by which bone and what weight. You have a animation controller that starts the frame at 0. Depending on how you want it done you can have the current mesh interpolate into what the animation wants(smooth translation
 between two poses) or just apply the what the animation wants (abruptly changing your pose).

 

Lucky for you COLLADA uses XML to store it's code. You can use your favorite Text editor program to open it up and actually see the data in ASCII text format, I use Notepad++ since it has a option to color code and arrange the code in a more organize way to see the data.

 

If your interested in making your own parser for your program I can try to help you understand how COLLADA stores the data in it's files then it is just a matter of parsing the file for key words and storing the data. Also it would help you see if Maya is misbehaving by exporting your mesh wrong. I still need to finish my parser >.< but been so engrossed in the math for physics, I just have so much trouble.

 

Also here is the tutorial for COLLADA

http://trac.wildfiregames.com/wiki/AnimationExportTutorial

Share this post


Link to post
Share on other sites


I usually export to FBX from Blender (since its Collada exporter is crap), use FBX Converter to convert to Collada, then import using Assimp.

The same experience here. I started with Collada , but the bad support in blender lead to using a FBX converter. Eventually I have ditched collada completely and wrote my own FBX importer, because FBX is a lot easiert to unstand and it seems more stable considering exporter.

Share this post


Link to post
Share on other sites


wrote my own FBX importer,

 

I am trying to write it using fbx sdk . How do you import the skeleton . Where did you find tutorial or documentation ? I can only see docs about exporting.

 


One file you can use to just upload the vertices /normals/ whatever else
Every other file stores the bones(which vertices is influenced by which bone and by what weight)
What I do is bake each key frame animation of the animation loop I want to store in that file. (So 10 frame loop will have the data of what rotations the bones have at each frame)

 

Thanks for the info.... I was wondering why it was generating animation only in one file..

Share this post


Link to post
Share on other sites
Sign in to follow this