Hi I made my example level for my shaderpack in Map Scape.
Each vertex is grouped together with other vertices with equal texture forming a mesh, so you get some meshes with different textures each.
Hope that makes sense to you
Here is the Level loading bit I made for my shader pack:
function LoadWorld()
WorldObjectID=LoadObjectWithChildren("Map/SP_Showcase.x")
SetObjectScalePermanent(WorldObjectID,0.1,0.1,0.1)
SetObjectScreenCulling(WorldObjectID,0) // portal culling would work best in this kind of level
// Beware: the Material order is important
// most 3D model formats create groups for every texture
// so one Material/Texture-Set for every mesh
Diffuse=LoadImage("Map/pk01_gra_floor01_d.png")
Normal=LoadImage("Map/pk01_gra_floor01_local.png")
Secular=LoadImage("Map/pk01_gra_floor01_s.png")
AddMaterial(Diffuse,Normal,Secular,0)
Diffuse=LoadImage("Map/pk01_wall03b_d.png")
Normal=LoadImage("Map/pk01_wall03_local.png")
Secular=LoadImage("Map/pk01_wall03_s.png")
AddMaterial(Diffuse,Normal,Secular,0)
Diffuse=LoadImage("Map/pk01_roof01_d.png")
Normal=LoadImage("Map/pk01_roof01_local.png")
Secular=LoadImage("Map/pk01_roof01_s.png")
AddMaterial(Diffuse,Normal,Secular,0)
Diffuse=LoadImage("Map/pk01_tile_floor01b_d.png")
Normal=LoadImage("Map/pk01_tile_floor01_local.png")
Secular=LoadImage("Map/pk01_tile_floor01_s.png")
AddMaterial(Diffuse,Normal,Secular,0)
Diffuse=LoadImage("Map/pk01_pan_floor02b_d.png")
Normal=LoadImage("Map/pk01_pan_floor02_local.png")
Secular=LoadImage("Map/pk01_pan_floor02_s.png")
AddMaterial(Diffuse,Normal,Secular,0)
Diffuse=LoadImage("Map/pk01_trims01b_d.png")
Normal=LoadImage("Map/pk01_trims01_local.png")
Secular=LoadImage("Map/pk01_trims01_s.png")
Illumination=LoadImage("Map/pk01_trims01b_add.png")
AddMaterial(Diffuse,Normal,Secular,Illumination)
Diffuse=LoadImage("Map/pk01_door01b_d.png")
Normal=LoadImage("Map/pk01_door01_local.png")
Secular=LoadImage("Map/pk01_door01_s.png")
Illumination=LoadImage("Map/pk01_door01_add.png")
AddMaterial(Diffuse,Normal,Secular,Illumination)
SetObjectMaterials(WorldObjectID)
RemoveMaterials()
endfunction WorldObjectID
function SetObjectMaterials(WorldObjectID)
for MeshID=1 to GetObjectNumMeshes(WorldObjectID)
if Material[MeshID-1].Illumination>0
SP_Illumination_AddMesh(WorldObjectID,MeshID,Material[MeshID-1].Diffuse,Material[MeshID-1].Normal,Material[MeshID-1].Specular,Material[MeshID-1].Illumination)
elseif Material[MeshID-1].Normal>0
SetObjectMeshNormalMap(WorldObjectID,MeshID,Material[MeshID-1].Normal)
SetObjectMeshImage(WorldObjectID,MeshID,Material[MeshID-1].Diffuse,0)
SP_Clipping_AddMesh(WorldObjectID,MeshID)
elseif Material[MeshID-1].Diffuse>0
SetObjectMeshImage(WorldObjectID,MeshID,Material[MeshID-1].Diffuse,0)
SP_Clipping_AddMesh(WorldObjectID,MeshID)
endif
next MeshID
endfunction
function AddMaterial(Diffuse,Normal,Specular,Illumination)
TempMaterial as MatData
if GetImageExists(Diffuse)
TempMaterial.Diffuse=Diffuse
SetImageWrapU(TempMaterial.Diffuse,1)
SetImageWrapV(TempMaterial.Diffuse,1)
endif
if GetImageExists(Normal)
TempMaterial.Normal=Normal
SetImageWrapU(TempMaterial.Normal,1)
SetImageWrapV(TempMaterial.Normal,1)
endif
if GetImageExists(Specular)
TempMaterial.Specular=Specular
SetImageWrapU(TempMaterial.Specular,1)
SetImageWrapV(TempMaterial.Specular,1)
endif
if GetImageExists(Illumination)
TempMaterial.Illumination=Illumination
SetImageWrapU(TempMaterial.Illumination,1)
SetImageWrapV(TempMaterial.Illumination,1)
endif
Material.insert(TempMaterial)
endfunction
function RemoveMaterials()
Material.length=-1
endfunction
This is to add materials with a few textures for each mesh.
In the SP_XXX functions is basicaly SetObjectMeshImage at the end.
Beware the order of AddMaterial is important here and if you want to use normal maps: SetObjectMeshNormalMap is using stage 2 by default.
AGK is using Assimp and normally you also parse/read the materials from the model file but you can't in AppGameKit (not yet but soon I guess)
So you have to either be careful with the order or parse the file yourself which I did for the .x format at some point but I think I wasn't satisfied and ditched everything