So I have standard tri list terrain done and dusted, however decided to look at replacing with shared vertex objects instead.

So tried to examine generated objects from height maps, first off baffled as to why the work for the extra row of verts is dealt with in the middle of object instead of the end, anyone knows why I am curious to know the purpose.

I tried various sizes and checked out the memblock mesh indices and vertex count given I know the res of the objects mesh it should be easy enough to work out right? I mean the help file states every 3 index=1 tri, and that's about it lol, but I had big problems so that's why I started to lean away from the plethora of info on indices in the help files and took to making sure what was in the object from height map object command matched what the help file said.

help files;

"The first 4 bytes of the memblock represent the number of vertices in the mesh. The second 4 bytes represent the number of indices in the mesh, this may be 0 in which case every three vertices represents a polygon, and no vertices can be shared. If the number of indices is greater than 0 then every three indices represent a polygon and vertices may be shared between polygons. Indices start at 0 so index 0 references the first vertex in the list. "

and later confirmed towards the end;

"Lastly is the index data, if present. Each index is a 4 byte integer which references a vertex in the vertex data. Every three indices represents a polygon"

So I interpret that as a 2*2 image setup is 4 verts and 6 indices, if you have to provide 3 integers each referencing a position per tri, well that should be it right?

so 4*4 verts should be 16 and 54(9 squares is 18 tris, multiply by 3 indices), 10*10 should be 100 and 486

yet these where results from height map objects memblock mesh;

2*2= 4 verts, 4 indices

4*4= 16 verts, 28 indices

10*10= 100 verts, 196 indices

So that didn't make sense, next best thing I can do is google the crap out of it..did not clear things up.

I have known what tri-fans and strips are roughly, but again couldn't make the numbers work when applying any "rules" I found online to fit the above results or even what the help files state. Came close a few times but never exact.

Now what I have done is give it a shot anyway...so far I can make a tri or 2 show up, what I cannot do is get beyond the second tri with anything that doesn't end with a final vertex position at 0

I have started left to right bottom to top, and switched top to bottom, I have tried a bunch of combinations going through each possibility methodically but nope every darn time it fails beyond the none use of vertex zero. Can literally type in 5 on the last vertex and it jumps to zero.

As I said I did my best to take apart the height map object mesh memblock data but just can't fathom it.

I feel sure they should be able to be made from scratch right? I can change data in the height map objects mesh and see how the single change to 1 vertex moves all neighbour triangles.

I couldn't see anything related on github either - unless I am mistaken.

Attached should be a project showing as far as I managed to get - if anyone can fill out the correct indices manually for several tiles and offer an explanation along with what I am supposed to do at the end of each row I would really appreciate it.

Really thought it would be straight forward and if not then it would probably be obvious after a bit of study...days later I find myself here baffled!

Edit wrong file, corrected

Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E