.X converter

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
Dogs
Posts: 195
Joined: Wed Sep 15, 2004 1:04 am
Location: michigan

.X converter

Post by Dogs »

I downloaded a very nice editor that exports to .x format but the format wont load into irrlicht...
Is there something I can change in the code of the X file or do I need a converter to convert it to diff X format to work with this engine..?
The file is below... simple room with all seperate walls..

xof 0302txt 0032

Header {
1;
0;
1;
}

// Created by DeleD

Material fix_013 {
1.000000;1.000000;1.000000;1.000000;;
0.000000;
0.000000;0.000000;0.000000;;
0.000000;0.000000;0.000000;;
TextureFileName {
"fix_013.bmp";
}
}

Mesh userdefined1 {
24;
256.000000;0.000000;-256.000000;,
-256.000000;0.000000;-256.000000;,
-256.000000;128.000000;-256.000000;,
256.000000;128.000000;-256.000000;,
256.000000;128.000000;-266.000000;,
-256.000000;128.000000;-266.000000;,
-256.000000;0.000000;-266.000000;,
256.000000;0.000000;-266.000000;,
256.000000;0.000000;-266.000000;,
-256.000000;0.000000;-266.000000;,
-256.000000;0.000000;-256.000000;,
256.000000;0.000000;-256.000000;,
-256.000000;0.000000;-266.000000;,
-256.000000;128.000000;-266.000000;,
-256.000000;128.000000;-256.000000;,
-256.000000;0.000000;-256.000000;,
-256.000000;128.000000;-266.000000;,
256.000000;128.000000;-266.000000;,
256.000000;128.000000;-256.000000;,
-256.000000;128.000000;-256.000000;,
256.000000;128.000000;-266.000000;,
256.000000;0.000000;-266.000000;,
256.000000;0.000000;-256.000000;,
256.000000;128.000000;-256.000000;;

6;
4;3,2,1,0;,
4;7,6,5,4;,
4;11,10,9,8;,
4;15,14,13,12;,
4;19,18,17,16;,
4;23,22,21,20;;
MeshMaterialList {
1;
6;
0,
0,
0,
0,
0,
0;;
{fix_013}
}
MeshTextureCoords {
24;
2.000000;0.000000;,
-2.000000;0.000000;,
-2.000000;1.000000;,
2.000000;1.000000;,
2.000000;1.000000;,
-2.000000;1.000000;,
-2.000000;0.000000;,
2.000000;0.000000;,
2.000000;2.078000;,
-2.000000;2.078000;,
-2.000000;2.000000;,
2.000000;2.000000;,
2.078000;0.000000;,
2.078000;1.000000;,
2.000000;1.000000;,
2.000000;0.000000;,
-2.000000;2.078000;,
2.000000;2.078000;,
2.000000;2.000000;,
-2.000000;2.000000;,
2.078000;1.000000;,
2.078000;0.000000;,
2.000000;0.000000;,
2.000000;1.000000;;
}
}

Mesh userdefined2 {
24;
-256.000000;0.000000;-256.000000;,
-256.000000;0.000000;256.000000;,
-256.000000;128.000000;256.000000;,
-256.000000;128.000000;-256.000000;,
-266.000000;128.000000;-256.000000;,
-266.000000;128.000000;256.000000;,
-266.000000;0.000000;256.000000;,
-266.000000;0.000000;-256.000000;,
-266.000000;0.000000;-256.000000;,
-266.000000;0.000000;256.000000;,
-256.000000;0.000000;256.000000;,
-256.000000;0.000000;-256.000000;,
-266.000000;0.000000;256.000000;,
-266.000000;128.000000;256.000000;,
-256.000000;128.000000;256.000000;,
-256.000000;0.000000;256.000000;,
-266.000000;128.000000;256.000000;,
-266.000000;128.000000;-256.000000;,
-256.000000;128.000000;-256.000000;,
-256.000000;128.000000;256.000000;,
-266.000000;128.000000;-256.000000;,
-266.000000;0.000000;-256.000000;,
-256.000000;0.000000;-256.000000;,
-256.000000;128.000000;-256.000000;;

6;
4;3,2,1,0;,
4;7,6,5,4;,
4;11,10,9,8;,
4;15,14,13,12;,
4;19,18,17,16;,
4;23,22,21,20;;
MeshMaterialList {
1;
6;
0,
0,
0,
0,
0,
0;;
{fix_013}
}
MeshTextureCoords {
24;
2.000000;0.000000;,
-2.000000;0.000000;,
-2.000000;1.000000;,
2.000000;1.000000;,
2.000000;1.000000;,
-2.000000;1.000000;,
-2.000000;0.000000;,
2.000000;0.000000;,
-2.078000;2.000000;,
-2.078000;-2.000000;,
-2.000000;-2.000000;,
-2.000000;2.000000;,
-2.078000;0.000000;,
-2.078000;1.000000;,
-2.000000;1.000000;,
-2.000000;0.000000;,
-2.078000;-2.000000;,
-2.078000;2.000000;,
-2.000000;2.000000;,
-2.000000;-2.000000;,
-2.078000;1.000000;,
-2.078000;0.000000;,
-2.000000;0.000000;,
-2.000000;1.000000;;
}
}

Mesh userdefined3 {
24;
-256.000000;0.000000;256.000000;,
256.000000;0.000000;256.000000;,
256.000000;128.000000;256.000000;,
-256.000000;128.000000;256.000000;,
-256.000000;128.000000;266.000000;,
256.000000;128.000000;266.000000;,
256.000000;0.000000;266.000000;,
-256.000000;0.000000;266.000000;,
-256.000000;0.000000;266.000000;,
256.000000;0.000000;266.000000;,
256.000000;0.000000;256.000000;,
-256.000000;0.000000;256.000000;,
256.000000;0.000000;266.000000;,
256.000000;128.000000;266.000000;,
256.000000;128.000000;256.000000;,
256.000000;0.000000;256.000000;,
256.000000;128.000000;266.000000;,
-256.000000;128.000000;266.000000;,
-256.000000;128.000000;256.000000;,
256.000000;128.000000;256.000000;,
-256.000000;128.000000;266.000000;,
-256.000000;0.000000;266.000000;,
-256.000000;0.000000;256.000000;,
-256.000000;128.000000;256.000000;;

6;
4;3,2,1,0;,
4;7,6,5,4;,
4;11,10,9,8;,
4;15,14,13,12;,
4;19,18,17,16;,
4;23,22,21,20;;
MeshMaterialList {
1;
6;
0,
0,
0,
0,
0,
0;;
{fix_013}
}
MeshTextureCoords {
24;
-2.000000;0.000000;,
2.000000;0.000000;,
2.000000;1.000000;,
-2.000000;1.000000;,
-2.000000;1.000000;,
2.000000;1.000000;,
2.000000;0.000000;,
-2.000000;0.000000;,
-2.000000;-2.078000;,
2.000000;-2.078000;,
2.000000;-2.000000;,
-2.000000;-2.000000;,
-2.078000;0.000000;,
-2.078000;1.000000;,
-2.000000;1.000000;,
-2.000000;0.000000;,
2.000000;-2.078000;,
-2.000000;-2.078000;,
-2.000000;-2.000000;,
2.000000;-2.000000;,
-2.078000;1.000000;,
-2.078000;0.000000;,
-2.000000;0.000000;,
-2.000000;1.000000;;
}
}

Mesh userdefined4 {
24;
256.000000;0.000000;256.000000;,
256.000000;0.000000;-256.000000;,
256.000000;128.000000;-256.000000;,
256.000000;128.000000;256.000000;,
266.000000;128.000000;256.000000;,
266.000000;128.000000;-256.000000;,
266.000000;0.000000;-256.000000;,
266.000000;0.000000;256.000000;,
266.000000;0.000000;256.000000;,
266.000000;0.000000;-256.000000;,
256.000000;0.000000;-256.000000;,
256.000000;0.000000;256.000000;,
266.000000;0.000000;-256.000000;,
266.000000;128.000000;-256.000000;,
256.000000;128.000000;-256.000000;,
256.000000;0.000000;-256.000000;,
266.000000;128.000000;-256.000000;,
266.000000;128.000000;256.000000;,
256.000000;128.000000;256.000000;,
256.000000;128.000000;-256.000000;,
266.000000;128.000000;256.000000;,
266.000000;0.000000;256.000000;,
256.000000;0.000000;256.000000;,
256.000000;128.000000;256.000000;;

6;
4;3,2,1,0;,
4;7,6,5,4;,
4;11,10,9,8;,
4;15,14,13,12;,
4;19,18,17,16;,
4;23,22,21,20;;
MeshMaterialList {
1;
6;
0,
0,
0,
0,
0,
0;;
{fix_013}
}
MeshTextureCoords {
24;
-2.000000;0.000000;,
2.000000;0.000000;,
2.000000;1.000000;,
-2.000000;1.000000;,
-2.000000;1.000000;,
2.000000;1.000000;,
2.000000;0.000000;,
-2.000000;0.000000;,
2.078000;-2.000000;,
2.078000;2.000000;,
2.000000;2.000000;,
2.000000;-2.000000;,
2.078000;0.000000;,
2.078000;1.000000;,
2.000000;1.000000;,
2.000000;0.000000;,
2.078000;2.000000;,
2.078000;-2.000000;,
2.000000;-2.000000;,
2.000000;2.000000;,
2.078000;1.000000;,
2.078000;0.000000;,
2.000000;0.000000;,
2.000000;1.000000;;
}
}

Mesh userdefined5 {
24;
256.000000;0.000000;256.000000;,
-256.000000;0.000000;256.000000;,
-256.000000;0.000000;-256.000000;,
256.000000;0.000000;-256.000000;,
256.000000;-10.000000;-256.000000;,
-256.000000;-10.000000;-256.000000;,
-256.000000;-10.000000;256.000000;,
256.000000;-10.000000;256.000000;,
256.000000;-10.000000;256.000000;,
-256.000000;-10.000000;256.000000;,
-256.000000;0.000000;256.000000;,
256.000000;0.000000;256.000000;,
-256.000000;-10.000000;256.000000;,
-256.000000;-10.000000;-256.000000;,
-256.000000;0.000000;-256.000000;,
-256.000000;0.000000;256.000000;,
-256.000000;-10.000000;-256.000000;,
256.000000;-10.000000;-256.000000;,
256.000000;0.000000;-256.000000;,
-256.000000;0.000000;-256.000000;,
256.000000;-10.000000;-256.000000;,
256.000000;-10.000000;256.000000;,
256.000000;0.000000;256.000000;,
256.000000;0.000000;-256.000000;;

6;
4;3,2,1,0;,
4;7,6,5,4;,
4;11,10,9,8;,
4;15,14,13,12;,
4;19,18,17,16;,
4;23,22,21,20;;
MeshMaterialList {
1;
6;
0,
0,
0,
0,
0,
0;;
{fix_013}
}
MeshTextureCoords {
24;
2.000000;-2.000000;,
-2.000000;-2.000000;,
-2.000000;2.000000;,
2.000000;2.000000;,
2.000000;2.000000;,
-2.000000;2.000000;,
-2.000000;-2.000000;,
2.000000;-2.000000;,
2.000000;-0.078130;,
-2.000000;-0.078130;,
-2.000000;0.000000;,
2.000000;0.000000;,
-2.000000;-0.078130;,
2.000000;-0.078130;,
2.000000;0.000000;,
-2.000000;0.000000;,
-2.000000;-0.078130;,
2.000000;-0.078130;,
2.000000;0.000000;,
-2.000000;0.000000;,
2.000000;-0.078130;,
-2.000000;-0.078130;,
-2.000000;0.000000;,
2.000000;0.000000;;
}
}

Mesh userdefined6 {
24;
256.000000;128.000000;-256.000000;,
-256.000000;128.000000;-256.000000;,
-256.000000;128.000000;256.000000;,
256.000000;128.000000;256.000000;,
256.000000;138.000000;256.000000;,
-256.000000;138.000000;256.000000;,
-256.000000;138.000000;-256.000000;,
256.000000;138.000000;-256.000000;,
256.000000;138.000000;-256.000000;,
-256.000000;138.000000;-256.000000;,
-256.000000;128.000000;-256.000000;,
256.000000;128.000000;-256.000000;,
-256.000000;138.000000;-256.000000;,
-256.000000;138.000000;256.000000;,
-256.000000;128.000000;256.000000;,
-256.000000;128.000000;-256.000000;,
-256.000000;138.000000;256.000000;,
256.000000;138.000000;256.000000;,
256.000000;128.000000;256.000000;,
-256.000000;128.000000;256.000000;,
256.000000;138.000000;256.000000;,
256.000000;138.000000;-256.000000;,
256.000000;128.000000;-256.000000;,
256.000000;128.000000;256.000000;;

6;
4;3,2,1,0;,
4;7,6,5,4;,
4;11,10,9,8;,
4;15,14,13,12;,
4;19,18,17,16;,
4;23,22,21,20;;
MeshMaterialList {
1;
6;
0,
0,
0,
0,
0,
0;;
{fix_013}
}
MeshTextureCoords {
24;
2.000000;2.000000;,
-2.000000;2.000000;,
-2.000000;-2.000000;,
2.000000;-2.000000;,
2.000000;-2.000000;,
-2.000000;-2.000000;,
-2.000000;2.000000;,
2.000000;2.000000;,
2.000000;1.078000;,
-2.000000;1.078000;,
-2.000000;1.000000;,
2.000000;1.000000;,
2.000000;1.078000;,
-2.000000;1.078000;,
-2.000000;1.000000;,
2.000000;1.000000;,
-2.000000;1.078000;,
2.000000;1.078000;,
2.000000;1.000000;,
-2.000000;1.000000;,
-2.000000;1.078000;,
2.000000;1.078000;,
2.000000;1.000000;,
-2.000000;1.000000;;
}
}

The program is called "Deled" , Its quite simple to use and would make creating and editing models or even world geometry a lot more simple and faster...
Thanks any help..
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

you must open it in DX's Mview utility and resave it overwriting your file. Mview was in the "tools" folder in Irrlicht 0.6

if you don't have it let m eknow and I'll find a place to upload it for u.

cheers!
Image
Dogs
Posts: 195
Joined: Wed Sep 15, 2004 1:04 am
Location: michigan

Post by Dogs »

None of the models I make with the program will even show in meshview..
I know the files are good cause I can import them into truespace just fine..
Is there something special I need to do?

I converted them over to 3ds and they load just fine... Butt all I see for 3ds is abillity to load only one texture onto the entire object.. Is ok if its just a single textured object like a ground plain or a solid block or something... Shame if you cant import 3ds files textures applied when it was made... Ive got a few very good modelers and this engine is great so far I just need to find a good format to use for my multitextured objects..
Maybe you know of a solution..
please dont sugest quake stuff lol, the texture format is terrible... .wal files are about useless if you ask me..
I did find a quake editor that allowed for jpg I think around here some place but the editor wasnt the best if I remember... I wont knock quake cause I still use a moded quake2 engine and play online every now and then its rather fun but if someone would fix the texture format and edit the editors to allow for real textures then yes I think would be a great idea.. lol
Thanks again for your help...
andy0482
Posts: 23
Joined: Mon Sep 13, 2004 6:22 pm

Error or You just cant see the model?

Post by andy0482 »

If there is no error and you just cant see the model try scaling up. Thats my prob. 95% of the time with X file.

Hope it helps

ThX
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

X files created must be in text mode and not in binary.

A good way to make everything work is to open it first in Unwrap3d, check uv mapping and stuff is ok, resave it as .X and then open it in Mview. If it's animated, Mview will show all the animations.

When resaving in Mview (save mesh as) select "text" from the options below.
Image
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

I just tried Panda exporter.
@afecelis, do you know whether mixed textures can be exported from max? I got only standard material with one diffuse map texture exported. Do you know whether ZDimitors object model can make this? Any advices?
Thanks

Image
Last edited by etcaptor on Sat Sep 25, 2004 4:24 pm, edited 1 time in total.
Dogs
Posts: 195
Joined: Wed Sep 15, 2004 1:04 am
Location: michigan

Post by Dogs »

I am doing something wrong or I have wrong program... I dont see any save feature at all.... And I dont get any errors when tring to open my x files, rescaling dosnt seem to help either.. Ive scaled them to 300 and still dont see em.. lol..
Im going to try the other program you listed and see if it will open in it..
As for text format I was thinking the way I posted here was text format?
If not how do i convert it...
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

@Dogs, can you say us which program you use. We can download this program too and try exporting some meshes.
Dogs
Posts: 195
Joined: Wed Sep 15, 2004 1:04 am
Location: michigan

Post by Dogs »

Im tring to use the editor at this site...
Its called deled editor.. I think I said something about it in the first post for this topic but maybe im wrong...
Sorry if I didnt post the name before... The site link is below

http://www.delgine.com/

It exports to .x format..
Seems to be standard text format but im sure its something simple to get around... The editor is quite nice and easy to use.... And I think you was the one making the editor for irricht engine...???
If so then this editor is worth looking at for your own info.... Maybe will help you out with ideas for yours...

Well agian this forum has been awsome with fast response to my questions and again thanks for the help and hope that someone can figure out how to make this editor work with this engine...

Thanks for any help
Dogs
Posts: 195
Joined: Wed Sep 15, 2004 1:04 am
Location: michigan

Post by Dogs »

What is the name of the DX Mview program exactly? Maybe I can just find it in google.. Or someone place a link ...
I dont have that program.. Ive read something about one that comes with direct x sdk, Is that the one your talking about?
And if so could someone post a link to download just the viewer and not the entire sdk lol...
I use the up to date dir X 9.0c I do belive it is..

Thanks agian for help..
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Finally making games again!
http://www.konekogames.com
Dogs
Posts: 195
Joined: Wed Sep 15, 2004 1:04 am
Location: michigan

Post by Dogs »

Thanks loads.... Ill mess around with it now and see how it works and post back latter and let everyone know how it worked... :)
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

If you have a material in deled using an image file something such as wood.bmp deled will name the material in the .x file wood.bmp. I beleive that many .x readers choke on this. Open in lithunwrap or any other program that loads/saves .x meshes and change the material name from wood.bmp to just wood. Do a similar thing to all your material names. I believe thsi should fix the problem
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
jikbar
Posts: 62
Joined: Wed Aug 25, 2004 4:48 pm
Location: Canada
Contact:

Post by jikbar »

deled writes its materials ahead of time then references them in the mesh's material parameter. so instead of: {fix_013} in the mesh use

Material fix_013 {
1.000000;1.000000;1.000000;1.000000;;
0.000000;
0.000000;0.000000;0.000000;;
0.000000;0.000000;0.000000;;
TextureFileName {
"fix_013.bmp";
}
}

the entire material instead of just a reference
Dogs
Posts: 195
Joined: Wed Sep 15, 2004 1:04 am
Location: michigan

Post by Dogs »

Yes I looked at this closer and it seems that yes this is the problem..
So I gues that one could use this editor to create there basic walls and floors and so on and then add the code for lighting and so on for irrilcht and walla you have a simple starter world...

Now to just figure out how to create a port system that will load the next level when you walk through a portal or a door or any other thing that may trigger a new level to load.....

I would think that a bsp would be simple to use for this...
But what about code based 3d worlds.. ?

I would think your code would have to be writen in smaller pieces like funtions and be called upon and load when nessesary...

Not sure maybe someone has ideas..

Thanks for the help agian everyone... :)
Post Reply