Page 1 of 1

.X Files and Irrlicht

Posted: Wed Oct 06, 2004 9:53 pm
by Syphonix
How do you use .X files with Irrlicht? I don't know how to load them or display them. I want to use them as maps, so how would I get them to be solid like the map in the Collision Detection example?

Posted: Wed Oct 06, 2004 11:44 pm
by Acki
How about loading it like the map in the Collision Detection example??? :roll:

Posted: Thu Oct 07, 2004 12:02 am
by Syphonix
I tried that, but it didn't work. It gives all these runtime errors.

Posted: Thu Oct 07, 2004 12:16 am
by Syphonix
okay, I got by with a 3DS file, but I really need a .x file loading capability. I get all these strange errors with .x files!

Posted: Thu Oct 07, 2004 7:29 am
by arras
Irrlicht loads x files only in text format, no binary. Make sure your model is in right format.

How...

Posted: Thu Oct 07, 2004 1:42 pm
by Syphonix
How would I convert a binary to a text file?

Posted: Thu Oct 07, 2004 3:44 pm
by vermeer
open it in mview and save as text in the save dialog.

also, export as tex in the exporter setting in your 3d package

Posted: Thu Oct 07, 2004 4:28 pm
by Dogs
There are many post in this forum about this topic, in fact i even posted one myself... Download direct x sdk it comes with a small proggy that will open your x files.. Once loaded into mview you can resave it...
When you reasave it chose save as text format and any mistakes in the x code are usally fixed and then as long as the textures are located in the same dir as the x file it should load when called from the irrlicht engine...

Hope this helps... :)

Also if you have slow conection the dir x sdk is quite large and there is a post some place where just the mview is posted...

Posted: Thu Oct 07, 2004 9:06 pm
by Syphonix
I already have the SDK (woohoo). Where would this "tool" be? What is its name?

Posted: Fri Oct 08, 2004 12:07 am
by Electron
if u have DX9 sdk installed just go to Microsoft DX9 SDK under program then Utilities->Mesh Viewer

Posted: Fri Oct 08, 2004 12:37 am
by Syphonix
I have found it! This is good. Now, how would I use .x files as levels?

Posted: Fri Oct 08, 2004 12:57 am
by Dogs
Reading and going over the code for the examples that came with the download of irrlicht is the best bet for you... It shows how to load a .x file for a animated avatar in one of the examples....
You can add the same code for collision that is used for the 3ds file called room.3ds in the effects example...

I found a lot of info that I needed to know just by looking over the code from the examples...

BUT i will say that most everyone here in this forum are great help as well when you do come across a problem that seems to just never be resolved by yourself...

And I often come here and just read the forum and ive found many topics that are good info to read about and you may learn tons of things without even haveing to ask a question at all..... :)