I'm getting this error while trying to load a model in XNA 4.0 : Error 2 The mesh "transform1", using SkinnedEffect, contains geometry that is missing texture coordinates for channel 0. The model was dxf format then I upload it to maya then I added some skeleton and some texture (viewed it on the UV) but I still get this error.
this is the load function.
protected override void LoadContent()
{
// Load the model.
currentModel = Content.Load<Model>("myModel");
// Look up our custom skinning information.
SkinningData skinningData = currentModel.Tag as SkinningData;
if (skinningData == null)
throw new InvalidOperationException
("This model does not contain a SkinningData tag.");
// Create an animation player, and start decoding an animation clip.
animationPlayer = new AnimationPlayer(skinningData);
AnimationClip clip = skinningData.AnimationClips["Take 001"];
animationPlayer.StartClip(clip);
}
this is the draw function :
protected override void Draw(GameTime gameTime)
{
GraphicsDevice device = graphics.GraphicsDevice;
device.Clear(Color.CornflowerBlue);
Matrix[] bones = animationPlayer.GetSkinTransforms();
// Compute camera matrices.
Matrix view = Matrix.CreateTranslation(0, -40, 0) * // x, y, z
Matrix.CreateRotationY(MathHelper.ToRadians(cameraRotation)) * //rotate y
Matrix.CreateRotationX(MathHelper.ToRadians(cameraArc)) * //rotate x
Matrix.CreateLookAt(new Vector3(0, 0, -cameraDistance),
new Vector3(0, 0, 0), Vector3.Up);
Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,
device.Viewport.AspectRatio,
1,
10000);
// Render the skinned mesh.
foreach (ModelMesh mesh in currentModel.Meshes)
{
foreach (SkinnedEffect effect in mesh.Effects)
{
effect.SetBoneTransforms(bones);
effect.View = view;
effect.Projection = projection;
effect.EnableDefaultLighting();
effect.SpecularColor = new Vector3(0.25f);
effect.SpecularPower = 16;
}
mesh.Draw();
}
base.Draw(gameTime);
}
PS : 1-My knowledge with Maya & XNA is very limited cause I used to use OpenGL/C++ for some time.
2-Also I change my Content Processor to SkinnedModelProcessor not Model - XNA Framework. thanks in advance.