-
Seeking Format Advice
Howdy! I'm looking for a little bit of advice in two major areas in regard to a project I'm working on: texture file format, and model file format.
Firstly, I was wondering about the merits of and opportunities for using the DDS (DirectDraw Surface) format. Now, I'm using OpenGL and it seems fairly self-explanatory that DDS has Microsoft blood running through its veins, but could it still be relevant for me? Is DDS really a Microsoft thing that's use is mostly restricted to DirectX or is DDS just a name they gave to an existing format used in other places when they started using it? I ask this because I've seen some references to DDS being used with OpenGL, and I have to admit that the idea of conveniently packed pre-rendered mip-maps appeals. Otherwise, I suppose I could just use some more 'normal' file format and generate mip-maps for my textures on the fly; is this the more common way of doing things?
Next up is model format. I really have no idea what would be a good format to use, so I'll state my needs, and maybe somebody can recommend something. I don't need anything fancy; just co-ordinates of triangle (or more complex polygons; I can take care of the geometry before converting to this format) vertices, and texture coordinates for a single texture - which I guess is the common denominator for all 3D model formats (but hey, I'm certainly not averse to being proven wrong!).
Any suggestions will be greatly appreciated.
Thanks all! :)
Jeff
-
hmm, I take it from you talking about .DDS you know how to make normal maps. Photoshop has a great tool for making normal maps and converting them to .dds. For my textures I use a set of 512x512 with 8 128x128 textures in this and use U,V coordinates to set the textures. The reason for this is changing texture files during runtime will slow your fps down alot. My textures are in .jpg and normal maps are in 3x3 encoded .dds and that's how it should be for best quality. I suggest you do something similar to that for the best quality, speed is a different issue and you should be able to figure that out yourself.
As for models, .X is the preferred format due to there are a bunch of functions already in DirectX that can load them and manipulate them. D3DXLoadMeshFromX() is an example which can grab your textures, materials, vertices, world matrices, etc from your .X file. As for production, you should make your own format with only what you need in it to speed up your loading times because .X contains alot of useless data.
Hope this helps.
-
Thanks for your reply :)
I'm actually using OpenGL; sorry if that was a little unclear in my original post.
I had the OBJ format recommended to me by a friend and it looks pretty suitable; anyone have any other suggestions, or complaints about OBJ?
Cheers
Jeff
-
.obj aka wavefront obj.
ascii text format file describing a 3d mesh object, with texture data most often a linked .mtl or image file.
the biggest drawback to obj format is that you MUST ensure the models are "low poly" or you can wind up with a 100mb object.
obj is the most capable format for 3d objects, allowing for far more complex objects than any other format. ( see drawback above )
the associated .mtl is a texture definitions file, with only basic colours and patterns available to it. most people / groups / companies using the obj format will use .jpg or .tiff to actually texture the object, as then they gain the output of apps like photoshop for really high quality textures.
GMAX is a free tool for creating both objects and textures, and is opengl friendly. ( specificly, game oriented object creation )