Hi everyone,
I am trying to export from 3DS max to XNA, which I have done multiple times before with no issues. This time the XNA studio seems to be ignoring all the axis data from 3DS max, so when I export it the ship is always facing the wrong way. Is there any reason it would be doing this, or can anyone tell me their settings for 3DS Max 2010 -> .FBX format, as mine do not seem to be working anymore.
Below is a summary of what I am using, both in XNA and 3DS Max:
XNA Draw Function:
void DrawGameObject(GameObject gameobject)
{
Matrix[] transforms = new Matrix[gameobject.model.Bones.Count];
gameobject.model.CopyAbsoluteBoneTransformsTo(transforms);
foreach (ModelMesh mesh in gameobject.model.Meshes)
{
foreach (BasicEffect effect in mesh.Effects)
{
effect.EnableDefaultLighting();
effect.PreferPerPixelLighting = true;
//effect.World = Matrix.Identity;
effect.World = Matrix.CreateScale(gameobject.scale) *
Matrix.CreateFromQuaternion(gameobject.rotation) *
Matrix.CreateTranslation(gameobject.position);
effect.Projection = projectionMatrix;
effect.View = viewMatrix;
graphics.GraphicsDevice.SamplerStates[0].AddressU = TextureAddressMode.Wrap;
graphics.GraphicsDevice.SamplerStates[0].AddressV = TextureAddressMode.Wrap;
}
mesh.Draw();
}
}
3DS Max:
TurboSmooth : On.
Convert Deforming Dummies to Bones: On.
Units: Inches.
Axis Conversion: Y-up.
FBX File Format: Binary, FBX201000
Other:
I have also noticed that within 3DS Max, the axis are always Z up in the bottom left hand corner, but within the view ports my objects axis are Z up, except for on the left where it is Y up. Is there anyway to make this one z up too, as this could be the issue?
Thanks,
Slayer