PDA

View Full Version : Splitting a Mesh into multiple parts



devdept
09-17-2010, 01:33 AM
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

strattonbrazil
09-17-2010, 08:24 AM
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.

devdept
09-20-2010, 01:07 AM
Thanks strattonbrazil,

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

Alberto