model files

Started by
9 comments, last by staticVoid2 16 years, 2 months ago
hi, I was wondering if it would be better to include functionality for .x files or 3dsmax files in a software renderer rather than creating a new file format for storing models. An advantage I can see are that I wouldn't have to create another application for creating/editing these models. Do most 3d engines use standards like .x etc. or do they include thier own model/map editors?
Advertisement
You can create your own model format and build an export tool (or even 3DS Max plugin). That way you can still use an existing editor while having a custom file format. Having said that, I wouldn't bother with that unless you have very good reasons for it: you need to include data currently not supported by any format, you have a very strict limit on file size that no format can guarantee, you are able to increase load time by several magnitudes by using you own format, etc. Using an existing format not only saves you al lot of work and potential bugs, it also allows others to make models for you renderer more easily.
thanx, what format is the most well known or best in your opinion? and can I get freeware editors for it, because I've heard that 3ds max costs somthing close to £2000.
First you should note that a software renderer like any other core 3D API does not really have anything to do with file formats. Your software renderer should be a standalone library/component WITHOUT integrated support for specific file formats.
It should just be an API light OpenGL or DirectX to get something to the screen.

Loaders for different file formats can be added as a separate package together with modules that display the loaded files. The load and display modules could support multiple rendering APIs one of which would be your software renderer.

EDIT: Blender is a nice modeller (although with an unintuitive interface for beginners) and can export to many formats (e.g. .obj, .3ds, .x)
Quote:Original post by staticVoid2
thanx, what format is the most well known or best in your opinion? and can I get freeware editors for it, because I've heard that 3ds max costs somthing close to £2000.

Blender is free, and can export to many formats.

As for the format you want to use, that depends on your requirements.
thanx.
Quote:Original post by WanMaster
Quote:Original post by staticVoid2
thanx, what format is the most well known or best in your opinion? and can I get freeware editors for it, because I've heard that 3ds max costs somthing close to £2000.

Blender is free, and can export to many formats.

As for the format you want to use, that depends on your requirements.


Depends also on your level! If you are a beginner I won't suggest things that are complex.

In my case, supporting inter-exchange formats allowed me to support many DCC applications. I had a requirement which "translated" was to make all I can to make it easy for artists to import data in the engine so I ended up supporting data from as many DCC tools I could. And that also meant that I should support the tools artists already know as much as I can specially for things that those tools were designed for like Scene Editing.

For example, I made a loader/exporter lib for my renderer that accepts DAE (COLLADA), FBX (Autodesk Proprietary format) and my own format. It can load all three and write only in my own format (so I can export the data). FBX is supported by at least Maya and Max, COLLADA is supported by Maya, Max, XSI and many others. I will also note here that those are formats are just too complex for game development and shouldn't be used directly in games. Haven't looked at the FBX plug-in for XNA yet [wink] and hope they made a better interface for game developers.

I'm planning on having my own Scene Editor later that will also allow me to modify bits of models or scenes to add things specific to the engine and create other structures that can't be made in current DCC tools. But for now, and probably for a long time, all my scene editing will be done in DCC tools.

One remark I always make when talking about those formats is that those should only be used to communicate between tools and shouldn't be used in the end as the format you load in the game.

Parts in bold are there to insist on the fact that this applies to me and not necessarily to you as you should choose with your own requirements (or finally set them if you don't have any).

All decisions should depend on your level and requirements. Loading [OBJ, .X, .3ds, etc.] files might be the best if you are beginning in the 3D world and many more advanced people still use them (most don't need more than that).

Also, there is a free version (for non-commercial use) of XSI that can export COLLADA, .X, Obj, etc. formats (limited to a maximum of 65 000 polygons, I think). Even though I have a license of XSI 5.1 I don't even use it anymore and use the free "XSI 6 Mod Tool" instead.

JFF
thanx im just going to stick with .x files for now - Its a nightmare parsing the files, especially when there in txt format. can you only store one texture coordinate per vertex in .x? I remeber having to adjust my own format just to get over this problem for vertices that were shared by more than one face. Does anyone know of any good tutorials or references about parsing the files manually without using direct3d.
I just realized '.x' stores 24 vertices for a cube? when it should be 8, I know this solves the problem with the texture coordinates but isn't this a bit inefficient?
Depends...
A cube cannot have "sharp edges" unless it has 24 vertices.. :)
"Game Maker For Life, probably never professional thou." =)

This topic is closed to new replies.

Advertisement