Skip to main content
GameDev.net gamedev.net
🔒 Locked

3D File Format

Started by I_Smell_Tuna Dec 12, 2005 at 9:29 AM 5 replies 1.8k views
Original Post
I_Smell_Tuna
I_Smell_Tuna
I'm looking for a 3D file format for a video game that I am making and I want peoples opnions on what would be best to use. The 3D file is going to be for character models and needs to have internal skeletons, animation information. Are textures usually put into the same file as a 3D model or kept separate? Either way I'm sure I could handle the texturing. Eventually I would like to make my own 3D format but I need something to work with in the mean time.
Captain P
Captain P
Whether or not you want to keep textures as seperate files is up to you. Keeping them seperate is usefull if models share a lot of textures and as a modeller myself, I find it easy to be able to modify a texture without having to recompile the model.
Then again, putting them into the model file might load faster and may have other advantages.

I'd say, take a look at the advantages/disadvantages of each method and decide what's the best one for your game.
kburkhart84
kburkhart84
I'd say to try MD2, but you wanted skeletal animation. maybe the (bloated) .x format could work, or .ms3d(Milkshape 3d). I don't know of any formats that store the texture itself inside the model, rather they store a path to the .BMP/.PCX/.whatever file(preferably relative). I think it is best this way because you could use the same model with different skins. Remember Final Fantasy where you would see the same enemy but stronger. The original looked original, but the stronger version was tinted differently, as in usually a reddish version. You could utilize this, except that in 3d with skinning, you could make it more than simple texture tinting, rather a complete change. I think you need to check your requirements for what you need to do with the format, then find the format that does all of that with the least amount of other things that you don't need. The MD2 fits my requirements since I need animation(not skeleton) and I need textures. The normals, I calculate them myself so I don't need those. Each person has certain needs. In the end, you might have to create your own format, but look at existing ones first since there may easkily be one that is just what you need.


hplus0603
hplus0603
Pretty much the only time the texture is part of the asset file is when you "bake" an entire level for loading on consoles. Generally, the texture is kept separate -- that way, you can put three different textures on the same fish model, and call it three different species.

For model formats, there's .X if you're using Direct3D. It's already built-into the D3D SDK. If you're using something else, then there's the well-developed Cal3D format and animation library, or there's the open CX geometry file format. You could put the texture data inside Cx (it's open and extensible) but it's usually a bad idea.
enum Bool { True, False, FileNotFound };
I_Smell_Tuna
I_Smell_Tuna
The more I think about it the more I have realise that it is actually irrelevant where the texture is. Ok so for right now my options are MS3D and X, I also heard that .3DS has the features that I need, is this true? Of those three formats which is the most widely useable across all the popular modeling programs?
cheez_keeper
cheez_keeper
.3ds has import export ability from most common programs.

.x has a couple of utilities to get stuff from .3ds into .x model format... but i havnt found one that works really great.

from a programmers perspective, .x has a nice format to load (and if you use directX, your job is already done). .3ds is a bit of a pain to write a loader for...

right now i am writing a loader for .mi files which can be created from any software using mental ray rendering (3dsMax 7+, XSI, and Maya) and while they are easy to parse, there are SO many options and shaders that the task is becoming very daunting indeed.

the really nice thing about .ms3d is most of the low end/free software out there provides support for it. the format is also fairly easy to write a loader for, and there are plenty resources for info on it.

i guess my final point here is that you should use:
.ms3d if you have a small or non-exisitant budget, and intend to use open-source modeling packages.

.x if you want ease of use in your directX application (ie. dont want to spend several weeks getting meshes to load properly)

.3ds if you want to use high end models from 3dstudio max (the student version has actually dropped to about 100$ and is quite affordable now), and have the ability to parse through and load a complicated format. there are a LOT of publicly available 3ds models, and there are similarly a lot of wrappers written to load them if you dont mind relying on other people's code running your engine.

another easy format to load is .lws (light wave scene). LightWave has been gaining popularity lately, and we should be seeing quite a few modelers start to use this package.
Brett Lynnescheez_keeper@hotmail.com
I_Smell_Tuna
I_Smell_Tuna
Thanks for the replies. Based on what I've heard from you guys I will probably end up using ms3d and 3ds, because I'll be hiring some freelance artists and I know they currently use 3ds, and the rest of my team will probably use ms3d because it's very affordable and meets the requirements. We are not using DirectX so I will try to keep everyone from using the .X format to limit the number of formats we'll have to deal with. I suppose we can always use a format converter if the need ever arises.

Topic Locked

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

Sign in to reply to this topic.