Loading FBX models and textures

I’m just using a sand box for testing while I get used to this 3D stuff.

I’ve followed a tutorial which loads a basic model and allows you to rotate it. It’s working, but all I get displayed is the object without any texture or lighting. I’ve put the FBX and associated files into the pipe line and they’re all in the Content directory. However, if I include the mtl file in the pipeline the fbx file fails to build, which I don’t understand.

The drawing code is thus:

For Each model As ModelMesh In Meteor.Meshes
For Each Effect As BasicEffect In model.Effects
Effect.AmbientLightColor = New Vector3(1, 0, 0)
Effect.View = ViewMatrixmodel.
Effect.World = WorldMatrix
Effect.Projection = ProjectionMatrix

Do I need to do more to get textures and lighting to work?


*.mtl are used by *.obj files. You can forget about it with an *.fbx.
No need to add it to the content pipeline though, and the tools does not know how to handle it.