I am completely new to Monogame and I am trying to render a simple object. I have tried many different models but nothing really works.
At the moment I am using the blender monkey head as an obj which gives me at least some lighting. If I use the monkey head as an fbx it is just black. I am using blender 2.75 btw.
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
foreach (var mesh in model.Meshes)
{
foreach (var effect in mesh.Effects)
{
BasicEffect bEffect = effect as BasicEffect;
if (bEffect != null)
{
bEffect.TextureEnabled = false;
bEffect.EnableDefaultLighting();
bEffect.PreferPerPixelLighting = true;
bEffect.World = Matrix.Identity;
bEffect.View = Matrix.CreateLookAt(new Vector3(0, 0, 10), Vector3.Zero, Vector3.Up);
bEffect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, 16.0f/9.0f, 1, 200);
bEffect.DiffuseColor = new Vector3(1, 0.3f, 0.5f);
bEffect.SpecularColor = new Vector3(0.1f,1.0f,0.5f);
}
}
mesh.Draw();
}
base.Draw(gameTime);
}
}
I have also tired to invert the normals in blender with the same result. I am using windows 10 and I tried the GL/Dx version with the same result.