|
|
4 ani în urmă | |
|---|---|---|
| .. | ||
| Animation | 6 ani în urmă | |
| ContentReaders | 6 ani în urmă | |
| Graphics | 9 ani în urmă | |
| Properties | 9 ani în urmă | |
| Aether.Animation.PORTABLE.csproj | 4 ani în urmă | |
| Aether.Animation.W10.csproj | 4 ani în urmă | |
| Aether.Animation.W8_1.csproj | 4 ani în urmă | |
| Aether.Animation.WINDOWS.MG.csproj | 4 ani în urmă | |
| Aether.Animation.WINDOWS.XNA.csproj | 9 ani în urmă | |
| Aether.Animation.WP7_1.csproj | 9 ani în urmă | |
| Aether.Animation.WP8.csproj | 4 ani în urmă | |
| README.md | 9 ani în urmă | |
| packages.config | 4 ani în urmă | |
Play animated 3D models and support for CPU animation. CPU animation is optimized using unsafe code, writing directly to mapped VertexBuffer memory using reflection (DirectX) and unmanaged/C++ code (WP8.0).
-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();
}