Sign in to follow this  
Rryk

Blender DirectX .x material export

Recommended Posts

I've created a mesh in a Blender. Then I've exported it into .obj file and UV-mapped in UVMapper. Got a new mapped .obj file which I've imported into blender. Now I need to export that mesh into .x file so I could render it in DirectX with texture. I've tryed to export with standart .x exporter and DirectX8 exporter found in this article: http://www.gamedev.net/reference/articles/article2255.asp. But it didn't helped me. Every time I execute this code: D3DXLoadMeshFromX(L"dragon.x", D3DXMESH_SYSTEMMEM, d3ddev, NULL, &bufShipMaterial, NULL, &numMaterials, &meshSpaceship) it returns numMaterials=0. So I cannot load any material. What is wrong with this? Why do I get 0 materials (whereas in plain text of .x file there 3 materials)? How do I fix that? PS: I think this question to be at the beginners level, but i think it is more DirectX-related, so I posted it here. Sorry if i was wrong.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this