I recently upgraded my old Monogame project to the latest version of Monogame. Everything is running as it used to, however, my imported .FBX models are appearing as pure black (implying that they're not being lit up).
(The burgers+tapes are made dynamically using Quads at runtime. They are affected by the lighting as they should be).
My code (which worked in older versions of Monogame) for displaying a model is as follows:
public override void Draw()
{
foreach (ModelMesh mesh in model.Meshes)
{
foreach (BasicEffect effect in mesh.Effects)
{
effect.World = Matrix.CreateRotationZ(rotX);
effect.World *= Matrix.CreateRotationX(rotY);
effect.World *= Matrix.CreateTranslation(new Vector3(pos.X,
pos.Y,
0f));
effect.View = MainGame.matrixView;
effect.Projection = MainGame.matrixProj;
effect.TextureEnabled = true;
effect.Texture = tex;
effect.EnableDefaultLighting();
effect.AmbientLightColor = new Vector3(0.2f, 0.2f, 0.2f);
effect.EmissiveColor = new Vector3(1, 0, 0);
}
mesh.Draw();
}
}
The models are exporteed from Blender as FBX 7.4 Binary (the project doesn't compile if I use FBX 6.1 ASCII).
Thanks in advance. I hope it's not something silly I've overlooked.