Jump to content
  • Advertisement
Sign in to follow this  
DoctorMorbius

Simple universal mesh file format recommendations

This topic is 2600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello

I'm currently working on a more up to date version of a commercial game I worked on about 10 years ago.
One of the things I might have to do is modify some of the game's meshes. The mesh format for the original game is a propriety format and is fairly simple.
What I want to do is write a converter from the proprietary format to one that can be edited in a popular mesh editing package (probably Maya or Blender).
I was wondering if anyone has any recommendations, at the moment I'm considering the DirectX .x format but I'm wondering if there is something more neutral out there.
I also looked at COLLADA but it seemed to complex for what I want.
I don't mind converting it in multiple phases if that means I have less to code!
In a nutshell my mesh format looks a bit like this:

Header:
char[4] File Type Identifier
U16 Version No Major
U16 Version No Minor
U16 Number of material blocks
U16 Number of textures
U32 Junk
U32 Flags

For each material block:
U16 Material Flags
U16 Number of texture blocks

For each texture block
U16 Texture index
U16 Number of vertices
U16 Number of triangles

For each vertex
F32 x,y,z Vertex position
F32 nx,ny,nz Vertex normal
F32 tu,tv Texture coords

For each triangle
U16 a,b,c Index of each vertex

For each texture:
Texture Header
U32 Offset
char[32] Texture name
U16 Width
U16 Height
U16 Texture Format (8888, 5551, DXT1 etc.)


Thanks in advance,
The Doktor

Share this post


Link to post
Share on other sites
Advertisement
I think you have the option between the following formats:

1.) .obj which is very limited in what it can store, but it might be enough for your file format as that seems pretty simple as well.
2.) Collada, as you mentioned.
3.) FBX, using the FBX SDK.

I think these are the three most supported formats out there.
Pretty much all 3D software should support those.

The .obj file format is probably the easiest way to implement.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!