.X Export a simple Maya model

I've made a model in Maya 6.5 that is a simple temple with a texture applied to it. I have the .X exporter installed however I can't get the mesh to show up correctly in the Mesh Viewer. The mesh shows up pitch black and I can't see any texture applied to it. Is there a way to export a simple textured model from Maya without using shaders and effect files? I'm using the June 2005 SDK.

[395 byte] By [chrouble] at [2008-2-13]
# 1
Try exporting with Materials R128 G128 B128
as well if you export as ASCII you can verify
data with a text editor
laforced at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 2
Well, I can get the texture to show up but there are some problems. When I export a mesh that only has 1 texture/material applied to it, the .x file lists 2 materials:
Material {
0.800000;0.800000;0.800000;1.000000;;
0.000000;
1.000000;1.000000;1.000000;;
0.000000;0.000000;0.000000;;

TextureFilename {
"C:/Documents and Settings/Chad/My Documents/Visual Studio Projects/Test/stone.jpg";
}
}

Material {
1.000000;1.000000;1.000000;1.000000;;
0.000000;
1.000000;1.000000;1.000000;;
0.000000;0.000000;0.000000;;

TextureFilename {
"";
}
}

Where is that second material coming from? It's messing up my mesh loader since the .x file says it has 2 materials so when I do a IDirect3DDevice9::SetTexture, it will freak out since no texture is there. I can get around it by going into the .x file by hand and deleting it but I'd like Maya to just export it without this other material.
Also, how can I get relative paths for the texture file name? I set Make Relative Paths to true but it had no effect.
One last question: When lighting is disabled, the mesh is totally black unless I turn up the Incandescence before exporting it. Is the material supposed to depend on the Incandescence like that?
chrouble at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 3
Can you send a sample bad maya and .X file to us? Mail it to me at daronson@online.microsoft.com

-Dave

DaveAronson at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 4
Support for Maya standard materials was added in the August 2005 SDK release.
The values collected from those materials are placed in the D3DXMATERIAL struct.

-Daniel
Microsoft, DirectX Solutions

DanielHorowitz at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 5
I've sent my maya file along with the texture and .x file that was exported. Thanks!
chrouble at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 6
Well that email didn't work. Try sending it again to dave.aronson@microsoft.com.

Thanks,
Dave

DaveAronson at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 7
New email just sent.
Thanks much,
Chad
chrouble at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 8
Hi chrouble,

Could you tell me where you got the .X exporter for Maya, as I have been looking for .X exporter your years.

Dalaware at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 9
The exporter is included in the DirectX 9.0 SDK updates.

-Dave

DaveAronson at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 10
Does the SDK exporter support MeshVertexColors? I created a cube with a crate texture on each side. When I render the .x file either in the mesh viewer or my application, the cube is black. However, when I go in the .x file and change all the MeshVertexColors from all black to all white, the box is displayed just fine. Is there a way to export the mesh with the vertex colors all white? Thanks!
chrouble at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...