How can I use Shared Mesh and an imported model


We are using MD5 importer for our models. Currently each spaceship has its own MD5 Model. Every Clon-kind-of-bad-guy has an MD5Node object with his model. So we have a sceneNode with 100 Clon-kind-of-bad-guy all which imported the same model.

We need to optimize this. I thought of SharedMesh. We don't need animation. The SharedMesh's constructor needs a TriMesh object. How can I extract a TriMesh from a MD5Node?

What other optimizations can I do?

thank you,

Each trimesh can only have one material. I haven't used MD5, but when importing .obj, it will automatically create a node consisting of one trimesh for each material used if you're trying to import a model with several materials.

why cant u use sharedNode :?

Shared Node? I didn't find any documentation about it. How do I use it?


OKs I used it and it improved the efficiency a lot thank you ^^