Archived

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

moorphene

Using Non- .X file models in DirectX

Recommended Posts

I was wondering how can I use a model with a different non .X file extension (such as created using 3dsm, softimage, etc.) in DirectX? Could I do something such as: D3DModel* model="nonxfilemodel.3dms"; I''m new at these so please don''t laugh if this is totally wrong

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It''s all data, it just happens to be in a file. Direct3D happens to have built in functions to extract that data from .X files. But, there is nothing stopping you from manually reading in data from another file (or a .X file for that matter) and contructing the model yourself.

Share this post


Link to post
Share on other sites
That is, in fact, totally wrong.

Files don''t magically become D3D objects. You need code to load a file. D3DX only supports X files. Any other file format is up to you.

I like pie.

Share this post


Link to post
Share on other sites
just choose a program that you want to export with like Maya and then search on google for importers. I found one for Maya that handles there GW2(?) format. But the code is usually a couple of files big so It won''t help for somebody to post it in the forums.

Share this post


Link to post
Share on other sites
quote:
Original post by moorphene
I''m still not all the way sure how to load a non .x model type. Can you please explain with a small code snippet as an example?


It depends on the file format. Are you asking how to open and read files? Or are you asking for libraries that will do it for you (not a bad question)?

I like pie.

Share this post


Link to post
Share on other sites
I''d like to know where I can find some libraries for loading models and rendering them with DirectX. I have a fairly basic framework for an engine, but I haven''t been able to find any tutorials on loading models with DirectX. I''d prefer milkshape, md2, md3, halflife or 3ds files. The only thing I''ve been able to find is the one on NeXe, which is absolutely riddled with bugs and bad coding.

Share this post


Link to post
Share on other sites
Yes... "a small code snippet"... there isn''t any if you are planning to do that... You''ll have to find out if someone has been a good boy and writet a library to do that. Otherwise you just have to do it yourself or use the x...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
there''s a md2 wrapper class for dx8 available at http://www.gamedev.net/reference/articles/article1653.asp

Share this post


Link to post
Share on other sites