XFormat

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

The X File format is a file used by Microsoft for easy loading, and animateing of meshes in Direct3D.

History

The X File was first introduced around DirectX 7 or 8 SDK. The X file is pretty much one file that contains all texture coordinates, primative coordinates and value in one compact file.

Using in D3D

The advantages of using X files is that all coordinates for mesh and texture are in the file, and the file can be loaded and parsed with a few built in functions in the DirectX SDK. However, it is harder to use X files due to their sheer complexity, although everything is in one file, it takes some code to set up, and can be imtimidateing when converting from one model type such as milkshape files since when the DirectX API reads the mesh file, there are the possiblities of holes to be in the final product even if the modeling program shows none. If simple meshs (cubes) are used, in a game it might be better to use a standard file such as 3DS or just 'hard coded' coordinates.

External Links