Advertisement

3D mesh format?

Started by December 23, 2001 08:50 AM
4 comments, last by brewknowc 22 years, 8 months ago
Hi, I was wondering what file type do you save meshes from in a 3d modelling software so that they are compatible with direct3D? All the 3D modelling software can save and export in like 10 different formats, so I was wondering which one to choose. Thanks - Free Your Mind -
- Free Your Mind -
Well I suggest you use your own object format. Most (if not all) modelling programs include lots of unimportant data (well it''s important for them but usually not for the programmers). I usually write a converter, which turns the *.lwo (LightWave Object) files into my *.hob (Hazel''s Object . The hob format varies depending on what program I write and what I need it for.

If you organise your file well in a way that it includes the same data as the object structures in your programs, you may also be able to make loading it much easier - one fread may read the whole header, then anothre one the vertices, faces...

I also used objects included directly into my program. I wrote another converter, which turned the *.3ds into a *.h file with all the data for my engine. But it''s not a very good idea when you use big objects. This way the executable gets bigger and bigger.

Hope it helps you. If you need any format descriptions, you may try www.wotsit.org, or mail me if you need any more help.

Greets,
Hazel
Advertisement
Oh I forgot you asked about Direct3D. I usually use OpenGL, so the only thing I know is that there is a *.X format used with DirectX. There are probably many exporters available on the net, or at least converters.

(But I still suggest you use your format)

Hazel
Export the file from your 3d editor and turn it into a *.3ds file.

Then look under the directx files for a file called conv3ds.exe (if you cant find it, email me at Yankees135@yahoo.com and I can send it to you)-- it should be in a folder called utilities.

Then put conv3ds.exe in the same folder as the *.3ds file.

Then go to start, run, and type "command.com" (that is in Windows ME for sure, I believe it is also in win 95, 98--if it doesn''t work, try typing "cmd"). Once at the ms-dos prompt, type cd\directory of 3ds file. Then type conv3ds name_of_3ds_file.3ds

Now you have a ".x" file which microsoft has written some functions for.

Hope this helps. Feel free to email me at Yankees135@yahoo.com if you need more help.
Feel free to email me at NYYanks432@hotmail.com if you have any questions
Thank You, I just looked and found the convert utility. I knew there had to be someway to get other formats to .x format, otherwise who would use the other formats, right?
Thanks again.


- Free Your Mind -
- Free Your Mind -
> otherwise who would use the other formats, right?

Not everybody is interested in .x format files...

This topic is closed to new replies.

Advertisement