I have created my map for my game using 3DS Max. I have then applied textures to the map within 3DS Max, where the textures all show correctly. I export the map as a .fbx file to use within an XNA project.

However as you can see from the below screenshot, the textures are not displayed correctly in XNA.

Example screenshot

Does anyone know why this is happening?

I am using the Autodesk FBX content importer and the Model - XNA Framework Content Processor.

As you can see my model which was created in the same way has the textures displayed correctly, it is only doing it to my map.

  • \$\begingroup\$ Please elaborate on how they are incorrect. Perhaps a side-by-side of the XNA project and 3dSmax. \$\endgroup\$ Apr 18, 2013 at 17:38
  • 2
    \$\begingroup\$ Looks like your texture sampler state is set to clamp, not wrap. How are you drawing the model? \$\endgroup\$ Apr 18, 2013 at 17:41
  • \$\begingroup\$ @SethBattin The textures are supposed to be like the square but all the way along the walls, not being stretched out. Here is a picture from within 3DS Max i.imgur.com/HhrvfwE.jpg \$\endgroup\$
    – RonnieB555
    Apr 18, 2013 at 18:41
  • \$\begingroup\$ @dadooGames I am loading my map model in with this, myMap = Content.Load<Model>("Assets/map_2013D"); Then drawing it with this, foreach (ModelMesh mesh in myMap.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.World = Matrix.CreateTranslation(mapPosition); effect.View = camera.view; effect.Projection = camera.projection; } mesh.Draw(); } \$\endgroup\$
    – RonnieB555
    Apr 18, 2013 at 18:44
  • \$\begingroup\$ Ah, I was looking at the character model and missing the walls. I agree with @dadooGames's assessment. \$\endgroup\$ Apr 18, 2013 at 19:17

1 Answer 1


Thanks to dadoo Games my problem is solved. He was correct I needed to change my sampler state to wrap.

I added this to my draw function to get it working:

GraphicsDevice.SamplerStates[0] = SamplerState.LinearWrap;

You must log in to answer this question.

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