Advertisement Jump to content
Sign in to follow this  
winsrp

google sketchup model as fbx using meshparts instead of only mesh

This topic is 1805 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

Hi all,

 

So I have made the outmost simple tree model in google sketchup pro, and when I export it to fbx and import it in xna, the model comes out as 2 meshes, each with 1 mesh part, here is the picture of the structure and the object:

 

[attachment=19802:sketchupModel.png][attachment=19803:sketchupModel_full.png]

 

I have tried grouping, and making a component, but its always the same result. I don't want to merge the 2 objects since it will remove the part of the trunk that's inside the leafs (already tried that) which in result will add way more quads than the original object (the new quads will be added in the join point of the trunk and the base of the leafs pyramidal object), and I don't want that.

 

Any ideas how to make the magic? 

 

The result should be

 

ModelMesh

-ModelMeshpart0 (here goes the trunk)

-ModelMeshpart1 (here goes the leafs... or the other way around, but both as modelmeshparts, and not modelmeshs each)

 

Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement

I'm not familiar with XNA. However, one solution may be to make (the equivalent of) a std::vector<ModelMeshPart> for each model mesh. Import the parts, and push them onto the vector.

 

To render, iterate through the vector and draw each part.

Share this post


Link to post
Share on other sites

well I could merge them in code on the program, but I would like to avoid doing that... but thanks for the idea.

Share this post


Link to post
Share on other sites

never mind... have it working now, just had to remove all groups, components, and hierarchy, and bam... single mesh, with meshparts divided by texture.

 

Thanks anyway.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!