Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've downloaded a bunch of 3d models from The majority of the one's I've downloaded are simply .fbx files. When I load the model into my game and run it, the following error is thrown in mesh.draw():

An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.Graphics.dll

Additional information: The current vertex declaration does not include all the elements required by the current vertex shader. TextureCoordinate0 is missing.

All the answers I've found online seem to tell people to reexport the model, or change something in the shader. I don't have access to these, just the fbx file. What can I do?

share|improve this question
It sounds like the content importer is discarding the texture coordinate component for the mesh vertices. Do you happen to have the source for the content importer? – RobCurr Mar 29 '13 at 4:17
I'm not sure what you mean, I'm kind of new to this. I'm calling Content.Load<Model>(@"Models\model") to load it... – robev Mar 29 '13 at 21:58

As an alternative to adding textures to your model, you can stop the default BasicEffect from looking for them when drawing.

//foreach BasicEffect basicEffect in model.mesh[n].effects ....

basicEffect.TexturesEnabled = false;

//begin effect pass...
share|improve this answer

Your model is missing the Texture Coordinates. You need to unwrap the model in a 3D modeling program, then export it.

share|improve this answer
Often the models come with no UV wrapping, basically. If you look when you're browsing and downloading the models they will often say if they have textures or UV mapping. IF they don't, you'll have to import it into something yourself and do the texture mapping. – DrHeinous Apr 29 '13 at 14:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.