1. Creating textured model in Blender
First, add a new texture by going to texture panel on the right. Select type "Image or Movie", click "Open" and locate your texture file.
Then, move your mouse to the 3d view, press Tab to select the default cube, then press "U" and select Unwrap.
Go to UV Image Editor:
and select the texture:
At this point, the cube should be textured and you can verify that by changing viewport shading to texture:
Now export the model as FBX file (all settings should be on default). When you open the model now in Visual Studio, the texture should also be visible.
2. Converting the model
Download Autodesk FBX 2013.3 Converter (http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=22694909)
In the converter, add your fbx file, change the destination folder to the same one where your current file is (otherwise it creates a subfolder) and rename destination file so that it isn't same. Then press Convert.
Now open the Monogame pipeline tool and import both the converted model and the texture:
3. Rendering the cube
I believe that your rendering code would now work, but to be sure, there is a simple code needed to render it properly:
public class Game1 : Game
private Model model;
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
protected override void LoadContent()
model = Content.Load<Model>("Model1");
protected override void Draw(GameTime gameTime)
foreach (ModelMesh mesh in model.Meshes)
foreach (BasicEffect effect in mesh.Effects)
effect.World = Matrix.CreateTranslation(new Vector3(0, 0, 0));
effect.View = Matrix.CreateLookAt(new Vector3(5,5, 5), Vector3.Zero, Vector3.Up);
effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), 1.6f, 0.1f, 10000.0f);