.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.
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?
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
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!