I've had a change to play with the blender files for XL2's model converter. So none of the models are actually textured, just labelled, and the converter applies the specified TGA files based on the name of the material. From what I can tell, the workflow is:
1 ) Create the model in blender. Materials act as a label for applied TGA textures of the same name. Correct orientation and deformation of textures will rely on a combination of experience and trial and error.
2 ) Export model as .obj file. Place .obj and .tga files in a sub-directory of the converter and run the batch script.
3 ) Header files and the .ZTP files are created in the /OUT/ directory of the converter. Copy over to your program's directory, preserving the relative file structure.
4 ) Copy over ZT folder with headers into your program's directory.
5 ) Include "ZT/ZT_COMMON.h" and the header file for your model.
6 ) Create a void pointer and asign it the memory location LWRAM as defined in ZT_COMMON.h, like so:
void * currentAddress = (void*)LWRAM;
7 ) Write your model to LWRAM using ztLoad3Dmodel() as defined in ZT_LOAD_MODEL.c like so:
currentAddress = ztLoad3Dmodel((Sint8*)"MODEL_NAME.ZTP", currentAddress, &entities[0], 1);
This will load your model in the entities array index 0 as defined in ZT_LOAD_MODEL.c
8 ) Preferably inside a function, define a pointer to an entity_t and loop through displaying polygons based on the number of meshes property of the entity_t struct, like so:
entity_t * model = &entities[0];
for (i=0; i<model->nbMeshes; i++)
{
slPutPolygon((PDATA*)model->pol[i]);
}
Does this all look correct as a basic workflow of Blender model to in game render?