copymesh
Blitz3D Forums/Blitz3D Programming/copymesh
| ||
Does copymesh copy a mesh and attached animations? (Can't try this out at the moment - at work) |
| ||
I wouldn't think so because there's no CopyAnimMesh() |
| ||
Hmm. I'll do a test tonight. |
| ||
Copyentity copies the animations if the mesh entity has animation. |
| ||
If you really can't get away with using CopyEntity then you will have to use LoadAnimeMesh to load in the number of copies you need. |
| ||
Is there much difference in time between using CopyMesh/CopyEntity and reloading the entire mesh from disk? I've no real meshes on disk (yet) and I wanted to know this. I'm planning to create a game where the meshes are loaded when needed. I'm trying to create a space-sim (in the style of Freelancer or X-2). I want to load the spacestations the moment the player enters a new sector (or system). In X-2 you have sometimes 5 power plants in the same sector. If I were to do the same, should I use CopyMesh or just load the same station 5 times? Also, when using CopyMesh or CopyEntity, which one keeps the hierarchy intact? I saw in the help-files that CopyMesh performs a "deep" copy, what do they mean by that? Is it like reloading the mesh? |
| ||
Copymesh copies the mesh. There is no animation and no relation to the mesh it is copied from. It is a brand new mesh. CopyEntity should be called CloneEntity as it is still linked to the original. Moving a vert on the original will move a vert on all copies. The power of CopyEntity is so you don't need to load a million of the same. You can still modify them in simple ways such as alpha and texture I think. |
| ||
Copymesh also changes the number of surfaces. Copy a cylinder and count surfaces before and after. |
| ||
also if you use copyentity, extract the animations from the original mesh and then use those to animate all copies. |