Jump to content
  • Advertisement
Sign in to follow this  
Telamon

How to Convert to Trimesh? 3DS MAX

This topic is 4372 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.



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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!