Re: Converting cal3d files to CS

Christian Van Brussel <[email protected]> Mon, 10 Nov 2014 13:01:09 +0100
Newsgroups gmane.comp.graphics.crystalspace.devel
Organization UCL
Message-ID <1415620869.11263.86.camel@scylla>
Hi Ralph,

I'm the Christian you were looking for.

It can effectively be quite straightforward to convert the data from
cal3d to animeshes. Since this data is mostly the same in both format,
this can effectively be mostly a matter of XML syntax.

However, there are quite a lot of different data types to export:
vertices, normals, meshes, submeshes, materials, weight map, skeleton,
morph targets, animations.

So this may not be that complex but can still require quite a lot of
work.

Instead of converting from cal3D, it is possible to use another format
then load it into CS using its Assimp plugin. Is Planeshift still using
models designed in 3DS Max? In that case you can export it eg in .3ds
or.obj then load it transparently thanks to Assimp. The trunk version of
Assimp can also handle FBX files, which is probably a better choice for
animated models.

Otherwise, if you still plan to write a cal3d/animesh converter, then
you can have a look at the animesh XML loader (the mesh loader is in
plugins/mesh/animesh/persist/standard/, the skeleton and animation
loader is in plugins/mesh/animesh/persist/skeleton2/), or at the Blender
export script (mostly in scripts/blender/io_scene_cs/io/object.py).

Feel also free to ask questions if you need more information.

Bye,
Christian



------------------------------------------------------------------------------