I am using Visual Studio 2012 and I create a MonoGame project using a Microsoft x file. No texture appear (its all black). If I create an xna 4 project and use the same x file and the same code I was using with MonoGame it works.
Does anyone have an idea of what is the problem or am I doing something stupid?
have you tried using the .x models compiled xnb file and any textures generated from the XNA compiled project In your Monogame project?
I believe I have found a solution to the problem. Initially I was just creating one Monogame Window project and editing the file Content,mgcb located in the Content directory to add the x file. It would compile properly and create the xnb files but textures would not be displayed. What I did to solve the problem is add another Monogame Content project and add the x file to that project compile it and it works
Thanks for your reply
@Michael_Salman I had a similar problem while trying to render a skybox. I tried many things on the file and even compared the X file from the MonoGame pipeline from the old XNA pipeline (they were exactly the same). It seems that the alpha is set to 0 on the rendering. My code looked like this from XNA:
currentEffect.LightingEnabled = false;
currentEffect.PreferPerPixelLighting = false;
currentEffect.World = modelTransforms[mesh.ParentBone.Index] * Matrix.CreateTranslation(position) * Matrix.CreateScale(0.05f);
currentEffect.View = camera.ViewMatrix;
currentEffect.Projection = camera.ProjectionMatrix;
In order for the skybox to show I had to add this line:
currentEffect.Alpha = 1;
It solved my problem. Although your problem got solved, mine was not after following you solution so I thought it would be good for posterity to add my two cents!