This post is for someone who has succesfully parsed the ASE format (including texture coordinates) for loading models in OpenGL.
I’ve got my ASE loader reading in and using the texture coords provided in my ASE format. This all works just fine. I’m having a little trouble interpreting where exactly the material id index is stored (So I can determine what texture to use at the right time).
I thought it was here:
*MESH_FACE 0: A: 0 B: 14 C: 8 AB: 1 BC: 1 CA: 0 *MESH_SMOOTHING 1 *MESH_MTLID 1
I use the last part *MESH_MTLID as the number of the index in my texture array (in this case it would be 1).
This works just fine for some objects. However, when I export certain objects this number is way too high (I opened the ASE file to look for problems).
In other words, lets say I build a model in max that uses 3 different textures. When I export the model, the *MESH_MTLID number will sometimes range from 0 to 10 instead of what it should be (0 to 2 for 3 textures).
So when my loader reads this value it tries to load textures from an array index that isn’t even there or it maps the wrong picture at the wrong place…
Does all this make sense?
Could this be an exporting issue? Some models work just fine…others don’t. Anyone have a suggestion?