0

我的动画 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();
        }
       }

请帮助,在此先感谢。

4

0 回答 0