Here is a code sample:

        blockModel = game.Content.Load<Model>("Models/Cubes/Cube"); //this is a .fbx file, made in blender

        absoluteBlockTransforms = new Matrix[blockModel.Bones.Count];

        foreach (ModelMesh mesh in blockModel.Meshes)
            foreach (BasicEffect effect in mesh.Effects)
                effect.Texture = game.Content.Load<Texture2D>("Textures/Cubes/CubeLayout"); //this is the texture it's already using, but copy-pasted into a different directory

This looks fineGood image

Now if I uncomment the lines above, somehow everything gets screwed up?

Bad image

Somehow just setting the Texture property messes something up, but I'm not sure what exactly (aside from the symptoms). Note that framerate doesn't actually change; the small difference is just a coincidence. Also, the multisampling property is set after this is called, so it's not an issue of it somehow changing the graphics property.

  • \$\begingroup\$ Is it just me or has the lighting disappeared on the second one? \$\endgroup\$
    – Polar
    Commented Mar 18, 2013 at 18:06
  • \$\begingroup\$ Definitely something weird going on, but that might be something added by Blender. Lighting is disabled for these models. I think it's more of a fade effect? \$\endgroup\$ Commented Mar 18, 2013 at 18:09
  • \$\begingroup\$ Well, I'd use it as a starting point to investigate yourself what's going wrong. It makes your question look much more professional if you can show you've done your own research. \$\endgroup\$
    – Polar
    Commented Mar 18, 2013 at 18:11
  • 2
    \$\begingroup\$ Is it possible that you aren't generating the mipmaps for this loaded texture or that when you brought it into xna the content importer set the color space to DXT? \$\endgroup\$
    – RobCurr
    Commented Mar 18, 2013 at 18:46
  • 1
    \$\begingroup\$ I don't think it's the lighting that's changed, it's the texture mipmapping. What's your actual question? What are you trying to solve? \$\endgroup\$
    – House
    Commented Mar 18, 2013 at 19:23

1 Answer 1


As was eluded to in the comments, the problem is that in the second half your textures are missing mipmaps.

  • 2
    \$\begingroup\$ ...and Tetrad comes in for the steal :p \$\endgroup\$
    – RobCurr
    Commented Mar 18, 2013 at 23:13
  • \$\begingroup\$ +1, correct answer. Though I was thinking more along the lines of too localized. \$\endgroup\$
    – House
    Commented Mar 18, 2013 at 23:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .