【发布时间】:2014-05-02 13:54:02
【问题描述】:
嘿,我的问题是我在 3dsMax 中为我想要的东西创建了完美的模型,我使用皮肤修改器绑定了一个 Biped,
我正确定位了信封并使用帧为 Biped 设置动画,然后导出为 .fbx 并使用 SkinnedModelPipeline 将其加载到 XNA 中。
一旦加载到 XNA 中,模型就会变形,并且它似乎只在模型的右臂上。
由于我只是一个新成员,我现在无法及时发布图片,所以我发送了一个在线图片的链接。
3dsMax 模型:
模型已加载
模型绘制函数
//an array of the current positions of the model meshes
this.bones = animationPlayer.GetSkinTransforms();
for (int i = 0; i < bones.Length; i++)
{
bones[i] *= Transform.World;
}
//remember we can move this code inside the first foreach loop below
//and use mesh.Name to change the textures applied during the effect
customEffect.CurrentTechnique = customEffect.Techniques[technique];
customEffect.Parameters["DiffuseMapTexture"].SetValue(diffuseMap);
customEffect.Parameters["Bones"].SetValue(bones);
customEffect.Parameters["View"].SetValue(Game.CameraManager.ActiveCamera.ViewProperties.View);
customEffect.Parameters["Projection"].SetValue(Game.CameraManager.ActiveCamera.ProjectionProperties.Projection);
foreach (ModelMesh mesh in model.Meshes)
{
//move code above here to change textures and settings based on mesh.Name
//e.g. if(mesh.Name.Equals("head"))
//then set technique and all params
foreach (ModelMeshPart part in mesh.MeshParts)
{
part.Effect = customEffect;
}
mesh.Draw();
}
我已经搜索了很长时间,但找不到任何可以解决此问题的方法。
感谢任何帮助。
【问题讨论】: