*MESH_NUMTVERTEX 40
*MESH_TVERTLIST {
*MESH_TVERT 0 0.0005 0.6256 0.5090
*MESH_TVERT 1 0.1700 0.6256 0.0061
*MESH_TVERT 2 0.1973 0.9803 0.4993
...
*MESH_NUMTVFACES 76
*MESH_TFACELIST {
*MESH_TFACE 0 3 1 0
*MESH_TFACE 1 0 2 3
*MESH_TFACE 2 7 6 4
...
Looking at this and the documentation for the ASE format I get a bit confused.
I'm assuming(after looking at the documentation) that the MESH_TVERT line representes the following:
*MESH_TVERT <id> <float u> <float v> <float w>
Okay, all good, I'm not planning on using the 'w' value and only stick to basic UV mapping.
And then we move on to the MESH_TFACE:
*MESH_TFACE <id> <VERT_ID 1> <VERT_ID 2> <VERT_ID 3>
And now I lost it. Does a face suddenly have 3 UV coordinates?
If we assume that we start at the vertex at index 0 of a triangle, why would we ever bother sending UV coordinates for the other two vertices?
ASE Texture format
Hi, I'm importing and displaying a mesh using the ASE format and so far I'm able to display all vertices and faces with materials.
Next step is to apply the texture.
First I get the texture filename.
And then I look through the file with the texture info for the mesh, it looks something like this:
You can just forget about W-coord and use UV only.
For example,if you have
*MESH_TVERT 0 0.0005 0.6256 0.5090
*MESH_TVERT 1 0.1700 0.6256 0.0061
*MESH_TVERT 2 0.1973 0.9803 0.4993
*MESH_TVERT 3 0.4300 1.0500 0.6666
............
and
*MESH_TFACE 0 3 1 0 - you can assign for 0 face vertices UV
as follows:
( 0.4300 1.0500 ) (0.1700 0.6256) (0.0005 0.6256)
For example,if you have
*MESH_TVERT 0 0.0005 0.6256 0.5090
*MESH_TVERT 1 0.1700 0.6256 0.0061
*MESH_TVERT 2 0.1973 0.9803 0.4993
*MESH_TVERT 3 0.4300 1.0500 0.6666
............
and
*MESH_TFACE 0 3 1 0 - you can assign for 0 face vertices UV
as follows:
( 0.4300 1.0500 ) (0.1700 0.6256) (0.0005 0.6256)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement