Ok, I've figured out a system for dividing the larger-than-65000-indices extracted mesh into smaller sections (less than ~65000 indices) so they'll work in DBPro. What I do is this:
1. Extract mesh.
2. Run through entire mesh, 3 indices at a time.
3. Check triangle (set of 3 indices) for uniformity (fully uniform, 1-2 non, 1-3 non, 2-3 non and fully nonuniform....for testing I only actually check for fully uniform).
4. Search through an array containing sets of meshes, each with a different material, and find if one with this material already exists; if it doesn't, create one; if it does, add this triangle to it.
5. When each mesh in the array gets above about ~65000 indices, it's moved to the "completed meshes" array.
That system works well (I think) for dividing the mesh into the largest chunks possible. The easier method would be to just extract small sections (small enough that they will probably never go above 65000 indices) and split that mesh based on material (actually that probably wouldn't be easier), but that would mean probably 10x more draw calls and the small chance that one of the meshes might actually go above 65000 indices. So I don't do it that way.
The problem isn't that bit. The problem is when I go to use the divided meshes. The indices still point to the full-sized extracted mesh's vertices. Let me explain a bit better with this example:
I have a set of 3 indices. They hold the values 74,371, 9,476 and 35,985 (it's a very big triangle, ok?
). These indices have been pulled from the single large extracted mesh and stuck into one of the smaller single-material meshes. Now I am creating the visual mesh, so I need to reassign those vertices as 1, 2 and 3 and have every index that references the old values (74,371, 9,476 and 35,985) now reference the new values (1, 2 and 3). How do I do this without having to run through arrays that are 65000 elements big more than once? Should I split the mesh up differently? Should I be recording any information during the mesh splitting (I can do that easily)?
I don't know whether you've come across this kind of problem before (or whether you even understand me) but I hope you have....actually I only hope you can help me
Clonkex