ogre demo_skeletalanimation

D:\stu\GAMEENGINE\ogre\Tools\XMLConverter

OgreXMLConverter.exe

from:http://www.ogre3d.org/docs/manual/manual_47.html

The OgreXmlConverter tool can converter binary .mesh and .skeleton files to XML and back again - this is a very useful tool for debugging the contents of meshes, or for exchanging mesh data easily - many of the modeller mesh exporters export to XML because it is simpler to do, and OgreXmlConverter can then produce a binary from it. Other than simplicity, the other advantage is that OgreXmlConverter can generate additional information for the mesh, like bounding regions and level-of-detail reduction.

Syntax: Usage: OgreXMLConverter sourcefile [destfile]sourcefile = name of file to convertdestfile = optional name of file to write to. If you don't specify this OGRE works it out through the extension and the XML contents if the source is XML. For example test.mesh becomes test.xml, test.xml becomes test.mesh if the XML document root is etc. When converting XML to .mesh, you will be prompted to (re)generate level-of-detail(LOD) information for the mesh - you can choose to skip this part if you wish, but doing it will allow you to make your mesh reduce in detail automatically when it is loaded into the engine. The engine uses a complex algorithm to determine the best parts of the mesh to educe in detail depending on many factors such as the curvature of the surface, the edges of the mesh and seams at the edges of textures and smoothing groups - taking advantage of it is advised to make your meshes more scalable in real scenes.

I use OgreXMLConverter.exe to generate rjaiqua.mesh.xml, jaiqua.skeleton.xml

jaiqua.skeleton.xml:

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

......................

bonehierarchy>

。。。

ogre demo_skeletalanimation_第1张图片
ogre demo_skeletalanimation_第2张图片

ijust for fun(modify code slightly):

n skeletalanimation.h

line 170:

   if(0==i)
            mAnimState[i] = ent->getAnimationState("Turn");
    if(1==i)
     mAnimState[i] = ent->getAnimationState("Run");
    if(2==i)
     mAnimState[i] = ent->getAnimationState("Stagger");
    if(3==i)
     mAnimState[i] = ent->getAnimationState("Sneak");
    if(4==i)
     mAnimState[i] = ent->getAnimationState("Walk");

//蒙皮技术。。。

转载于:https://www.cnblogs.com/europelee/archive/2010/07/11/3388665.html

你可能感兴趣的:(ogre demo_skeletalanimation)