@c -*-texinfo-*-
@node Animesh Tools, , Animesh General, MeshObject Animesh
@subsubsection The Animated Mesh Tools
@cindex AniMeshTools

Several tools are shipped with Crystal Space in order to help the setup of
Animeshes and their animations.

@subsubheading Converting from a Genmesh mesh

A @ref{MeshObject Genmesh, Genmesh} can be converted into an Animesh, the new
Animesh won't simply have any skeleton, morph target or animation.

This is made using the @code{CS::Mesh::AnimatedMeshTools::ImportGeneralMesh()}
method.

@subsubheading Merging a split mesh 

Depending on your artistic pipeline, you may result in an Animesh defined in a
main file, while the morph targets of the Animesh are defined each of them in a
different, separate file. The @samp{splitmorph} plugin tool allows to load all
these files, and to merge them into a single Animesh mesh.

The @samp{splitmorph} plugin tool uses the methods @code{CS::Mesh::AnimatedMeshTools::ImportGeneralMesh()}
and @code{CS::Mesh::AnimatedMeshTools::ImportGeneralMesh()}, and parses the
parameters of the tool from a Crystal Space library file.

An example of merging of a split mesh is available in the main Crystal Space
repository, using a face generated by the @cite{FaceGen} software. Please read
the @file{readme} file in @file{CS/data/jane} to proceed to the download of the
file, then you will be able to visualize it with the following command:

@code{viewmesh data/jane/jane.cslib}

@subsubheading Loading motion capture animation data

A motion capture parser (class @code{CS::Animation::BVHMocapParser}) is available
for the loading of animations defined in the BVH (Biovision Hierarchical data)
file format. It can be used to feed the animation data to be played by a
@code{CS::Animation::iSkeletonAnimationNode} animation node.

This parser can be combined with a @samp{Retarget} animation node in order to
redirect the animation to an Animesh with a roughly different skeleton.

@subsubheading Motion capture viewer and Point Light Display system

A viewer (@file{csmocapviewer}) allows to visualize easily the content of BVH
motion capture files, as well as the retargeting of the animation data to a given
Animesh.

The viewer is also shipped with a @cite{Point Light Display} system, that has been
designed to be used in psychology studies on the human perception of biological
motion. It uses a Perlin noise to add points with random motion.
