TOP EDIT -> Finally read the whole thread. Sorry my posts don't really go on topic and add value to the thread. I see the export problem was solved it's just materials at issue. Also what I provided below helps these problem in no way. Sorry
Well I'd have to try it first to tell you, but steps( in my thinking)
1)run
http://www.conitec.net/beta/ent_mesh.htman get mesh //-> Might need to grab the material separate
2)run this command
Same MS DX9 link from the above post 3)exit engine
4)open converter
5)convert saved X file to OBJ(or other format)?
or vice-versa
EDIT -> Well it's taking me away from other things but... The function is in the d3dx9.h. It's commented out(I don't know why), so if you try to run it you get a error. Un-commenting fixes one error only to lead to another about a syntex error.Fixing that one lead me to another syntex error. fixing the second lead me to a third syntex error...
It's there in dx9 and partly there in the engine, but I've no idea how to get it up and running. If I did your code would look like thtis.
#include <acknex.h>
#include <default.c>
#include <d3d9.h>
function main()
{
// ..... The basic sart to main here
ent_dBox=ent_create("grass.mdl", vector(0,0,25),NULL);
if(key_g)
{
while(key_g)
wait(1);
ID3DXMesh* m_pMesh; // Mesh object to be saved to a .x file
D3DXMATERIAL* m_pMaterials; // Array of material structs in the mesh
DWORD m_dwNumMaterials; // Number of material structs in the mesh
DWORD dwFormat = 1; // Binary-format .x file (default)
// MALICE COMMENTED// DWORD dwFormat = D3DXF_FILEFORMAT_TEXT; // Text-format .x file
// Load mesh into m_pMesh and determine values of m_pMaterials and
// m_dwNumMaterials with calls to D3DXLoadMeshxxx or other D3DX functions
// ...
m_pMesh=ent_getmesh(ent_dBox,0,0);
D3DXSaveMeshToX(
L"outputxfilename.x",
m_pMesh,
NULL,
m_pMaterials,
NULL,
m_dwNumMaterials,
dwFormat );
}
wait(1);
}
}
That's kind of simple really... if it worked at all