我的动画3D绵羊模型(使用了搅拌器),一个小剪辑无法正确渲染,渲染完整的变形模型,我的鳄鱼动画模型(也使用了搅拌器)与播放的剪辑完美呈现,我有跟着鳄鱼的羊步骤。
以下是应该如何渲染的链接: https://www.dropbox.com/s/33hb9gar8mqxg2a/toberendered.png
以下是它的呈现方式: https://www.dropbox.com/s/4bciq6x0f91hb1r/render.png
protected override void LoadContent()
{
skin_sheep = sheep.Model.Tag as SkinningData;
sheep.Transforms = SetupEffectDefaults_anim(sheep.Model);
player_sheep = new AnimationPlayer(skin);
clip_sheep = skin_sheep.AnimationClips["ArmatureAction"];
player_sheep.StartClip(clip_sheep);
}
protected override void Draw(GameTime gameTime)
{
Matrix view = Matrix.CreateLookAt(new Vector3(0, 1000, -1000),new Vector3(0, 0, 0), Vector3.Up);
Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,
GraphicsDevice.Viewport.AspectRatio,1,1000);`
` foreach (ModelMesh mesh in sheep.Model.Meshes)
{
foreach (SkinnedEffect effect in mesh.Effects)
{
effect.SetBoneTransforms(bones_sheep);
effect.View = view;
effect.Projection = projection;
effect.SpecularColor = new Vector3(0.25f);
effect.SpecularPower = 16;
effect.World = sheep.Transforms[mesh.ParentBone.Index] *
sheepTransformMatrix;
}
mesh.Draw();
}
}
请帮助,提前致谢。