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

Cross platform .X loader, anyone interested?

Started by HailHead Mar 11, 2003 at 2:17 AM 54 replies 9.1k views
Original Post
HailHead
HailHead
Howdy. So I really like OpenGL, and despite how pointless it may seem, I decided to make a .X loader that didn''t require me to install the DXSDK. Then I figured, -hey-, that means it would work on other platforms, so, my question is: should I continue this development? Right now I''m happy with what I''ve got: a 90% working ascii .X loader, and 50% binary loader. It started as one of those programmer things where you do it because, but I don''t intend on finishing the binary part unless people are interested. Opinions?
Crayons don''t kill people, death does.
Mihail121
Mihail121
Since i''m something like 3D formats specialist(friends opinion) and i love cracking and etc. i want to work with you in order to create the cross-platform X loader.Ofcourse i''ll work with OpenGL.Just tell me what i can do for you guys!

The PAIN is coming...this summer!!!In cinemas everywhere.
Jehsup
Jehsup
I would definately be interested! Post your results.

Keep up the good work.

J
HailHead
HailHead
Hehe, cool: similar interests.

Well, I noticed that some ascii X files are just a mess, some of them are just a list of entities, and some of them are properly structured OOP files (which I reckon are probably a more accurate representation of the original binary format).

I''ve reverse engineered a couple of serialized files before, and it looks similar, my ONLY point that I''m struggling with is getting models that represent all the different possible combinations of abuse of the format.

Not to sound ungrateful, it''s just that I consider myself a bit of a 3D file format guy myself, and you''re stepping into my territory

The way you could help me most is by competing with me
Motivation is the only thing that can stop me ever.

I dunno, I''m always open for help, so should we get into contact and make a totally crossplatform 3d file format library that kicks? How about that? And for every language. Delphi, C, Kylix, C++, PHP... it would be cool learning other languages doing this.

Your idea?
Crayons don''t kill people, death does.
BLade_X
BLade_X
I''m also interested in making a .X file loader. I would definitely be interested in the ascii loader. Contact me if you are interested.

Thanks,
Manju
HailHead
HailHead
COOL!

Enthusiasm.
Sweet.

So yeah, depending on if I am working this weekend, I''ll put a page up this weekend with what I''ve got so far, and I''ll make it a community project, kinda like a public-private-sourceforge thing. Anyone who wants to participate, cool.

Hell, what''s everyones opinion about starting a SourceForge page for it? Or should we see if we move forward first?

Thanks to everyone who replied.
Crayons don''t kill people, death does.
Mihail121
Mihail121
Very nice to see so many people wanting to work on something so strange as X files.I don''t wanna tell this but i once thouth that the X files was stupid and i didn''t know actually why.But the idea to make them supper portable and avaidable on all kind of platforms is suppr cool!Just keep me informed on my mail:
mihail1212@yahoo.co.uk about the stuff and tell me when the page is ready.I''ll be more than happy to test,code and all other stuff.

The PAIN is coming...this summer!!!In cinemas everywhere.
HailHead
HailHead
So,

the ASCII loader is now about 98% complete, it''s even got a renderer for it and the works, hooray!

As for porting X files being strange: sure, but I can''t stand the fact that I first have to install a 200gig SDK to load a file. So I thought make an independant loader, and if I get cross platformality [ ] at the same time, then -hey-. I will keep all who have expressed an interest updated.

Thanks again for the interest.
Crayons don''t kill people, death does.
illume
illume
I''m interested in your loader. Please post the sourceforge page or whatever when you''ve got something up
HailHead
HailHead
Heya,

well, I'll try my utmost to have a page up by Sunday as an intermediate step towards a SourceForge page (as I have never set one up or used one - anyone want to help? -, it will take a bit longer to set up, and I'm keen to get something out).

[edit]
Oh, and I will set the SourceForge page up, I'm not that lazy, it's just CVS that I'm not too sure on, I mean c'mon, I'm a programmer, like I _use_ CVS
[/edit]

I certainly hope to get total functionality built in.
So far I've loaded 15 different X files that I downloaded (seeing as I don't have any X file creater - installing TrueSpace 3.2 today), and all have loaded successfully, frames, meshes, materials, uv coord, normals, all with the hierarchy in place. (talking the ASCII version here, the binary version, well, it finds all the objects, loads normals and face indices, but the rest has to still be done, planning on having it by next week) - the default renderer for the objects only renders shaded faces for now, but looks ace!

And the BZIP part shouldn't be hard at all, ahem

I'm finalising the interface for the classes tonight, and compiling it on Linux tomorrow.

And granted, all I need is the libs and header file, but this way it compiles on Linux effortlessly (in theory), and 'tis fun darn heck it!

So yeah, speak tomorrow hopefully.

[edited by - HailHead on March 14, 2003 6:10:13 AM]

[edited by - HailHead on March 14, 2003 6:20:58 AM]
Crayons don''t kill people, death does.
HailHead
HailHead
Hey all,

I know you couldn''t wait for this, about as much as the end of the world, but I put a temporary page up with the first version of the loader.

http://www.hacsimile.co.za/tutorials/temp.html

Ok, so the page and code are shocking, but -hey-, I wanted to get it done so I could finish the binary loader - which I reckon is going to give 100% compatibility because it doesn''t have to deal with programs that never learnt about _style_ and _structure_ when they write the ASCII files out.

Comments, flames and crayons are always accepted.
And don''t be put off by the poor quality of this, it''ll get way, way better soon.
Crayons don''t kill people, death does.
lapougnou2
lapougnou2
Do you plan to support AnimationSet and bezier patch?
lapougnou2
lapougnou2
Do you plan to support AnimationSet, bezier patch and SkinWeight?
HailHead
HailHead
First off: thanks for actually giving it a go.

@lapougnou2: I hope to implement everything, and I am currently working on AnimationSets

And as for the parse errors, yeaaah, seeee, I started this without reading a thing about the format, and just guessing, then I found a page on GameDev about the format and kicked my rear. I''ll have a new version very soon that will hopefully alleviate all the problems you are having. (a lot of which were due to my misunderstanding of how templates work - you can''t just ignore them oddly enough

As for the scaling, well, in the Delphi Viewer, if you hold the middle mouse button and move backwards and forwards, it will translate the camera along the Z axis, so you could bring it closer, OR the ever-descriptive "1" in the text box is the scale at which to show the object. (I know I need to provide at least minimal documentation - coming)

But yes, the renderer needs TONNES o'' work.

And whoever is interested: the binary version is shaping up superbly... way better than the ASCII version.
Crayons don''t kill people, death does.
_nomad_
_nomad_
nice project dude!

just a suggestion: is your loader in c++? will your loader allow pure C programs to load in .x files?

...i just think that this would be a great "partner" for OpenGL if it looks more or less how OpenGL looks (like the function names, etc.).

...just my $0.2....

...i think this is one of those project that will get a lot of buzz when it''s finished...also, will it be free?



nomad | nomad forum
HailHead
HailHead
@nomad: whattup and all that. I am currently working on the C++ and Delphi versions.
However, last night as I was busy on the binary format, I realised I hadn''t implemented a single class (in my code) yet, so I ''spose pure C will be an option.

The only problem there is storing the data. It will be fine if all you want to load is eg: a single animated mesh. I''m not too sure how people would want the rest of the data stored though. I mean, there are meshes within frames within frames within frames... and the only way I thought of doing it is by having arrays of structures, but then surely that''s implementing classes in a different way?

So, yeah, C would be an option, I just need opinions on how to store the data.

I never really gave the "partner" idea a thought. That''s a bleeding good idea. I will take a look at that too.

It will always be free, and I don''t drink beer, so I don''t know what free as beer is, but it will be free as in you download the code, do whatever you want except blame me for shoddy coding

As for buzz when it''s finished, I''m curious why you say so, but I appreciate the compliment nonetheless.

But yeah, I have one thing to ask: that no one judge the alpha stuff I did, have patience, because the final product (with the tutorial) will kick.

Wow, I _do_ love the sound of my own typing don''t I?
Crayons don''t kill people, death does.
lapougnou2
lapougnou2
You can implement your code in C++ and add a C wrapper:

int xLoad(char *filename, xEnum options);
void xUnload(int id);
void xBind(int id);

void xHint(xEnum option, void *param);
void xDraw();
void xAnimate(float frame_time);

...
lapougnou2
lapougnou2
When will the next version be released?
HailHead
HailHead
Well, my releases are going to work as follows:
ASCII version, then the binary version, then an update to the ASCII version etc.

Now, I''ve got the binary version loading meshes, frames and all that, but I''m stuck at the moment with loading animations.
BUT, that means that the initial binary release will support animation loading.

So, the next release _was_ going to be this weekend, and still might be possible if either I hit a brainwave, or I release it sans animation support.

@lapougnou2: if I were to go C, I wouldn''t just make a C wrapper for C++, because that would make it impossible to compile everything with a plain C compiler, and making it plain C wouldn''t be too much work anyway. Or am I being stupid?
Crayons don''t kill people, death does.

Topic Locked

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

Sign in to reply to this topic.