The way UV is exported from 3ds Max to GMT files can be a little bit confusing. So to help with this here is a dedicated page to explain the situation.
The first thing to note is nomenclature to make explaining this easier.
In 3ds Max, as you should know you can have many many UV channels. -2 is assigned to Vertex Alpha, -1 to Vertex Illumination and 0 to Vertex Colour. After this you can assign as many as you please.
It is also worth noting that the data stored in UV channels is just a number of upto 3 values. The structure of the UV can also be different to that of underlying mesh. It is possible for the same vert on different faces to have a different value for example!
When setting up a gMaterial, you may assign a different UV channel to each gTexture. However not all gTextures export UV. Usually upto the first 4 assignments are exported into the GMT file.
To make things clearer let's label the exported UV as follows:
Other things to note are:
Vertex Illumination is not currently exported at all
Vertex Colour and Alpha are both exported by the plugins. However it is necessary to ensure that both the channels are set with data before export though, or you may encounter unpredictable results. You can check this by looking at the Channel Info data. It is possible to set them by setting an arbitrary value in Edit Poly somewhere and resetting to white / 1.0. Or there are modifier scripts that you can use.
Vertex illumination is not currently exported at all. |
It is important to note that if you bake information into UVW, or edit the UVW Unwrap in such a way that it results in more verts than in the physical size of the underlying mesh, this will increase the file size of the exported GMT file. The exporter shows the number of actual verts exported. This can be an issue when working on large files, and may push you over some limits in the game code. Such as collision meshes, derivable surfaces or real road calculations.