Ok, this is a bit more complicated. I messed quite a bit around with Blender and it is a bit crappy (when it comes to naming materials), i didn't succeed in exporting a model right so it works ingame because I can't figure out how to configurate it so it works. The rest works just fine.
Anyway, it can be fixed with the good old text editor
First of all:
Read this tutorial! It tells you exactly what to do to create a static ase model.
Step 3: Prepare your model is exactly the point where your exporting fails. (You can download the example files at the bottom of the tut to have a closer look at them.)
Ok, let's have a look at your ase file to show you the prob (it can be opened with the text editor).
Line 12-13
Code: Select all
*MATERIAL_LIST {
*MATERIAL_COUNT 0
}
You did not assign any materials to your model. Like this, the textures don't get loaded. If you compare this Material information part with one of a well working ase model, you'll see the difference. Here is the material information part of the tutorial model:
Code: Select all
*MATERIAL_LIST {
*MATERIAL_COUNT 1
*MATERIAL 0 {
*MATERIAL_NAME "Models/Static/tutorial-model/box"
*MATERIAL_CLASS "Standard"
*MATERIAL_AMBIENT 0.5000 0.5000 0.5000
*MATERIAL_DIFFUSE 1.0000 1.0000 1.0000
*MATERIAL_SPECULAR 0.0000 0.0000 0.0000
*MATERIAL_SHINE 0.7813
}
}
There, 1 material is declared. The most important part of it is the line
Code: Select all
*MATERIAL_NAME "Models/Static/tutorial-model/box"
The material that is assigned to the model has to have the exact name as the first line in your cmat shader file:
Code: Select all
Models/Static/tutorial-model/box <- texture path/name
{
diffusemap Models/Static/djcrate03_diff.png <- diffuse texture path
normalmap Models/Static/djcrate03_norm.png <- normal map path
red ambientLightRed
green ambientLightGreen
blue ambientLightBlue
}
____________________________________________________
OK. Now, enough theory, let's manipulate your pipe01.ase file so it should work.
First of all, you need to change
Code: Select all
}
*MATERIAL_LIST {
*MATERIAL_COUNT 0
}
to something like
Code: Select all
*MATERIAL_LIST {
*MATERIAL_COUNT 1
*MATERIAL 0 {
*MATERIAL_NAME "Models/Static/tutorial-model/box"
*MATERIAL_CLASS "Standard"
*MATERIAL_AMBIENT 0.5000 0.5000 0.5000
*MATERIAL_DIFFUSE 1.0000 1.0000 1.0000
*MATERIAL_SPECULAR 0.0000 0.0000 0.0000
*MATERIAL_SHINE 0.7813
}
}
As you can see, the material is
*MATERIAL 0 .
The only thing that is now left to do (sadly quite some work) is to assign this material to all your faces (polygons) of your model.
In pipe01.ase, this material assignment begins in line 747 and looks like this:
Code: Select all
*MESH_FACE_LIST {
*MESH_FACE 0: A: 172 B: 113 C: 73 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
*MESH_FACE 1: A: 172 B: 73 C: 99 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
*MESH_FACE 2: A: 113 B: 119 C: 76 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
*MESH_FACE 3: A: 113 B: 76 C: 73 AB: 1 BC: 1 CA: 1 *MESH_SMOOTHING 0 *MESH_MTLID 0
blabla
bla continues
}
Important there is
*MESH_MTLID 0. MESH_MTLID 0 = Mesh Material ID 0. It is luck that it already is assigned to the material with the number
0 (remember *MATERIAL 0 { at the beginning of the file
) so you won't have to do this manually. So everything is well assigned there.
If you sucessfully changed the material information part and your cmat shader file is right it should work and you should be able to see your model ingame.
I hope I managed to help you with this.