Nikos Kastellanos 9b51f6f06e v1.5.0.0 4 mēneši atpakaļ
..
Animation ea3ea950ef types 1 gadu atpakaļ
ContentReaders ea3ea950ef types 1 gadu atpakaļ
Graphics 3ba9fa94ec rename namespace 2 gadi atpakaļ
Properties 9b51f6f06e v1.5.0.0 4 mēneši atpakaļ
Aether.Animation.DX.csproj 9b51f6f06e v1.5.0.0 4 mēneši atpakaļ
Aether.Animation.NET4.XNA.csproj 0751af5991 update XNA outputPath 4 mēneši atpakaļ
Aether.Animation.csproj 9b51f6f06e v1.5.0.0 4 mēneši atpakaļ
README.md 4ef3422ea0 readme files 5 mēneši atpakaļ

README.md

Aether.Graphics

Graphics library for Kni framework.

Graphics

  • nkast.Aether.Animation.Animations

Play animated 3D models. Support GPU and CPU animation.

Example

-Import 3D model with GPU AnimatedModel or GPU AnimatedModel Processor. Use SkinnedEffect for GPU and BasicEffect for CPU based animation.

-Load as any 3D Model:

_model = Content.Load<Model>("animatedModel");

-Load the Animations from model:

_animations = _model.GetAnimations();
var clip = _animations.Clips["ClipName"];
    _animations.SetClip(clip);

-Update animation on every frame:

    _animations.Update(gameTime.ElapsedGameTime, true, Matrix.Identity);

-Draw GPU animation:

foreach (ModelMesh mesh in _model.Meshes)
{
    foreach (var meshPart in mesh.MeshParts)
    {
        meshPart.effect.SetBoneTransforms(_animations.AnimationTransforms);
        // set effect parameters, lights, etc          
    }
    mesh.Draw();
}

-Draw CPU animation:

foreach (ModelMesh mesh in _model.Meshes)
{
    foreach (var meshPart in mesh.MeshParts)
    {
           meshPart.UpdateVertices(animationPlayer.AnimationTransforms);
           // set effect parameters, lights, etc
    }
    mesh.Draw();
}