Milkshape X file in Panda

Hey, i’m new to both panda and 3d rendering but I created something in an .X file which i wanted to use in my program. But I didn’t succeed. I did it the way the manual describes me to, so with the directX 8.0 thing.
I can’t convert x2egg, and i can’t pview, they give the same long list of errors i believe. The list consist of descriptions in which rule there is an error, but there is one in almost every rule.
I already tried it more simple; with just a cube. I got the same problem.
I tried all kinds of combinations with the checkboxes and everytime i retried it a few times when having deleted the last one or two }-brackets in the end, like the manual describes.

Is there any MS3D user here who recognises the problem I stumbled upon?
Thanks in advance.

there is a long story of broken, fixed,broken,belived-to-be-fixed-yet-still-broken, finally fixed x importers. can you post your error output and the version of panda you’r using?

In 1.5.4, all of these problems should have been solved. If you are using an older version, please upgrade, otherwise post the error log.

Thanks for your answers.
I’ll post a part of the error log, because the whole list of errors exceeds the maximum length of my command prompt output, so a part is hidden.
By the way pro-rsoft, how could you be able to upload an image of 8.3 MB in size for your avatar? It says the maximum size is 6 kb. Which is very small in my opinion.
here is the last part of the error log, I don’t understand it:

                ^
Unknown template: STRING


Error in standardTemplates.x at line 168, column 13:
 DWORD index;
            ^
Unknown template: DWORD


Error in standardTemplates.x at line 174, column 21:
 DWORD nVertexColors;
                    ^
Unknown template: DWORD


Error in standardTemplates.x at line 175, column 47:
 array IndexedColor vertexColors[nVertexColors];
                                              ^
Unknown identifier: nVertexColors


Error in standardTemplates.x at line 180, column 17:
 DWORD truefalse;
                ^
Unknown template: DWORD


Error in standardTemplates.x at line 197, column 23:
 DWORD nFaceWrapValues;
                      ^
Unknown template: DWORD


Error in standardTemplates.x at line 198, column 48:
 array Boolean2d faceWrapValues[nFaceWrapValues];
                                               ^
Unknown identifier: nFaceWrapValues


Error in standardTemplates.x at line 203, column 18:
 DWORD openclosed;
                 ^
Unknown template: DWORD


Error in standardTemplates.x at line 204, column 23:
 DWORD positionquality;
                      ^
Unknown template: DWORD


Error in standardTemplates.x at line 234, column 12:
 STRING key;
           ^
Unknown template: STRING


Error in standardTemplates.x at line 235, column 14:
 STRING value;
             ^
Unknown template: STRING


Error in standardTemplates.x at line 245, column 20:
 DWORD bRightHanded;
                   ^
Unknown template: DWORD


Error in standardTemplates.x at line 250, column 31:
 WORD nMaxSkinWeightsPerVertex;
                              ^
Unknown template: WORD


Error in standardTemplates.x at line 251, column 29:
 WORD nMaxSkinWeightsPerFace;
                            ^
Unknown template: WORD


Error in standardTemplates.x at line 252, column 13:
 WORD nBones;
            ^
Unknown template: WORD


Error in standardTemplates.x at line 257, column 16:
 DWORD nIndices;
               ^
Unknown template: DWORD


Error in standardTemplates.x at line 258, column 25:
 DWORD nOriginalVertices;
                        ^
Unknown template: DWORD


Error in standardTemplates.x at line 259, column 21:
 array DWORD indices[nIndices];
                    ^
Unknown template: DWORD


Error in standardTemplates.x at line 259, column 30:
 array DWORD indices[nIndices];
                             ^
Unknown identifier: nIndices


Error in standardTemplates.x at line 264, column 26:
 STRING transformNodeName;
                         ^
Unknown template: STRING


Error in standardTemplates.x at line 265, column 16:
 DWORD nWeights;
               ^
Unknown template: DWORD


Error in standardTemplates.x at line 266, column 27:
 array DWORD vertexIndices[nWeights];
                          ^
Unknown template: DWORD


Error in standardTemplates.x at line 266, column 36:
 array DWORD vertexIndices[nWeights];
                                   ^
Unknown identifier: nWeights


Error in standardTemplates.x at line 267, column 21:
 array FLOAT weights[nWeights];
                    ^
Unknown template: FLOAT


Error in standardTemplates.x at line 267, column 30:
 array FLOAT weights[nWeights];
                             ^
Unknown identifier: nWeights

:xfile(error): Internal error: Unable to parse built-in
standardTemplates.x!

Error in blok.x at line 4, column 31:
 WORD nMaxSkinWeightsPerVertex;

                              ^
Unknown template: WORD


Error in blok.x at line 5, column 29:
 WORD nMaxSkinWeightsPerFace;

                            ^
Unknown template: WORD


Error in blok.x at line 6, column 13:
 WORD nBones;

            ^
Unknown template: WORD


Error in blok.x at line 11, column 16:
 DWORD nIndices;

               ^
Unknown template: DWORD


Error in blok.x at line 12, column 25:
 DWORD nOriginalVertices;

                        ^
Unknown template: DWORD


Error in blok.x at line 13, column 21:
 array DWORD indices[nIndices];

                    ^
Unknown template: DWORD


Error in blok.x at line 13, column 30:
 array DWORD indices[nIndices];

                             ^
Unknown identifier: nIndices


Error in blok.x at line 18, column 26:
 STRING transformNodeName;

                         ^
Unknown template: STRING


Error in blok.x at line 19, column 16:
 DWORD nWeights;

               ^
Unknown template: DWORD


Error in blok.x at line 20, column 27:
 array DWORD vertexIndices[nWeights];

                          ^
Unknown template: DWORD


Error in blok.x at line 20, column 36:
 array DWORD vertexIndices[nWeights];

                                   ^
Unknown identifier: nWeights


Error in blok.x at line 21, column 21:
 array FLOAT weights[nWeights];

                    ^
Unknown template: FLOAT


Error in blok.x at line 21, column 30:
 array FLOAT weights[nWeights];

                             ^
Unknown identifier: nWeights


Error in blok.x at line 34, column 2:
 }

 ^
Too many data elements in structure.


Error in blok.x at line 43, column 4:
   }

   ^
Too many data elements in structure.


Error in blok.x at line 124, column 5:
    }

    ^
Too many data elements in structure.


Error in blok.x at line 152, column 5:
    }

    ^
Too many data elements in structure.


Error in blok.x at line 181, column 5:
    }

    ^
Too many data elements in structure.


Error in blok.x at line 204, column 6:
     }

     ^
Too many data elements in structure.


Error in blok.x at line 205, column 5:
    }

    ^
Too many data elements in structure.


Error in blok.x at line 207, column 4:
   }

   ^
Too many data elements in structure.

Unable to open X file: blok.x
Unable to read blok.x

C:\Documents and Settings\Merijn van wouden>

Is it really 8.3 MB? Gee, I thought it was just 1.8 MB.
I didn’t upload my avatar here, rather I uploaded it to my own site and linked to it.

Could you maybe upload the .x file in question (or if you prefer not to do that, a different .x file that also fails?)

Are you sure you’re using the 1.5.4 version of Panda? These sure do look like the error messages that were generated by previous versions.

David

No i wasn’t using the new version…
sorry.
pro-rsoft told me to download the new version before my post, but i read it too late and i already posted the errors but i decided to download Panda 1.5.4 and then edit my post before anyone would read it, but you guys are really fast with replying.
It’s downloaded right now so i’ll try it out, if i keep the problem i’ll put another post here.
Yes you were right, your avatar is just 1.83 MB, i confused it with 8.3. I didn’t see the transload option for avatars, i thought it wasn’t there so that why i was surprised but now i understand it.

Okay, now i use Panda 1.5.4
It seems i’m close when x2egg’ing my x file, but still it doesn’t work as i expected. I’ve tried some …2… converting tools of Panda before, and those just converted the file itself. But now when i use x2egg, the X file stays the same, and it looks like i get the egg code in my command prompt. The command prompt first gives a lot of vertexes, and then a lot of polygons. But if this is the .egg code i need, i have a problem, because the code exceeds the cmd maximum length again, so i can’t view the beginning of the code. this is the beginning of the command prompt when i do x2egg:

        0 0 1 0
        0 0 0 1
      }
    }
    <Group> {
      <VertexPool> vpool1 {
        <Vertex> 0 {
          5.99995 3.25431 -2.95833
          <UV> { 0 0 }
          <Normal> { 0 0 -1 }
        }
        <Vertex> 1 {
          11.7499 9.17098 -2.95833
          <UV> { 1 1 }
          <Normal> { 0 0 -1 }
        }
        <Vertex> 2 {
          5.99995 9.17098 -2.95833
          <UV> { 0 1 }
          <Normal> { 0 0 -1 }

Is that the absolute beginning? Or do i miss a lot. What do i need to do to make it work.
pview doesn’t show the x file, it looks like it’s loading for ever.
Here is the code of my x file, it’s just a block:

xof 0303txt 0032
template XSkinMeshHeader {
 <3cf169ce-ff7c-44ab-93c0-f78f62d172e2>
 WORD nMaxSkinWeightsPerVertex;
 WORD nMaxSkinWeightsPerFace;
 WORD nBones;
}

template VertexDuplicationIndices {
<b8d65549-d7c9-4995-89cf-53a9a8b031e3>
 DWORD nIndices;
 DWORD nOriginalVertices;
 array DWORD indices[nIndices];
}

template SkinWeights {
 <6f0d123b-bad2-4167-a0d0-80224f25fabb>
 STRING transformNodeName;
 DWORD nWeights;
 array DWORD vertexIndices[nWeights];
 array FLOAT weights[nWeights];
 Matrix4x4 matrixOffset;
}


Frame Scene_Root {


 FrameTransformMatrix {
  1.000000, 0.000000, 0.000000, 0.000000,
  0.000000, 1.000000, 0.000000, 0.000000,
  0.000000, 0.000000, 1.000000, 0.000000,
  0.000000, 0.000000, 0.000000, 1.000000;;
 }

  Frame Box01 {

   FrameTransformMatrix {
    1.000000, 0.000000, 0.000000, 0.000000,
    0.000000, 1.000000, 0.000000, 0.000000,
    0.000000, 0.000000, 1.000000, 0.000000,
    0.000000, 0.000000, 0.000000, 1.000000;;
   }

   Mesh {
    24;
    5.999947;9.170975;-2.958333;,
    5.999947;3.254308;-2.958333;,
    11.749947;9.170975;-2.958333;,
    11.749947;3.254308;-2.958333;,
    11.749947;9.170975;-2.958333;,
    11.749947;3.254308;-2.958333;,
    11.749947;9.170975;2.958333;,
    11.749947;3.254308;2.958333;,
    11.749947;9.170975;2.958333;,
    11.749947;3.254308;2.958333;,
    5.999947;9.170975;2.958333;,
    5.999947;3.254308;2.958333;,
    5.999947;9.170975;2.958333;,
    5.999947;3.254308;2.958333;,
    5.999947;9.170975;-2.958333;,
    5.999947;3.254308;-2.958333;,
    5.999947;9.170975;-2.958333;,
    11.749947;9.170975;-2.958333;,
    5.999947;3.254308;-2.958333;,
    11.749947;3.254308;-2.958333;,
    5.999947;9.170975;2.958333;,
    11.749947;9.170975;2.958333;,
    5.999947;3.254308;2.958333;,
    11.749947;3.254308;2.958333;;
    12;
    3;0,2,1;,
    3;1,2,3;,
    3;4,6,5;,
    3;5,6,7;,
    3;8,10,9;,
    3;9,10,11;,
    3;12,14,13;,
    3;13,14,15;,
    3;20,21,16;,
    3;16,21,17;,
    3;18,19,22;,
    3;22,19,23;;

    MeshNormals {
     24;
     0.000000;0.000000;-1.000000;,
     0.000000;0.000000;-1.000000;,
     0.000000;0.000000;-1.000000;,
     0.000000;0.000000;-1.000000;,
     1.000000;0.000000;0.000000;,
     1.000000;0.000000;0.000000;,
     1.000000;0.000000;0.000000;,
     1.000000;0.000000;0.000000;,
     0.000000;0.000000;1.000000;,
     0.000000;0.000000;1.000000;,
     0.000000;0.000000;1.000000;,
     0.000000;0.000000;1.000000;,
     -1.000000;0.000000;0.000000;,
     -1.000000;0.000000;0.000000;,
     -1.000000;0.000000;0.000000;,
     -1.000000;0.000000;0.000000;,
     0.000000;1.000000;0.000000;,
     0.000000;1.000000;0.000000;,
     0.000000;-1.000000;0.000000;,
     0.000000;-1.000000;0.000000;,
     0.000000;1.000000;0.000000;,
     0.000000;1.000000;0.000000;,
     0.000000;-1.000000;0.000000;,

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

    MeshTextureCoords {
     24;
     0.000000;0.000000;,
     0.000000;1.000000;,
     1.000000;0.000000;,
     1.000000;1.000000;,
     0.000000;0.000000;,
     0.000000;1.000000;,
     1.000000;0.000000;,
     1.000000;1.000000;,
     0.000000;0.000000;,
     0.000000;1.000000;,
     1.000000;0.000000;,
     1.000000;1.000000;,
     0.000000;0.000000;,
     0.000000;1.000000;,
     1.000000;0.000000;,
     1.000000;1.000000;,
     0.000000;1.000000;,
     1.000000;1.000000;,
     0.000000;0.000000;,
     1.000000;0.000000;,
     0.000000;0.000000;,
     1.000000;0.000000;,
     0.000000;1.000000;,
     1.000000;1.000000;;
    }

    VertexDuplicationIndices {
     24;
     20;
     0,
     1,
     2,
     3,
     4,
     5,
     6,
     7,
     8,
     9,
     10,
     11,
     12,
     13,
     14,
     15,
     16,
     17,
     18,
     19,
     12,
     6,
     13,
     7;
    }

    MeshMaterialList {
     1;
     12;
     0,
     0,
     0,
     0,
     0,
     0,
     0,
     0,
     0,
     0,
     0,
     0;

     Material DefaultMat {
      0.800000;0.800000;0.800000;0.000000;;
      0.000000;
      0.000000;0.000000;0.000000;;
      0.000000;0.000000;0.000000;;
     }
    }

   }
 }
 }

Use a command like:

x2egg -o t.egg t.x

to write the output of t.x into a file t.egg. Then you can pview t.egg.

You can also pview t.x directly. pview is in fact showing your model, but you can’t see it because your model is completely invisible! This is because your material specifies a color of (0.8, 0.8, 0.8, 0), which has 0 in the last component. That last 0 makes it completely transparent.

David

It works!
Thanks a lot!