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

My XNA model renders wrong.

It should render like that:

But it renders like that:

The background doesn't matter. It's just the model that renders wrong.

Here is the drawing code:

protected override void Draw(GameTime gameTime)



private void DrawModel(Model m)
    GraphicsDevice.RasterizerState = RasterizerState.CullNone;

    Matrix worldMatrix = Matrix.CreateRotationY(MathHelper.ToRadians(rot))
        * Matrix.CreateTranslation(new Vector3(0,0,0));

    foreach (ModelMesh mesh in m.Meshes)
        foreach (BasicEffect effect in mesh.Effects)
            effect.World = worldMatrix;
            effect.View = viewMatrix;
            effect.Projection = projectionMatrix;

share|improve this question
What do you mean with posting the mesh? The model loading code is this: Model model = Content.Load<Model>("Model"); It looks fine in the model editor. The model is saved in a .fbx file – user1990950 Mar 1 '13 at 15:36
up vote 5 down vote accepted

The problem you are describing could be caused by polygons with more than 4 vertices. Please make sure that you have edges in the model as seen in the image below:

share|improve this answer
Wow that worked perfectly thanks! – user1990950 Mar 1 '13 at 16:10
There's a way to automate it in SketchUp. – Anko Mar 1 '13 at 16:28

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.