Can I get a rundown on how the noesis API handles triangulation?
The files I'm working with are odd, and seem pretty inefficient...
They list vertex positions in the order used to create a triangle, and for triangles that share vertices, the shared vertices are listed many times. I can't be certain there's not a bit of the file to tell which edges are linked, but as far as I can tell, there is no separate info on which vertex is part of which triangle... Also, there seems to be no indexing of vertices, they seem to simply be referred by their order of creation... (as in the UV for a vertex is created in the same order as the vertex itself, rather than any sort of referential index being called to link the UV to the vertex...)
All of this seems pretty inefficient, and complicates my ability to make triangles and UV's in noesis... Partly because I only know how to use the function as it's presented in chrrox' tutorial. I don't know what kind of data its expecting in order to make triangles out of points... I assume it's looking for tuples of vertex indices...right? Or does it only accept raw byteArrays?
I tried feeding it the vertex data for both data arguments of rpgCommitTriangles... which as predicted just caused noesis to crash when loading the model...
If I make an array to document the order of vertex creation, and feed that array into the triangle data argument, would that work (Assuming you understood any of that disjointed explanation)?
For instance, this is the data from the file I have... They are signed shorts (just like chrrox just mentioned) and there is no extranious data or padding between them. (Obviously these are the translated coords, for easier reading)
Code: Select all
0, 0, 519
-347, 0, 1038
0, 0, 1038
0, 0, 0
-347, 0, 0
0, 0, 519
-347, 0, 519
-347, 0, 1038
0, 0, 1038
347, 0, 1038
0, 0, 519
347, 0, 519
347, 0, 0
0, 0, 519
347, 0, 0
0, 0, 0
Notice how several of these coords are repeated? They are presumably the same vertex, but part of another triangle... I don't know how to format that data for rpgCommitTriangles to understand it.