Triangles to quads?

The manual encourages to use quads and higher order polygons for collision geometry but the exporter I’m using turns everything into triangles.

Is there a easy way to reconstruct the quads?

I’m only asking for a easy way, because I’ve already discovered a hard way - export to .obj, use obj2egg then egg-trans -c, then hand edit the egg to flag collisions, masks, tags, remove/rename groups.

Hmm… one way would be to collect all the triangles by normal vector, and for every bunch of coplanar triangles, find the ones that are connected to each other, and make those into a polygon.

If you know the shape is convex, then it’s easier, because then you know that triangles that are coplanar with each other are connected and can be joined into a single polygon by getting all the edges that are unique to all of the coplanar triangles.

Thanks, I imagine it would be something like that. I think I’ll stick to the model->obj->egg->edit by hand->egg->bam pipeline. I only got ~20-30 models that I need to convert, so with my skills it would take me much more time to make a tri-quad script then just doing it the hard way.

Maybe I’ll get back to it some day to learn how to use the egg reader/writer, for now that’s beyond me.

With Blender in edit mode press “A” to select all faces and then press “Alt + J” to convert selected triangles to quads. After that press “T” if the Mesh tools panel isn’t showing, and click “Smooth Vertex” in the “Deform” section of the Mesh Tools panel.

You will have a couple triangles here and there but 99% of your model will be converted to quads.

Thanks, that would by good if I was using Blender :wink: