Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

X File exporter for dx9

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition
View previous topic :: View next topic  
Author Message
matt41
Member


Joined: 31 Jan 2007
Posts: 7

PostPosted: Wed Jan 31, 2007 4:00 pm    Post subject: X File exporter for dx9 Reply with quote

I need a plugin for exporting x files in the following format.
This is the only format that I can get to work with dx9 and vb.net.
If anyone knows what I can do I thank you.

xof 0303txt 0032
template Vector {
<3d82ab5e-62da-11cf-ab39-0020af71e433>
FLOAT x;
FLOAT y;
FLOAT z;
}

template MeshFace {
<3d82ab5f-62da-11cf-ab39-0020af71e433>
DWORD nFaceVertexIndices;
array DWORD faceVertexIndices[nFaceVertexIndices];
}

template Mesh {
<3d82ab44-62da-11cf-ab39-0020af71e433>
DWORD nVertices;
array Vector vertices[nVertices];
DWORD nFaces;
array MeshFace faces[nFaces];
[...]
}

template MeshNormals {
<f6f23f43-7686-11cf-8f52-0040333594a3>
DWORD nNormals;
array Vector normals[nNormals];
DWORD nFaceNormals;
array MeshFace faceNormals[nFaceNormals];
}

template Coords2d {
<f6f23f44-7686-11cf-8f52-0040333594a3>
FLOAT u;
FLOAT v;
}

template MeshTextureCoords {
<f6f23f40-7686-11cf-8f52-0040333594a3>
DWORD nTextureCoords;
array Coords2d textureCoords[nTextureCoords];
}

template MeshMaterialList {
<f6f23f42-7686-11cf-8f52-0040333594a3>
DWORD nMaterials;
DWORD nFaceIndexes;
array DWORD faceIndexes[nFaceIndexes];
[Material <3d82ab4d-62da-11cf-ab39-0020af71e433>]
}

template ColorRGBA {
<35ff44e0-6c7c-11cf-8f52-0040333594a3>
FLOAT red;
FLOAT green;
FLOAT blue;
FLOAT alpha;
}

template ColorRGB {
<d3e16e81-7835-11cf-8f52-0040333594a3>
FLOAT red;
FLOAT green;
FLOAT blue;
}

template Material {
<3d82ab4d-62da-11cf-ab39-0020af71e433>
ColorRGBA faceColor;
FLOAT power;
ColorRGB specularColor;
ColorRGB emissiveColor;
[...]
}

template TextureFilename {
<a42790e1-7810-11cf-8f52-0040333594a3>
STRING filename;
}


Mesh {
24;
-4.000000;-3.000000;6.000000;,
4.000000;-3.000000;6.000000;,
-4.000000;-3.000000;-6.000000;,
4.000000;-3.000000;-6.000000;,
-4.000000;3.000000;6.000000;,
4.000000;3.000000;6.000000;,
-4.000000;-3.000000;6.000000;,
4.000000;-3.000000;6.000000;,
4.000000;3.000000;6.000000;,
4.000000;3.000000;-6.000000;,
4.000000;-3.000000;6.000000;,
4.000000;-3.000000;-6.000000;,
4.000000;3.000000;-6.000000;,
-4.000000;3.000000;-6.000000;,
4.000000;-3.000000;-6.000000;,
-4.000000;-3.000000;-6.000000;,
-4.000000;3.000000;-6.000000;,
-4.000000;3.000000;6.000000;,
-4.000000;-3.000000;-6.000000;,
-4.000000;-3.000000;6.000000;,
-4.000000;3.000000;-6.000000;,
4.000000;3.000000;-6.000000;,
-4.000000;3.000000;6.000000;,
4.000000;3.000000;6.000000;;
12;
3;0,1,2;,
3;1,3,2;,
3;4,5,6;,
3;5,7,6;,
3;8,9,10;,
3;9,11,10;,
3;12,13,14;,
3;13,15,14;,
3;16,17,18;,
3;17,19,18;,
3;20,21,22;,
3;21,23,22;;

MeshNormals {
24;
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;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;;
12;
3;0,1,2;,
3;1,3,2;,
3;4,5,6;,
3;5,7,6;,
3;8,9,10;,
3;9,11,10;,
3;12,13,14;,
3;13,15,14;,
3;16,17,18;,
3;17,19,18;,
3;20,21,22;,
3;21,23,22;;
}

MeshTextureCoords {
24;
0.000000;0.000000;,
1.000000;0.000000;,
0.000000;1.500000;,
1.000000;1.500000;,
0.000000;0.000000;,
2.000000;0.000000;,
0.000000;1.500000;,
2.000000;1.500000;,
0.000000;0.000000;,
3.000000;0.000000;,
0.000000;1.500000;,
3.000000;1.500000;,
0.000000;0.000000;,
2.000000;0.000000;,
0.000000;1.500000;,
2.000000;1.500000;,
0.000000;0.000000;,
3.000000;0.000000;,
0.000000;1.500000;,
3.000000;1.500000;,
-0.150000;0.000000;,
1.250000;0.000000;,
-0.150000;2.100000;,
1.250000;2.100000;;
}

MeshMaterialList {
3;
12;
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2;

Material {
0.600000;0.600000;1.000000;1.000000;;
40.000000;
1.000000;1.000000;1.000000;;
0.000000;0.000000;0.000000;;

TextureFilename {
"cellfloor.jpg";
}
}

Material {
0.600000;0.600000;1.000000;1.000000;;
40.000000;
1.000000;1.000000;1.000000;;
0.000000;0.000000;0.000000;;

TextureFilename {
"cellwall.jpg";
}
}

Material {
1.000000;1.000000;1.000000;1.000000;;
40.000000;
1.000000;1.000000;1.000000;;
0.000000;0.000000;0.000000;;

TextureFilename {
"cellceiling.jpg";
}
}
}
}
Back to top
View user's profile Send private message
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Wed Jan 31, 2007 5:01 pm    Post subject: Reply with quote

Are the templates the only thing having to be there in the .x file? And if so, in the exact same format as being presented here?

If that is the case, I can update our new DirectX Export plugin to take care of that. We're aiming for a release of DeleD, including the new plugin architecture and the new DirectX plugin for somewhere in the second half of februari.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
matt41
Member


Joined: 31 Jan 2007
Posts: 7

PostPosted: Wed Jan 31, 2007 5:38 pm    Post subject: Reply with quote

I will put the format that doesn't work, this is another tool.
If you could show me what to do to make the files work that
I have for now that would be cool. I'll put the format so you can take
a look and compare this one with the deled format, if I just have to copy templates then I could do that, I would just need to know what not to
copy, anyway thanks for replying here is the format.

xof 0302txt 0064

Header
{
1;
0;
1;
}
Material material_1
{
1.0;1.0;1.0;1.0;;
11.3137;
1.0;1.0;1.0;;
0.0;0.0;0.0;;
TextureFilename
{
"testpic.jpg";
}
}
Frame World
{
FrameTransformMatrix
{
1.0,0.0,0.0,0.0,
0.0,1.0,0.0,0.0,
0.0,0.0,1.0,0.0,
0.0,0.0,0.0,1.0;;
}
Mesh Brush1
{
72;
53.282;-128.0;-48.0;,
24.0;-128.0;-83.1384;,
-16.0;-128.0;-96.0;,
-56.0;-128.0;-83.1384;,
-85.282;-128.0;-48.0;,
-96.0;-128.0;-0.0;,
-85.282;-128.0;48.0;,
-56.0;-128.0;83.1384;,
-16.0;-128.0;96.0;,
24.0;-128.0;83.1384;,
53.282;-128.0;48.0;,
64.0;-128.0;0.0;,
64.0;128.0;0.0;,
53.282;128.0;48.0;,
24.0;128.0;83.1384;,
-16.0;128.0;96.0;,
-56.0;128.0;83.1384;,
-85.282;128.0;48.0;,
-96.0;128.0;-0.0;,
-85.282;128.0;-48.0;,
-56.0;128.0;-83.1384;,
-16.0;128.0;-96.0;,
24.0;128.0;-83.1384;,
53.282;128.0;-48.0;,
64.0;-128.0;0.0;,
53.282;-128.0;48.0;,
53.282;128.0;48.0;,
64.0;128.0;0.0;,
53.282;-128.0;48.0;,
24.0;-128.0;83.1384;,
24.0;128.0;83.1384;,
53.282;128.0;48.0;,
24.0;-128.0;83.1384;,
-16.0;-128.0;96.0;,
-16.0;128.0;96.0;,
24.0;128.0;83.1384;,
-16.0;-128.0;96.0;,
-56.0;-128.0;83.1384;,
-56.0;128.0;83.1384;,
-16.0;128.0;96.0;,
-56.0;-128.0;83.1384;,
-85.282;-128.0;48.0;,
-85.282;128.0;48.0;,
-56.0;128.0;83.1384;,
-85.282;-128.0;48.0;,
-96.0;-128.0;-0.0;,
-96.0;128.0;-0.0;,
-85.282;128.0;48.0;,
-96.0;-128.0;-0.0;,
-85.282;-128.0;-48.0;,
-85.282;128.0;-48.0;,
-96.0;128.0;-0.0;,
-85.282;-128.0;-48.0;,
-56.0;-128.0;-83.1384;,
-56.0;128.0;-83.1384;,
-85.282;128.0;-48.0;,
-56.0;-128.0;-83.1384;,
-16.0;-128.0;-96.0;,
-16.0;128.0;-96.0;,
-56.0;128.0;-83.1384;,
-16.0;-128.0;-96.0;,
24.0;-128.0;-83.1384;,
24.0;128.0;-83.1384;,
-16.0;128.0;-96.0;,
24.0;-128.0;-83.1384;,
53.282;-128.0;-48.0;,
53.282;128.0;-48.0;,
24.0;128.0;-83.1384;,
53.282;-128.0;-48.0;,
64.0;-128.0;0.0;,
64.0;128.0;0.0;,
53.282;128.0;-48.0;;
14;
12;11,10,9,8,7,6,5,4,3,2,1,0;,
12;23,22,21,20,19,18,17,16,15,14,13,12;,
4;27,26,25,24;,
4;31,30,29,28;,
4;35,34,33,32;,
4;39,38,37,36;,
4;43,42,41,40;,
4;47,46,45,44;,
4;51,50,49,48;,
4;55,54,53,52;,
4;59,58,57,56;,
4;63,62,61,60;,
4;67,66,65,64;,
4;71,70,69,68;;
MeshTextureCoords
{
72;
0.8325,0.75;,
0.375,1.299;,
-0.25,1.5;,
-0.875,1.299;,
-1.3325,0.75;,
-1.5,0.0;,
-1.3325,-0.75;,
-0.875,-1.299;,
-0.25,-1.5;,
0.375,-1.299;,
0.8325,-0.75;,
1.0,0.0;,
1.0,0.0;,
0.8325,-0.75;,
0.375,-1.299;,
-0.25,-1.5;,
-0.875,-1.299;,
-1.3325,-0.75;,
-1.5,0.0;,
-1.3325,0.75;,
-0.875,1.299;,
-0.25,1.5;,
0.375,1.299;,
0.8325,0.75;,
0.0,2.0;,
0.75,2.0;,
0.75,-2.0;,
0.0,-2.0;,
0.75,2.0;,
1.299,2.0;,
1.299,-2.0;,
0.75,-2.0;,
0.375,2.0;,
-0.25,2.0;,
-0.25,-2.0;,
0.375,-2.0;,
-0.25,2.0;,
-0.875,2.0;,
-0.875,-2.0;,
-0.25,-2.0;,
1.299,2.0;,
0.75,2.0;,
0.75,-2.0;,
1.299,-2.0;,
0.75,2.0;,
-0.0,2.0;,
-0.0,-2.0;,
0.75,-2.0;,
-0.0,2.0;,
-0.75,2.0;,
-0.75,-2.0;,
-0.0,-2.0;,
-0.75,2.0;,
-1.299,2.0;,
-1.299,-2.0;,
-0.75,-2.0;,
-0.875,2.0;,
-0.25,2.0;,
-0.25,-2.0;,
-0.875,-2.0;,
-0.25,2.0;,
0.375,2.0;,
0.375,-2.0;,
-0.25,-2.0;,
-1.299,2.0;,
-0.75,2.0;,
-0.75,-2.0;,
-1.299,-2.0;,
-0.75,2.0;,
0.0,2.0;,
0.0,-2.0;,
-0.75,-2.0;;
}
MeshNormals
{
14;
0.0;0.0;-1.0;,
0.0;0.0;1.0;,
0.976;0.2179;0.0;,
0.7682;0.6402;0.0;,
0.3061;0.952;0.0;,
-0.3061;0.952;0.0;,
-0.7682;0.6402;0.0;,
-0.976;0.2179;0.0;,
-0.976;-0.2179;0.0;,
-0.7682;-0.6402;0.0;,
-0.3061;-0.952;0.0;,
0.3061;-0.952;0.0;,
0.7682;-0.6402;0.0;,
0.976;-0.2179;0.0;;
14;
12;0,0,0,0,0,0,0,0,0,0,0,0;,
12;1,1,1,1,1,1,1,1,1,1,1,1;,
4;2,2,2,2;,
4;3,3,3,3;,
4;4,4,4,4;,
4;5,5,5,5;,
4;6,6,6,6;,
4;7,7,7,7;,
4;8,8,8,8;,
4;9,9,9,9;,
4;10,10,10,10;,
4;11,11,11,11;,
4;12,12,12,12;,
4;13,13,13,13;;
}
MeshMaterialList
{
14;
14;
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13;;
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
{ material_1 }
}
}
}
Back to top
View user's profile Send private message
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Wed Jan 31, 2007 7:22 pm    Post subject: Reply with quote

At first glance, why not try to remove the following:

Frame World
{
FrameTransformMatrix
{
1.0,0.0,0.0,0.0,
0.0,1.0,0.0,0.0,
0.0,0.0,1.0,0.0,
0.0,0.0,0.0,1.0;;
}

and a } at the bottom of the .x file which closes the Frame World "tag". These are tags that aren't specified in a DeleD file.

After removing those tags, try to add the template tags from your first example and see what you get.

Just a guess though, but worth a try, I'd say. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Thu Feb 01, 2007 6:37 pm    Post subject: Reply with quote

If you use the NuXporter plug-in for DeleD, it should work just fine with DX9. It even allows you to scale the exported geometry, and to insert a reference to a shader if you so desire.
Back to top
View user's profile Send private message
matt41
Member


Joined: 31 Jan 2007
Posts: 7

PostPosted: Tue Feb 06, 2007 3:48 pm    Post subject: Reply with quote

The deled xfiles are working.
I have to use different vector coords to put
the objects next to each other.

for instance:

The templated file would be vector3(0,0,30)
The deled file would be vector3(0,0,800)

Something like that.
I'm working on a different issue and have'nt
played with it.

I am just happy to see a model for now.
Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum