Splitting a Mesh into multiple parts

Hi All,

We need to split a mesh made of a vertices array and a triangle indices array into parts with max vertices or triangles count of 65535.

Do you think we can find an algorithm ready to use somewhere?

Thanks,

Alberto

Max vertices or triangle count?

I would step through each triangle like I’m rendering and it to a separate list of indices, where the index of the triangle is remapped to a new index in a vertex list, if it’s not already added. When either of these lists approproaches 65535, save off both lists and create two new ones.

Thanks strattonbrazil,

Looking for already used vertices will be quite slow. In any case we will try to implement your approach.

Alberto