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 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.

share|improve this question
Please elaborate on how they are incorrect. Perhaps a side-by-side of the XNA project and 3dSmax. – Seth Battin Apr 18 '13 at 17:38
Looks like your texture sampler state is set to clamp, not wrap. How are you drawing the model? – dadoo Games Apr 18 '13 at 17:41
@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 – RonnieB555 Apr 18 '13 at 18:41
@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(); } – RonnieB555 Apr 18 '13 at 18:44
Ah, I was looking at the character model and missing the walls. I agree with @dadooGames's assessment. – Seth Battin Apr 18 '13 at 19:17

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;
share|improve this answer

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.