A question about X file

Started by
4 comments, last by Jiia 18 years, 10 months ago
When the model's polygon more than 1000,it fails to load X file in my code,so does MeshViewr. I use 3d max and panda exporter. Can someone give me a tip? thanks.
Advertisement
I've loaded models with more than 30,000 polygons, so I'm pretty sure it's not x-file related. You should try to narrow the problem down a bit and post the small section of code you think may be failing. Also, the Panda exporter has many flaws. You might want to consider changing to the Quest exportor or using the built-in SDK version.
I'm having the same problem, I try loading a mesh with... I don't really know how many polygons and it fails, but I load a ball. and it's fine. Do you think is video card related. Some code.

VOID Table::Start(TABLE &Table){	LPD3DXBUFFER pD3DXMtrlBuffer;	Table.g_pMesh          = NULL; // Our mesh object in sysmem	Table.g_pMeshMaterials = NULL; // Materials for our mesh	Table.g_pMeshTextures  = NULL; // Textures for our mesh	Table.g_dwNumMaterials = 0L;   // Number of mesh materials// Load the mesh from the specified fileif( FAILED( D3DXLoadMeshFromX( Table.Table_Name.operator LPCTSTR(), D3DXMESH_SYSTEMMEM,    g_pd3dDevice, NULL, &pD3DXMtrlBuffer,    NULL, &Table.g_dwNumMaterials, &Table.g_pMesh ) ) ){    // If model is not in current folder, try parent folder    if( FAILED( D3DXLoadMeshFromX( "table.x", //Table.Table_Name.operator LPCTSTR(),                  D3DXMESH_SYSTEMMEM, g_pd3dDevice, NULL,             &pD3DXMtrlBuffer, NULL, &Table.g_dwNumMaterials,             &Table.g_pMesh ) ) )        {            MessageBox(NULL, "Could not find " + Table.Table_Name ,			           "Meshes.exe", MB_OK);			{				Table.State = E_FAIL;				return;			}        }}


here is where it fails...

any opinions...
Marco Tapia
I've have this problem as well. I think its the exporter I use though, I use panda exporter it gives me other problems as well. [crying]

Where is the URL for this "Quest exporter?" I want to try it. [smile]
Hey buddy, I just figured out what was happening, well my problem was, bad modeling... The thing is, when you draw a mesh it some times has doble points or doble lines... well, when this happens you get faces with less that 3 vertices.
In the x file the vert and the reference to those verts are made, but the face is not exported and the import fails.

I suggest you revise the model. If you are like me, a programmer that is trying to model something to put in a game. Try doing a lot of modeling tutorials so you know the best way to avoid this.

Best of luck...
Marco Tapia
Quest3D - "Development Kit" link, then "Tools and Exporters".

This topic is closed to new replies.

Advertisement