• Advertisement
Sign in to follow this  

What the hell is DeclData? / DX Maya Exporter any good?

This topic is 4433 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Everyone, I'm just trying to evaluate if it makes sense to use the December SDK's new Maya 7 plugin for X file export. Before we've been using PolyTrans, but PT doesn't support shaders, so we've been using some perl scripts to put our shader materials into the files which was a bit awkward. So I'm currently working my way through some files exported my Microsoft's plugin and keep wondering why such a huge amount of the file consists of this mysterious "DeclData". What the hell is DeclData? I have no Idea what that is supposed to be good for. Does anybody know that? Also, has anybody thoroughly tested the new exporter yet? I've heard of some major bugs in previous versions. Has the situatuion improved? thanks a lot, Robin

Share this post


Link to post
Share on other sites
Advertisement
In DirectX Decl is short for Declaration, and it's the format of the vertex information passed to the video card. The fixed function pipeline has a standard format for this data, in a certain order, and the FVF (Flexible Vertex Format) describes which data within the structure is valid.

For instance:
struct CUSTOMVERT
{
float x, y, z;
dword diffuse;
}sVert;

The position comes before diffuse color, because the declaration declares that it will. I won't go into more details because I doubt you want them, but this is what I would assume the X file is declaring. The declaration data is usually changed to match the shader I/O.

Good luck,
Chris

Share this post


Link to post
Share on other sites
Quote:
Original post by Supernat02
In DirectX Decl is short for Declaration, and it's the format of the vertex information passed to the video card. The fixed function pipeline has a standard format for this data, in a certain order, and the FVF (Flexible Vertex Format) describes which data within the structure is valid.

Alright, so far that's what I already knew (thanks anyway!), but this is something else. The DeclData block I get in my file looks like this:

DeclData {
2;
2;0;6;0;,
2;0;7;0;;
17376;
3196454585,
1036004872,
1064691482,
3205614477,
3209792337,
<snip>

this continues for about 17000 lines. (about 4,7 times as many lines than I have vertices in the mesh!) No number seems to be double.
That makes absolutely no sense to me.

Any ideas?

thanks,
Robin

Share this post


Link to post
Share on other sites
I don't think you're going to fully understand it until you dig into the .X file data. Based on the documentation (typing "Decl" into the index found it as the first result [wink]), the DeclData{} block is the actual vertex data in the file preceeded by a description of the vertex.

For more info, check out the X File Reference and/or file format reference.

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement