3DXI is a set of Data Reading interfaces provided by 3DMax to game developers. It was previously called IGame.
I have been working on Ogre plug-ins recently.
Few Related Documents
I believe there are a lot of people working on this, but there is too little time to sort out and share the information.
The maxExplorer provided by Ogre is only in xml format, and the export of binary data is incomplete.
Lexi is complicated and bound to Ogre itself. It is difficult to read and use it through the mesh interface of Ogre.
My method is very good.
Export with oFusion, and then track through the serialization interface of Ogre
Refer to the format file header description of mesh to compile your own format for export.
Many problems
For example, the descriptions of the 3DXI interface are not clear.
For example, a TexCoord can be read in several ways, but it is not specified. When GetActiveMapChannelNum (). Count () = 1, GetTexVertex should be used; otherwise, GetMapFaceIndex or GetMapVertex should be used.
It has brought a lot of troubles.
In addition, 3DXI is only responsible for collecting data. In case of MultiMaterial, you must manually split and copy vertices.
In terms of google's materials, our predecessors all said that since we had 3DXI, we were quite worthy of this face. I didn't have the experience of the old interface, and I felt like I was.
In general, the Ogre itself does not provide too much information for plugin. In addition, there are still a small number of bugs in the description of the 3DXI SDK, so it has taken a lot of detours.
If you have time, please refer to the Code in Programmer's Guide in max9 sdk with IGameMesh in 3dxi.
// Gm is a pointer to IGameMesh
If (exportMappingChannel)
{
Tab <int> mapNums = gm-> GetActiveMapChannelNum ();
Int mapCount = mapNums. Count ();
For (int I = 0; I <mapCount; I ++)
Int vCount = gm-> GetNumberOfMapVerts (mapNums [I]);
Buf. printf ("% d", vCount );
For (int j = 0; j <vCount; j ++)
{
Vert = NULL;
Point3 v;
If (gm-> GetMapVertex (mapNums [I], j, v ))
{
// Use data here
}
}
Int fCount = gm-> GetNumberOfFaces ();
For (int k = 0; k <fCount; k ++)
{
DWORD v [3];
Gm-> GetMapFaceIndex (mapNums [I], k, v );
// Use data here
}
}
This section is a piece of code from the same place in the old SDK.
// Gm is a pointer to IGameMesh If (exportMappingChannel) { Tab <int> mapNums = gm-> GetActiveMapChannelNum (); Int mapCount = mapNums. Count (); For (int I = 0; I <mapCount; I ++) { Int vCount = gm-> GetNumberOfMapVerts (mapNums [I]); Buf. printf ("% d", vCount ); For (int j = 0; j <vCount; j ++) { Vert = NULL; Point3 v; If (gm-> GetMapVertex (mapNums [I], j, v )) { // Use data here } } Int fCount = gm-> GetNumberOfFaces (); For (int k = 0; k <fCount; k ++) { DWORD v [3]; Gm-> GetMapFaceIndex (mapNums [I], k, v ); // Use data here } } } |
Let's look for your reference ~
Currently, in my plug-ins, the export of the mesh side is basically completed.
1. Export position, diffuse, normal, texcoordx
2. multi material processing
3. Minimize vertex replication/splitting
4. Export material and sub-material data
5. texture auto copy
Next, we will prepare the mesh Key Frame Animation and skeleton animation.
I will take the time to write an article to share with you.
Or it's not a good idea to pay for a scam in game creation. ^_^ Y