Writing an animated .x file to your own format?

Started by
1 comment, last by Starnick 9 years, 10 months ago

I am wondering if its possible to write the data from a .x fie to your own binary format and be able to load it in renderscene and play the animaions?,i know how to get vertexdata,indexdata unsure about how the wieghts is handled,does anyone know?

:)
Advertisement

If you can read and interpret all the data from a .x file you can write that data to another custom file, that's completely possible and that's what any editor of any file format does when "saving as" or "export" is used.

If you use a custom format you must be able to write a loader for that format to render it and play the animation.

I'm not sure what's that weight you're asking for, I've never used .x files and I've never worked with animations.

You can always use a library like Assimp (http://assimp.sourceforge.net/). They have importers (.X is supported) and exporters for many formats. What is returned to you after import is an intermediate scene data structure that is basically a one-size-fits all that will have all your model, material, and animation data. That way you won't have to actually parse the .X file and just write out the data in whatever format your application/output file uses.

This topic is closed to new replies.

Advertisement