Loading a .x model

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
arock99
Posts: 5
Joined: Wed Feb 01, 2006 6:33 pm

Loading a .x model

Post by arock99 »

Hi,
I have loaded a model i created in DeleD and i cant see it on screen. I'm using the code from the first tutorial. The files are loaded within a directory called 'media' (for example the texture loaded within my program points to "./media/Wall10.jpg")

Here is the contents of the .x file loaded:

xof 0302txt 0032

Header {
1;
0;
1;
}

// Created by DeleD on 2/8/2006

Material Wall10 {
1.000000;1.000000;1.000000;1.000000;;
0.000000;
0.000000;0.000000;0.000000;;
0.000000;0.000000;0.000000;;
TextureFileName {
"Wall10.jpg";
}
}

Mesh MainCube {
24;
128.000000;128.000000;-64.000000;,
-128.000000;128.000000;-64.000000;,
-128.000000;0.000000;-64.000000;,
128.000000;0.000000;-64.000000;,
-128.000000;128.000000;-64.000000;,
-128.000000;128.000000;128.000000;,
-128.000000;0.000000;128.000000;,
-128.000000;0.000000;-64.000000;,
-128.000000;128.000000;128.000000;,
128.000000;128.000000;128.000000;,
128.000000;0.000000;128.000000;,
-128.000000;0.000000;128.000000;,
128.000000;128.000000;128.000000;,
128.000000;128.000000;-64.000000;,
128.000000;0.000000;-64.000000;,
128.000000;0.000000;128.000000;,
-128.000000;0.000000;128.000000;,
128.000000;0.000000;128.000000;,
128.000000;0.000000;-64.000000;,
-128.000000;0.000000;-64.000000;,
-128.000000;128.000000;-64.000000;,
128.000000;128.000000;-64.000000;,
128.000000;128.000000;128.000000;,
-128.000000;128.000000;128.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;;
{ Wall10 }
}
MeshNormals {
8;
0.577400;-0.577400;-0.577400;,
-0.577400;-0.577400;-0.577400;,
-0.577400;-0.577400;0.577400;,
0.577400;-0.577400;0.577400;,
0.577400;0.577400;-0.577400;,
-0.577400;0.577400;-0.577400;,
-0.577400;0.577400;0.577400;,
0.577400;0.577400;0.577400;;
6;
4;0,1,5,4;,
4;1,2,6,5;,
4;2,3,7,6;,
4;3,0,4,7;,
4;1,0,3,2;,
4;6,7,4,5;;
}
MeshTextureCoords {
24;
0.500000;-0.500000;,
-0.500000;-0.500000;,
-0.500000;0.000000;,
0.500000;0.000000;,
0.250000;-0.500000;,
-0.500000;-0.500000;,
-0.500000;0.000000;,
0.250000;0.000000;,
-0.500000;0.500000;,
0.500000;0.500000;,
0.500000;0.000000;,
-0.500000;0.000000;,
0.500000;-0.500000;,
-0.250000;-0.500000;,
-0.250000;0.000000;,
0.500000;0.000000;,
-0.500000;0.500000;,
0.500000;0.500000;,
0.500000;-0.250000;,
-0.500000;-0.250000;,
-0.500000;0.250000;,
0.500000;0.250000;,
0.500000;-0.500000;,
-0.500000;-0.500000;;
}
}
arock99
Posts: 5
Joined: Wed Feb 01, 2006 6:33 pm

Post by arock99 »

I figured it out...the model was so large that it did not display on the screen at all...i changed its scale to 0.1 and voila i can see it now...
Post Reply