TorqueX/CommonModelProblems
From TDN
1. You'll get a failure if you bring in a model without any materials defined (such as for testing), because the T3DTSRenderComponent has no Materials and you'll get a NullReference exception when it tries to render. Add this code to the ShapeName property setter, just above the "Shape = shape;" line.
Note: You must have a DefaultMaterial texture in the folder with your shapes for this to work. I just created a blank white bitmap in visual studio.
if (shape.MaterialList == null || shape.MaterialList.Length == 0)
{
shape.MaterialList = new Material[] { new Material() };
shape.MaterialList[0].Name = "DefaultMaterial";
}
2. Rendering Collision Bounds doesn't work. CollisionShape3D sets _material = new LightingMaterial(); for rendering collision bounds, but that doesn't do anything. In LightingMaterial, _SetupObjectParameters, the arrays are null/empty so you get an IndexOutOfBounds exception. If you implement the fix listed in item #1 above, you can change that line to set _material = new SimpleMaterial();, then rendering of collision bounds will work correctly. See this Forum thread for discussion of a fix : [1]
3. Can I use XNA models? Only for static geometry, so don't plan on bringing over your .FBX character models. This will probably change in a future release.
4. Can I use collision meshes for DTS models? No. The reader doesn't import them at this time and the polysoup collision class only works for static geometry. Manually specify spheres and/or boxes on the T3DRigidComponent to approximate the model's collision bounds. (You can specify any number of shapes for a given object.)



