How to Convert to Trimesh? 3DS MAX
Hey, I'm new to Max. I wrote an exporter and importer to get models into our game, but right now the importer can only handle trimeshes. I was wondering if there is an easy way in Max to convert a mesh to a trimesh? I'm a little confused because I thought trimeshes were the default. I've zoomed into my model and it looks like it is a mix of quads and tris (though there maybe some n-gons too?) I guess it's not that hard to triangulate n-gons in the importer, but its kind of a pain... Export/Import is always a pain...
Shedletsky's Bits: A Blog | ROBLOX | Twitter
Time held me green and dying
Though I sang in my chains like the sea...
if i understood correctly u wanted a model thats made out of quads or ngons to be made out of tris? if thats what you want just rightclick on the model and Convert to>Editable Patch
You don't need to convert the meshes to "editable meshes" in MAX for that you can export trimeshes. You'll just need to ask the object if you can convert it to Trimesh and then query for the mesh data.
Remember to delete the triobject if (obj != tri), because the triobject is created just because you queried for it.
Cheers
if (obj->CanConvertToType(Class_ID(TRIOBJ_CLASS_ID, 0))) { tri = (TriObject *) obj->ConvertToType(0,Class_ID(TRIOBJ_CLASS_ID, 0)); // Note that the TriObject should only be deleted if the pointer to it is not equal to the object pointer that called ConvertToType() if (obj != tri) deleteIt = TRUE; } else { return 1; } Mesh pMesh=tri->GetMesh();etc...
Remember to delete the triobject if (obj != tri), because the triobject is created just because you queried for it.
Cheers
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement