I'm importing an FBX model as an XNA model object, and reading through the vertexbuffer to get a hold of the triangles, indices, UVs, and put it into my custom model class. The problem is that the buffer only holds data on each triangle, not the quads they once were in 3dsmax.
I need to retain the quad structure to use the mesh as I want. The following points are different ways I believe I can achieve this, but I would need some help to get it done.
One method I've tried is simply create quads in the order that the triangles appear. This works great for primitives which have the correct vertex/triangle order where each triangle of a quad comes after another, but edited meshes have an obstructed order which breaks the flow. If someone knows a method on how to rearrange vertex/triangle order before export this would still work.
Is there any way to read off the FBX file (preferebly after it's loaded as a Model object, to avoid rewriting a seperate model pipeline) which triangles are connected as quads?
The 'coding' approach. Given a list of vertices/indices, order them up accordingly so that the quad structure becomes evident. 3dsmax has a 'quadrify' button that works quite well, but can't figure out a straightforward way of doing it. edit; For this approach, what I mean is, what is an optimal way to look at an unordered structure of triangles to find the best "quad" version of the mesh, similarly to the 'quadrify' in 3dsmax tools.