Please explain .x format. Is it better for maps, etc

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Wolf Dreamer
Posts: 121
Joined: Tue Feb 10, 2004 6:39 am
Location: the land of chaotic dreams
Contact:

Please explain .x format. Is it better for maps, etc

Post by Wolf Dreamer »

It seems to me that the information for an .x file is rather easy to look at when opened in notepad. Its basically just a .txt file.

Aren't other files faster to read than .txt files, perhaps because they compress the information more? Or would it not matter these days?

When the same object is found on several places on an .x map, does it go through all those coordinates again, or does it just say this object x,y,z facing direction, and another one at x,y,z, facing direction?

Looking over Waterworld.x files I see a lot of the same things over and over again, sometimes so identical there is a number differant. Odd really. I'm thinking this is probably how they make water, by constantly changing the material in that same area back and forth. Seems like a strange way to do it though, having to list it over and over again.

I've searched the net and can't find any information about the .x format. Why is it said to be better by some of this forum? And does it have another name? I find it odd that when I search for it I'm not finding anything.

Has anyone converted a map into various formats, and then tested to see how fast each loads up under differant conditions?
The last sane human being in a world gone mad

http://s8.invisionfree.com/Game_Maker_f ... hp?act=idx
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

.X files can be ithere test binary or compressed binary but at this time Irrlicht only reads ones saved as test(correct me if I am wrong but they are the only ones that work for me).

I think that they list common elements over and over is for speed. I mean think about it you do not want to have to decompress an image at run time to display that is a waste of CPU.
Tels
Posts: 65
Joined: Fri Feb 27, 2004 7:56 pm
Location: Antarctica
Contact:

Post by Tels »

[quote="thesmileman"]
I think that they list common elements over and over is for speed. I mean think about it you do not want to have to decompress an image at run time to display that is a waste of CPU.[/quote]

That does not make sense. The file is only decompressed during load, and then stored in some internal format. Not repeating stuff would greatly reduce the file size (well, the repetive file would compress good, but uncompressed it would be huge)

OTOH, if you don't repeat objects (but just store their difference like) you need a slightly more advanced loader. If you just repeat them you can build very easily a dump loader that just loads every object.

I am pretty sure that you can do both with .x files. Does anybody have a spec? Is this format open?

my 0.2 Cents,

Tels
Perl + Irrlicht + Audiere = Game: http://bloodgate.com/perl/game
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

I chose the .x file format, because it is open, extensible, and easy to understand. Specifications can be downloaded from microsoft.com and are included in the msdn library and the D3D documentation, which comes with every VisualStudio. Also, there exist already a free and open source exporters for popular 3d modelling software. There is also a free exporter for maya and max made by microsoft itself. Other 3d modelling packages like blender and ms3d seem to have (soon) built in support for .x, so I think this could get the 3d format of the future.
Post Reply