Issue processing .X model with Content Pipeline

I am using this skydome (from this tutorial).

After processing with the MonoGame Content Pipeline tool, the resulting .xnb file has the wrong VertexDeclaration defined (Position, TexCoord, Color with stride = 24).

Using the XNA content pipeline the resulting .xnb works fine and has the correct VertexDeclaration (Position, TexCoord, Normal with stride = 32).

Is this a known issue/work-in-progress with the content pipeline, or am I doing something wrong?

Using VS2015 Professional and MonoGame 3.4.0.456.

I assume that your model does not have any normal vectors stored in the .X fie. IIRC the Assimp importer and the MonoGame model processor do not automatically create normal vectors if they are missing.

My suggestions:

  • Create a new model, which includes normal vectors,
  • or extend/fix the MonoGame model processor to add normal vectors (you only need to call MeshHelper.CalculateNormals),
  • or report the issue on the MonoGame Github page.
1 Like