Skip to main content
gamedev.net
🔒 Locked

3D Model File Format Question

Started by BrianMJC Mar 10, 2005 at 11:14 PM 1 replies 900+ views
Original Post
BrianMJC
BrianMJC
Hey all, I'm new to 3D model coding, and would really apreciate help in determining which file format(s) are options for my situation. I've read through the DX documentation and also the forum FAQ, but am still not sure. To be honest, I don't know enough yet to even know what exactly I'm looking for. I would normally take the time to learn 3d model coding first, and then browse around looking for what I need on my own. But my artists are making models as we speak, I'm not scheduled to begin coding them for five or six weeks, and we're on a deadline, so I really need to know my options now. My situation is, I don't want to write a file loader (a.k.a. a library must support it), it must be compatible with both DirectX and OpenGL (or at least DirectX for now), and the solution must be free or cheap and not require that I make my game open source. The DirectX documentation states that an exporter exists to convert 3D Studio Max .3ds files to DirectX .x files, which can then be loaded using the included DX file loader functions, but it doesn't work with .NET strangely (only VS 6 or VC++ 6). I imagine I can't go wrong with .3ds, but I want to make sure, instead of finding out the hard way. Thanks much, I really appreciate it. :)
jollyjeffers
jollyjeffers
Quote:
The DirectX documentation states that an exporter exists to convert 3D Studio Max .3ds files to DirectX .x files, which can then be loaded using the included DX file loader functions, but it doesn't work with .NET strangely (only VS 6 or VC++ 6).

".X" files break one of your original requirements - they're not, by default, cross platform. You could definitely use the file format with OpenGL (and hence get a degree of cross platform support), but I'm not aware of there being a pre-rolled library for this. Means you'll get X file loading for free under Windows/DX, but you'll need to roll your own for other platforms.

.X file loading is supported across the API (Managed and native) - strictly speaking, its not supported for VC++ 6 due to said compiler no longer being officially supported for ANY of the DX-SDK.
D3DXLoadMeshFromX( ) (C/C++)
D3DXLoadMeshFromXInMemory( ) (C/C++)
There are Managed equivelents, but Microsofts MSDN/DirectX site is going through one of it's "I'm broken, dont waste your time here" moments[smile]

.3DS is a popular choice, but from what I've heard it can be a grey area to work with - the format specification is still officially owned by Discreet/3DSMax (?) so the information you'll find might work but isn't necessarily official. I could be wrong here though [smile].

Another option is, depending on the tools you're using, you could write your own plugin/convertor. I'm told this isn't too much of a job in 3DSMax/MaxScript, and if you know everything about the fileformat you can create a cross platform loading class in an afternoon if you're good [grin].

Wotsit.org has lots of information on file formats, have a look at what they've got - you might spot something you like...

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
BrianMJC
BrianMJC
Thanks for the help. :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.