Jump to content

[SOLVED] Getting mesh from Model


amit
 Share

Recommended Posts

Hi,

Just starting with leadwerk after a long time.

What I am trying is to load a scene(a small building) from 3ds max.

 

The scene contains 15 odd meshes in it and 6 materials, including 1 glass type material.

 

I am exporting is to 3ds format, and then usinf 3ds2gmf.exe converting it to a .gmf file.

 

Now I am using c/c++ for coding an loading the .gmf file using LoadModel().

 

My idea is now to assign material to different meshes in it, which I can not as there is no function to getsurfaces from TModel type.

 

I think is suppose to be TModel<-TMesh<-TSurface, while getting Surface from mesh is possible, but getting mesh from model ... I do not know.

 

Any suggestion?

Link to comment
Share on other sites

Look into GetChild() or GetParent() I believe. Once of those passing in an index of 0 or 1 will get the mesh from the model. I always forget the exact direction.

 

Probably GetChild(model, 1) though. At work currently so can't test it.

Link to comment
Share on other sites

That there, but not as structured or detailed as would have wanted it.

 

Anyways thanks for the help up there, really worked for me.

 

Now, I am stuck somewhere else. Only 5 surfaces exported from 3ds max. Time to get support.:-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...