Archived

This topic is now archived and is closed to further replies.

Nims

LoadMeshFromXof

Recommended Posts

hey all, I''m trying to compile some files into a single binary file. But when I want to read the file again, I don''t know how to do it. For instance, I read the file from the buffer and now I have a pointer and the size of the buffer. the LoadMeshFromXoF function needs a DirectXFileData object to load a mesh to it. But since the SDK kills you before teaching something, I don''t know what part of the .x file I have to put in the DirectXFileData object so the Mesh would be loaded properly. Do I have to contain the header information and all the templates? or just the mesh and normals. And If so, do I also have to load the materials with it to? Please give me a general idea. -Nims
How do you build your mesh???
Some popular 3d modeling programs like 3d Studio,True Space and Lightwave have their own exporter that allow the user export their own model as .x format.
.x file not only including the mesh and vertice,but also comes with animation,material and texture data.

>Do I have to contain the header information and all the templates?
>>Yes.

Share this post


Link to post
Share on other sites
Well I''m bulding them with 3ds max and I export them as 3ds then convert them to .x

as an experiment I tried converting it in text mode with conv3ds

I found the templates and stuff, but If I want to isolate meshes in a .x file what shall I do? Like I have a mesh file with 5 objects and I want to save them seperately so they can be loaded later as objects . How can I do this?

Thanks
-Nims

Share this post


Link to post
Share on other sites